0608jai1990

PROFACE HMI AND SIEMENS TRANSMITTER

2 posts in this topic

Greetings everyone,

I have a Proface HMI(LT-4201TM Modular type DIO) connected to a siemens flow transmitter(MAG6000). Communication between these two devices is using modbus.

The modbus register that im using to get the data/reading of a totalizer from siemens transmitter are 403022 and 403023. I managed to display the exact totalizer value from siemens transmitter on the Proface HMI screen.

But I couldnt get the exact totalizer value at the ladder logic side, the value that i get at the ladder logic side seems like a raw value.

For an example, the totalizer's value is 147083(real value), but at the ladder logic side the value for 403022=15598 and 403023=17316.

 

Can anyone guide me to solve this issue.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

A 32 bit floating point consists of four 8 bit bytes, each represented by two hexadecimal characters.

The actual total value, 147082 (decimal) is 0x480fa2c0 in 32 bit floating point.

the 1st byte is 0x48
the 2nd byte is 0x0F
the 3rd byte is 0xA2
the 4th byte is 0xC0

The first byte value 0x48 makes a low 6 six digit value in the 100,000's in 32 bit floating point
 
substituting a value 0x47 for the first byte reduces the total to well below 100,000, down to 37811.

Although there are four accepted formats for floating point word and byte order and most common issue in getting the correct value is getting the words and bytes in the correct order, the problem here is that the value you provided from the ladder logic has no byte value close to 0x48 to get a 32 bit floating point total into the range of 100,000.

Your ladder logic value is 15598 17316  decimal

15598 converted to hex = 0x3CEE
17316 converted to hex = 0x43A4

None of those bytes is close enough to 0x48 to get you a total over 100,000. 

In standard format,

0x3CEE43A4  = 0.029084988

Swapping word order gets the closest value:

0x43A43CEE = 328.476

Swapping bytes gets bizzare:

0x3CEE43A4  = 0.029084988

0xA443EE3C = -4.2485677E-17

Without a ladder logic value closer to what your actual total is, it's sheer speculation whether the issue is word/byte order.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now