modbus registers map to controllogix data type

wilsonzhu

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

When programming modbus communication, we need to map the registers to AB Controllogix Data type. Is the following Modbus registers mapping correct?
signed 16 bits(INT),
unsigned 16 bit(I don't know,pls tell me),
signed 32 bits(DINT),
unsigned 32 bits(LINT),
floating points(REAL)
Thanks a lot!
 
I check the help file, LINT is for 64 bits, Does it mean in controllogix all Int type is signed INT? Then how to map unsigned modbus register to controllogix via prosoft modules?
 
You can 'create' a Long Int type with a UDT, but it's not a native Logix type.

All integer datatypes are signed (SINT, INT, and DINT), there are no unsigned versions, but as long as you are aware of that, you can move an unsigned value into a signed type without a problem. 'X' bits is still 'X' bits, the sign only matters in how a value is calculated and represented.
 
So, if the device use unsigned value, and it's automatically convert to signed type in controllogix. for example of Int type, if the value in PLC is -5, actually it represents 32768 + abs(-5) for actually value in device, I have to create another DINT to store this positive to show up in HMI. Is it Correct? Thanks.
 
Actually, in the HMI you can (probably) choose unsigned and it will show up correctly.

There is no "automatic conversion to signed type". It is just how the math instructions and RSLogix treat the most significant bit.

If you need to manipulate the values with PLC code, then, yes, you need to deal with the sign bit properly depending on the operation. But, if they are just being displayed, see if you can choose unsigned data type in the HMI and get the correct values.
 

Similar Topics

Good day guys. I have a third party device with its Modbus registers which I want to copy/set up on a plc because I need to convert my Modbus tcp...
Replies
3
Views
139
Hello everyone, I want to read a register in HC900 honeywell but I am not understanding. https://ibb.co/2dNDsmk In this link are the things I...
Replies
10
Views
1,785
Hi Team, So, what is the correct understanding of the codes for Holding vs Input registers? My understanding was #3 = Input registers & #4 =...
Replies
15
Views
2,468
Hello, I am attempting to add some IO Discrete tags to a AVEVA InTouch project (version 2020). These tags use the MBTCP driver and attempt to map...
Replies
1
Views
1,182
Platform: CCW, 2080-LC50-24QBB, Using 2080-SERIALISOL card Task: Writing Multiple Registers Using Modbus RTU (RS485) Problem: I am attempting...
Replies
4
Views
1,360
Back
Top Bottom