Combining two 16bit modbus registers into one field

Hi,

I have two 16 bit modbus registers which together will form a 32 bit value that I need to read/record in the eWon Flexy. (Highlighted in the attached image). Is there a way to combine these within a single field within the Flexy somehow?

Thanks.

image

I think I have something that might be useful for you but it will end up being in Hex. Let me know if this example helps at all

32 bit hex check.txt (358 Bytes)

Thanks for the file. I could really do with getting the number through in decimal if possible. Is there any way to convert back?

I am pretty new to setting up this device, how would I implement that sort of script?

I think if you set it up this way you should be able to do what you’re trying to do

That looks promising. [E] would be the option that I need. How do I actually combine to two addresses into one tag? Do I need to combine the addresses somehow? How do I select what R1 and R2 will be?

It should be the first address selected and the one address following it

This is what happens when I try to enter it. Sorry if I’m not understanding this correctly but I can’t seem to get it to work.

Can we try and take a look at this over teamviewer?

Yes, sure

I have tested the implementation of the combined 32bit register and looks to be working fine now.

For reference if anyone else sees this post. We needed to add the D modifier to read the 32 bits. You enter the address of the first 16 bits and it will grab the following address for the remaining 16 bits.

A post was split to a new topic: eVCOM with a Legacy software

Sorry, can i have example coding for this one? (Combining two 16bit unsign int to 32bit unsign int)