EasyManua.ls Logo

Omron R88A-MCW151-DRT-E - Page 268

Omron R88A-MCW151-DRT-E
276 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
253
Programming Examples Appendix C
' to VR memory (address 0). The PC has Host Link slave node 13.
HLM_READ(2,13,PLC_IR,2,2,MC_VR,0)
GOSUB check_status
PRINT VR(0)[0],VR(1)[0]
STOP
check_status:
VR(250)=HLM_STATUS PORT(2)
IF VR(250)=0 THEN
PRINT "Succeeded"
RETURN
ELSE
PRINT "Failure (";attempt[0];"): ";
IF READ_BIT(9,250) THEN
PRINT "Command not recognized by slave"
ELSE
IF READ_BIT(8,250) THEN
PRINT "Timeout error"
ELSE
PRINT "Received end code: ",HEX(VR(250))
ENDIF
ENDIF
IF attempt=3 THEN
PRINT "Read failed after 3 attempts"
STOP
ENDIF
attempt=attempt+1
GOTO loop
ENDIF

Table of Contents

Related product manuals