micrologix 1400 modbus problem

eababio

Member
Join Date
Jan 2011
Location
Gaborone
Posts
52
I have a device br20 which sends 32 bit floating point data through modbus. am using micrologix 1400 to read this data . Modubus only reads 16 bit so i have to read two registers. How do i get these 2 16 bit integers into one data type like long so that i could work with the data? Basically how can one combine two integer data type into one long 32 bitt data? hope my question is clear
 
The COP command will be the main tool to send 32 bits from two integers into one float.

If the end result does not look like what you expect then you can experiment with the following:

I use this tool to help me see what I may need to do. In RSLogix view the received integers in hex format. Then type the hex values into the convertor's 'Hexadecimal Representation' field and view the 'Decimal Representation' result. You may have to swap bytes (two hex characters) within each 4 character section. You may have to swap the two integer (4 hex character) halves. You may have to do a combination of these. But one arrangement should make sense.

Once you see what needs to be done you will have to perform these same operations in ladder logic. The SWP command will help with the first transformation. The MOV command (used twice) can be used to send the contents of the two integers to another two integers but in the opposite order (though I just leave one integer free just after the received integers - then I can just MOV the first after the second to reverse the order.)

When these are done then use the COP command to send the two integers to one float.
 

Similar Topics

I want to learn about modbus communication and I saw on another thread about inexpensive modbus relay units so I found it on Amazon along with a...
Replies
46
Views
7,226
I have a spare Micrologix 1400 Series B I bought used on Ebay awhile back. I had thought of it as a spare PLC for my train project but I screwed...
Replies
4
Views
1,254
Good Day! Would anyone be able to explain what is happening with the COP's and MOV's in this Modbus poll routine? If anything I am confused by...
Replies
6
Views
1,731
I been tasked with setting up communication between a heating cooling unit manufactured by Advantage Engineering and a Microloagix 1400 plc. The...
Replies
6
Views
2,509
Hi, I am trying to communicate between a MicroLogix 1400 and a Click PLC. There is a great video from AD that shows the simplicity of...
Replies
2
Views
1,767
Back
Top Bottom