Internet PLC Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Internet PLC Forum
»
General
»
Technical support
»
NETCMD RI00
« previous
next »
Print
Pages: [
1
]
Author
Topic: NETCMD RI00 (Read 11862 times)
pjuangph
Newbie
Posts: 7
I'm a llama!
NETCMD RI00
«
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))
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:NETCMD RI00
«
Reply #1 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.
«
Last Edit: June 14, 2012, 04:26:00 PM by support
»
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
pjuangph
Newbie
Posts: 7
I'm a llama!
Re:NETCMD RI00
«
Reply #2 on:
June 15, 2012, 06:58:33 AM »
I see, thanks, I didn't know to ignore the stuff after the 4.
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:NETCMD RI00
«
Reply #3 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.
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
Print
Pages: [
1
]
« previous
next »
Internet PLC Forum
»
General
»
Technical support
»
NETCMD RI00