controllogix data type REAL's Struecture

wilsonzhu

Member
Join Date
Jan 2008
Location
vancouver
Posts
278
Hi all,

As you know, when reading from modbus floating point data (32 bits) by prosoft MCM card, we use real data type in controllogix to COP two int modobus register into it. Now I want to test in the controllogi how it's converting, I need to know the structure of real type, for example, how 12.34 was represent in two int registers which I COP to REAL data type?
Thanks for you help.
 
Hi all,

As you know, when reading from modbus floating point data (32 bits) by prosoft MCM card, we use real data type in controllogix to COP two int modobus register into it. Now I want to test in the controllogi how it's converting, I need to know the structure of real type, for example, how 12.34 was represent in two int registers which I COP to REAL data type?
Thanks for you help.

AFAIK, the mantissa and exponent of type REAL numbers are not explicitly addressable in Control Logix. You will need to construct them manually.
That assuming I understand your question properly.
 
This topic of floating point representations has been covered very extensively on the forum. If you do a search you should find a tone of stuff.

Take a look at this website:
http://babbage.cs.qc.edu/IEEE-754/Decimal.html

This link was posted in a thread last week by Alaric. When you look at the bit patterns remember that the exponent is for a power of 2, not a power of 10 and that the decimal point in the mantissa is inferred.

There is no magic in the COP thing to get a float out of two integers. The reason they arte integers in the first place is a restriction in the data transfer path somewhere. In one of the links you are only allowed to pass integers. So on one side the processor copies the bit pattern for a float into two integers. At that point the bit pattern in each integer has not real meaning by itself. When the intergers get to the PLC the COP command copies the contents of the two integers byte by byte into the REAL tag and you get your floating point value back.

Keith
 

Similar Topics

I'm new to AB and I'm running into a lot of things people tell me can't be done in AB that actually CAN be done, so I thought I'd ask here if...
Replies
3
Views
5,003
Hi all, When programming modbus communication, we need to map the registers to AB Controllogix Data type. Is the following Modbus registers...
Replies
5
Views
8,245
HI, Controllogix has some tag data type and it can be mapped to PLC5, how does these map work. For example, Float in CLX to what type in PLC5.Can...
Replies
1
Views
4,607
When adding an IFM AL1322 IO-Link Master Module to a 1756-EN2T Ethernet Card on a 1756-L82E Controller, The Input and Output data file does not...
Replies
0
Views
111
Hello all first time user here with a question about how to repopulate data on my controllogix 5561 176-L61B. Combination of a low PLC battery and...
Replies
7
Views
1,029
Back
Top Bottom