duncan1984
Member
I am using Modbus Ethernet to read from a Statcom using a Prosoft MV156-MNET module. I am able to read the digital and analogue signals fine (into the correct registers i have created) however with the analoges i get incorrect values back.
The automatically created addresses by the MNET module are 16bit INT and the statcom signals are Reals. I have tried the functions within the MNET module to swap the words, bytes and bits etc and also obviously converting from INT to REAL with no luck.
Can anyone suggest how i can manipulate the data im receiving so it mirrors whats being sent out by the statcom?
Thanx in advance!!
Examples Below.
Statcom Send -- Value MNET Receive Value DEC(BIN)
Statcom Sends Value 1 -- MNET Receives Value 16256 (00111111 10000000)
2 -- 16384 (01000000 00000000)
3 -- 16448 (01000000 01000000)
4 -- 16512 (01000000 10000000)
5 -- 16544 (01000000 10100000)
6 -- 16576 (01000000 11000000)
7 -- 16608 (01000000 11100000)
8 -- 16640 (01000001 00000000)
9 -- 16656 (01000001 00010000)
10 -- 16672 (01000001 00100000)
20 -- 16800 (01000001 10100000)
30 -- 16880 (01000001 11110000)
The automatically created addresses by the MNET module are 16bit INT and the statcom signals are Reals. I have tried the functions within the MNET module to swap the words, bytes and bits etc and also obviously converting from INT to REAL with no luck.
Can anyone suggest how i can manipulate the data im receiving so it mirrors whats being sent out by the statcom?
Thanx in advance!!
Examples Below.
Statcom Send -- Value MNET Receive Value DEC(BIN)
Statcom Sends Value 1 -- MNET Receives Value 16256 (00111111 10000000)
2 -- 16384 (01000000 00000000)
3 -- 16448 (01000000 01000000)
4 -- 16512 (01000000 10000000)
5 -- 16544 (01000000 10100000)
6 -- 16576 (01000000 11000000)
7 -- 16608 (01000000 11100000)
8 -- 16640 (01000001 00000000)
9 -- 16656 (01000001 00010000)
10 -- 16672 (01000001 00100000)
20 -- 16800 (01000001 10100000)
30 -- 16880 (01000001 11110000)
Last edited: