MODBUS RTU
-
Hello,
i need help running mango with modbus rtu protocol.
Im reading data from holding register (4 bytes - 2 words data format) and values i got with automatic pooling are different in sense that word values are switched. If i press reload value button, correct value is displayed. Let me explain a bit more: From one address i read value 73 -> which is 0000 0000 0000 0000 0000 0000 0100 1001 binary (double word variable) and that is correct value also shown on modbus device display. Then all suddenly this value on watch list switches to 4784128 -> which is 0000 0000 0100 1001 0000 0000 0000 0000 binary. Most significant word becomes least significant word and opposite. If i press reload value, it again reads it as 73. I have this problem on linux and windows installations and also on mango m2m 1.12.5 and mango automation 2.0. However ScadaBR which is based on mango doesn
t seem to have this issue. I only tested it on windows for now.Do you have any idea where should i look to correct this and what could be the problem?
-
Can you use I/O logging to log what is happening, and post the file here? Also, how often does this occur?
-
Thank you for pointing that up. I wasn
t aware of i/o logging before. And it helped me troubleshoot this issue. It turns out that the problem occur because of grouping requests for reading multiple registers that have addresses in sequential order, so one word of data got eaten. :) My device has one variable represented with 2 Bytes and all others are represented with 4. So once i correctly set its data type to 2 bytes all variables with address behind it were correctly displayed. That
s why i was getting correct result with manual reading from single address. My bad.Thanks!
-
Cool. Thanks for following up.