Internet PLC Forum

General => Technical support => Topic started by: pjuangph on June 14, 2012, 04:00:54 AM

Title: NETCMD RI00
Post by: pjuangph on June 14, 2012, 04:00:54 AM
I'm trying to read the first 4 inputs of Nano using RS485 and NETCMD.

I'm getting a response back of
@02RI0059 ' No inputs on
@02RI045D ' 1 input is on

I'm not sure how to read this

Z$ = NETCMD$(2,"@02"+"RI00*")
DM[100] = HEXVAL(MID$(Z$,6,4))

Title: Re:NETCMD RI00
Post by: support on June 14, 2012, 04:25:25 PM
The inputs are represented as 8-bit hexadecimal number

So since you get a response RI04 rewrite it in binary it is

      0000 0100

 - this means input #3 is turned ON.



Title: Re:NETCMD RI00
Post by: pjuangph on June 15, 2012, 06:58:33 AM
I see, thanks, I didn't know to ignore the stuff after the 4.
Title: Re:NETCMD RI00
Post by: support on June 15, 2012, 09:32:31 AM
The 5D in this case is the FCS (frame check sequence) which is an error checksum where the PLC will determine if there is any error in the response string. You can simply ignore them since NETCMD$ automatically checks the FCS command on your behalf.