advertisement
from the Modbus links department...
modbus reading not actual
PLCs and related questions. topic
Posted by Ahmed El-dosoky on 4 March, 2013 - 12:17 am
We are connecting our DCS system with PLC using Modbus-RTU (RS485). I am getting some reading in the DCS but this reading are changing fast and expressing a wrong reading also.

But I think the physical link established OK because the TX/RX LEDs in both sides are blinking.

Hopefully to find a solution for this problem with CONTROL.com professionals


1 out of 1 members thought this post was helpful...
Posted by David on 4 March, 2013 - 12:48 pm
For example, what reading do you expect?
As examples, what readings are you getting that do appear correct?

What is the rate of change that does not appear to be correct? 10% of scale per second?


Posted by Ahmed El-dosoky on 5 March, 2013 - 6:12 am
I am expecting to get the same reading as it is in the PLC HMI for example for tank level = 50m it should comes to me the same but what the case with me that for this type of reading (Analog) getting some strange numbers rapidly changing. I think I have to reorder the bits coming from the PLC (some bit shift or the entire word) but I don't know how to do such issue.

Please also know that PLC vendor expressing the analog values in double word (32 bit).

I tried also to make some offset and gain adjustment by simulating the PLC reading at any given values and get DCS reading and try again with diffident simulated reading but that not solve the issue also.

I don't know exactly what is the problem.


Posted by Lynn August Linse on 5 March, 2013 - 11:48 am
> Please also know that PLC vendor expressing the analog values in double word (32 bit).

Be aware that there is no 'standard' for how Modbus moves a 32-bit word.

Modicon PLC move it with low-word first, but big-endian bytes in the two words (so a hybrid part little & part big endian)

Many third-party devices move it with high-word first in true big-endian.

Your DCS needs to be able to support either design, so check with their tech support or documentation.


Posted by Andrzej on 5 March, 2013 - 2:52 am
Hello,

Try connect Modbus Master application with possibility to change the display data format.

If you read real as integer you will often have fast changes - so maybe your problem is that you read the wrong addresses / formats. Try Modbus Tester from www.modbus.pl

Regards,
Andrzej


Posted by David on 5 March, 2013 - 10:00 am
The data in the slave/server (presumably data in the PLC?) is in a format that has to be interpreted by the master/client (DCS?), which means both the master and the slave need to use and handle exactly the same data format.

32 bit words can be one of several formats:
-32 bit long integer
-32 bit floating point with one of two different common formats depending on byte and word order.

The two common 32 bit floating point formats go by at least half a dozen names: big/little endian, Motorola/Intel, alphanumeric designations like FPLB/FP L or BADC/CDAB, the term 'word swap' or 'byte swap'.

Many (but not all) Modbus client/servers have somewhere in their configuration a choice for which 32 bit floating format is used to interpret the data.

The slave/server's documentation should tell you what format choices are used or are available and whether that format is a long integer or a floating point.

You need to research how to change how the DCS interprets the floating point data - how to interpret it as the alternative format. If the format can't be changed in the master, can the format be changed in the slave?

As Andrzej points out, interpreting a floating point in the wrong format can cause large changes in values for a relatively stable value.

One other way that values can be misinterpreted is when a floating point value, which consists of two 16 bit Modbus registers, is read from one register of a data value and from one register of another data value, the previous or next data value in the register sequence. That can happen when target addresses are off by one. There's no way to produce a correct value when 16 bits are from one data value and 16 bits are from the data in the adjacent register. The addressing would need to be corrected.


Posted by Luca Gallina on 6 March, 2013 - 6:04 pm
I had once an issue with DeltaV DCS and Siemens PLC, where the 16-bit endian order was managed by the DeltaV driver but 32-bit values needed to be swapped at word (not byte) level. The easiest solution was the adapting of the byte order at PLC side.

Quick hint: send the value 12345678 hex and check the received digits order (as hex value) at the other end of the Modbus line.

See page 19 of the following manual for some info and hints on how to handle Modbus 32-bits values on Siemens PLCs:
http://www.runmode.com/s7xcpmodbus_files/s7xcp_modbus_slave.pdf

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
Any fool can paint a picture, but it takes a wise person to be able to
sell it.
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive