|
Set I/O Pin Status (Sx) instruction |
Top Previous Next |
|
Description (see instruction description format info here)
Details
Sets I/O Pin Status instruction allows the network host to remotely set the status of the DS I/O line. Parameter x specifies the I/O line:
* 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 outputs. These I/O lines, however, are connected to the CMOS outputs of RS232 (RS422, RS485) transceivers and that dictates that the lines must only be used as inputs.
*** Hardware limitation
**** 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
Desired I/O line state (s) corresponds to the status of I/O lines of Modules. For Serial Device Servers and Boards that incorporate RS232 transceivers actual line status on the RS232 connector is exactly opposite to the value of s: if s=0 then the line will be set to HIGH, if s=1- the line will be set to LOW.
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.
There are several cases when the Set I/O Pin Status (Sx) instruction is ignored by the DS:
Note, that in all above cases the DS still returns OK (A) reply code but the commands are discarded internally.
|