Good afternoon everyone , I have S7300 PLC with 4 CP 341 to 4 differents Modbus networks. No problem with polling data, just in the kind of data I'm getting. Slaves bring to me unsigned data in 16-bit (volts, just for say), although in my DB's I'm receiving signed data , for example:
On slave #9 I'm watching 13734 volts on its panel, but on my PLC I'm obtaining -1281 value.
Don't know if I have to do another kind of configuration or programm to convert this kind of data in another one or do some shift of bits. (I found 16-bit has 1, indicating its a negative number, a signed integer). This happen when I'm polling DINT.
Slave's manual just gives the scaling factor of 10 (if you're receiving 1534 as DINT or INT, then you'd scale it as 153.4)
Using Modbus Poll tool, I found the same thing (values from Slave's panel don't correspond to values showed on Modbus Poll)
Hope you support me.
Thanks in advance .
PS1: Slaves are ION 7330, from Schneider. According to Modbus map register, they already bring integer values.
PS2: I'm new on Modbus RTU protocol , but I don't have problem on its frame.
S7300 Unsigned and signed values
-
- Posts: 265
- Joined: Sat May 27, 2006 6:46 am
- Location: Europe
Re: S7300 Unsigned and signed values
hello, try to move your value from Int to Dint
L DB.DBWxxxx
T DB.DBDxxxx
regards
PLC_ITA
L DB.DBWxxxx
T DB.DBDxxxx
regards
PLC_ITA
-
- Posts: 43
- Joined: Sat Mar 27, 2010 8:14 am
Re: S7300 Unsigned and signed values
Try to swap BYTEs in WORD, and after move your value from Int to DINT:
L DB.DBWxxxx
CAW
T DB.DBDxxxx
L DB.DBWxxxx
CAW
T DB.DBDxxxx