Thread Content
The company’s wastewater treatment plant uses a Siemens PLC300 for communication with the DCS system for monitoring and control. There is a pressure parameter ranging from -0.1 MPA to -0.2 MPA; however, the actual operating pressure is -0.05 MPA. The DCS display shows 0 in this case. By checking the PLC configuration program, it was found that the measured value is first multiplied by 10, resulting in -0.5, and then converted using TRUNC to a double integer value, which again results in 0. So I decided to multiply the measured value by 100, and after that conversion, the value became -5. But when this value is transmitted to the DCS, it shows as 65535 Does anyone know?
65535, it seems like your data has overflowed. Since it’s already TRUC, it should be an 16-bit integer, so what’s with DW? It would be best to send a screenshot of the program.
You are transmitting a value of 300 to the DCS. To facilitate transmission of negative values, use -0.1MPA to -0.2MPA; it’s better to multiply these values by 10000 to get a range of -1000 to +2000. Adding 1000 to this range gives a range of 0-3000. Then convert the real variable to a dint type, and ideally further to an int type. After transmitting it to the DCS, convert it back again.
For something like this, it would be better to transmit the raw values from the PLC AI and then perform the necessary conversions in the DCS
It should be a data overflow, but it’s unclear why it happened
That’s actually a good idea; go and make the changes then to give it a try
In that case, you still need to pull wires, which is rather troublesome.
Aren’t you already involved in communication? This is also a form of communication – it simply involves transmitting the original values before standardizing them using AI; no wires are needed for this
Does it mean sending the AI input (a value between 0 and 27648) directly over the communication link?
Yes, still convert it according to the range