PLC Register Values to Actual Real values

Hey,
I am collecting data from my PLC Siemen S7-300 to node-red using raspberry pi 4B (2GB) model over ethernet but my PLC has 317-2DP CPU that's why there is no ethernet port so I am trying to fetch data from Weintek HMI MT8071iE. HMI is connected to PLC through MPI and HMI is connected to raspberry pi using the ethernet cable. I am able to collect the values like these 1106500423 from sensors however HMI shows -134ᵒC which is the actual value of my RTD. I tried to use the range block in which I set the Input range as 0 to 4294967296 because HMI stores the value in the form of 32-float and set the output range as -276.48ᵒC to 276.48ᵒC. I do get the values but after conversion it doesn't match the ones I am getting on HMI.
Point to be noted is that I am not using modbus nodes rather I am using the S7-nodes to communicate to the HMI. I tried to use MPI-USB adapter by siemens to directly communicate Pi to PLC but got some errors and I do have to attach HMI to PLC that's why I cannot use MPI port because there is only one available and that will communicate to HMI.
Can anyone help me out?

There seems to be a problem with what the PLC is sending compared to the value.

Then I would suspect there is a problem with the maths in conversion.

So why can't you use the actual number that is being sent? eg: 4294967296?

[quote="umair, post:1, topic:33540"]
Point to be noted is that I am not using modbus nodes rather I am using the S7-nodes to communicate to the HMI.
[/quote]

That begs the question: WHY?

(Well, ok, you did kind of explain it in the next part)

Maybe you should work on finding out why you are getting errors. Are they communication errors or what?

I think (and that doesn't mean it is right) that you may need to look deeper into what is going on.

I used the range function properly in which I set the input range from 0 to 4294967296 as you mentioned and set the output range from 0-100% (for my level indicator). Then I change the course of sensor to evaluate if the values on HMI and the node-red seems to match or not at some points they matches but as soon as move far up from the current value I see there generates some error around 2-3%, I mean if I am getting 77% level on HMI then it is displaying either 75% or 80% on node-red. As in the near future I am going to replace the HMI with node-red running on Pi and it will be a critical control so I cannot have a minor error in the readings.

I somehow managed to get proper values from RTDs by using function block and in that function I just multiplied the input register values with the slope of the system and it works fine but this isn't the case in level indicators.

If that is within an acceptable range, then don't worry about it.

Oh, ok. Future needs to be exact. Ok.

I'm not understanding what you mean. It either works or it doesn't.

Sorry. I am a bit out of it just now. Too many things going on in this part of the world.
I was only mentioning things which came to mind which may (or not) be causing you grief.

Good luck with it. It will just need (alas) more work to understand where the maths if falling over and how to correct it.

There were some errors with the sensor calibration, I have figured that out. The label on sensor was somehow changed which caused the error because I have done the scaling according to that. Thanks for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.