Reading Modbus real value from Modicon M340


I’m having an issue reading real values form a Modicon M340 through Modbus. I read some of the existing posts, but the solutions did not work for me.

I set my modbus connection to zero-based. With this setting, I can read and write to an integer variable from the PLC at %MW1003 by using [Modus]HR1003.

When I try to read a real integer at %MW2628 by using [Modbus]HR2628, I get zero. I tried changing the data type from float to double, but still get 0.

Try [Modbus]HRF2628 instead.

Thank you for the quick response, but it is still reading 0.

Try the “Reverse Word Order” setting on the driver configuration.

Thank you very much. That was my problem. I had played with the reverse word order option, but that was before using HRF instead of HR.

I have another question if you don’t mind. I create a new OPC tag and click on the pencil icon to select the OPC Server. If I select the “Ignition OPC UA Server” and hit commit, the server name is not populated in the tag property. My current workaround is to go to expand Ignition OPC UA server-Devices-[Modbus]-[Diagnostics] and select one of the tags. Then I go into the tag property and change the path.

What is the right way to create a new Modbus tag without creating addresses in the gateway device page?