Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-02 12:18 AM
We are trying to capture the energy meter data using a M340 PLC,
we are able to get the decimal data from the energy meter as mentioned in the attachment.
Can you help us to figure out which function block is required to convert the decimal values to the floating point value in M340 PLC
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-07 03:25 PM
You need to use the WORD_AS_REAL type conversion function block.
Check the Help file for use and examples.
Confirm that the Real output is what you are seeing on the meter. If totally different/ weird value then reverse the order of the Word values applied to the inputs.
As an example, a meter value of 415.2 would have register values of 16#43CF (17359) and 16#999A (39322)
If the registers were reversed your conversion would give -1.59506144646e-23
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.