Summary of operation

Turn ON/OFF general-purpose output 19 in synchronization with general-purpose input 1.

Program code

cmdStr = "IOCFG=262144"                                                ’Configure general-purpose IO19 to output all other IO to input

result = SendReceiveCommanderHID(devHandle, cmdStr, replyStr)        


---omitted steps---

cmdStr = "IO1"

result = SendReceiveCommanderHID(devHandle, cmdStr, replyStr)        ’Read status of general-purpose input 1

If replyStr = "1" Then

cmdStr = "IO19=1"                                                        ’It is ON

result = SendReceiveCommanderHID(devHandle, cmdStr, replyStr)

Else

cmdStr = "IO19=0”                                                        ’It is not ON

result = SendReceiveCommanderHID(devHandle, cmdStr, replyStr)

End If


Note: The state of the general-purpose input must be read repeatedly


< Previous Section | Topic Home | Home | Next Topic  >