Page 1 of 1

S7300 Unsigned and signed values

Posted: Fri Mar 15, 2013 12:50 am
by RandolphC
Good afternoon everyone :D, 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)

(oo) Hope you support me.

Thanks in advance :D .

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.

Re: S7300 Unsigned and signed values

Posted: Sat Mar 16, 2013 9:28 am
by PLC_ITA
hello, try to move your value from Int to Dint

L DB.DBWxxxx
T DB.DBDxxxx

regards
PLC_ITA

Re: S7300 Unsigned and signed values

Posted: Sat Mar 16, 2013 12:32 pm
by kaa1979
Try to swap BYTEs in WORD, and after move your value from Int to DINT:

L DB.DBWxxxx
CAW
T DB.DBDxxxx