Get I/O Pin Status (Gx) instruction
|Top Previous Next|
Description (see instruction description format info here)
Get I/O Pin Status instruction returns the status of the DS I/O line specified by the x parameter:
* This data is for the case when you are using RS232 FB9M connector of the EM120/EM200-EV. If you are using expansion connector (three jumpers removed) then use I/O data for the EM120 and EM200 Modules
** From firmware standpoint, these are general-purpose lines of the Ethernet Modules that can be used as inputs. These I/O lines, however, are connected to the CMOS inputs of RS232 (RS422, RS485) transceivers and that dictates that the lines can only be used as outputs.
*** These are general-purpose input/output pins. Application firmware uses these pins to implement specific serial port functionality (shown in blue) and this defines "logical" direction of the pins
I/O line status (s) returned by the Get I/O Pin Status instruction indicates current status of the I/O lines of Modules. For Serial Device Servers and Boards that incorporate RS232 transceivers actual line status on the RS232 connector actual line status is exactly opposite to the value of s: if s=0 then the line is at HIGH, if s=1- the line is at LOW. Notice, that not only inputs, but also outputs can be monitored using this command.
Error (C) reply code is returned if the data supplied in the command is invalid. Denied (D) reply code is returned if:
Rejected (R) reply code is returned if this command is sent while the DS is in the serial programming mode.
I/O line status can be set using Set I/O Pin Status (Sx) instruction.