Muhammad Azeem

data order CompactLogix PLC Family 5370 Data Byte Order

3 posts in this topic

Hi,

I am working on a project in Digi Module ConnectME9210 and sending data to Allen Bradley PLC (CompactLogix 5370 family). I am not sure which endian I should use to send data. Does Allen Bradley receive Data in Big Endian or Little Endian?

I have another question as well. Can I make an EDS file to tell the PLC to receive data in UINT16, not as a single byte?

Muhammad Azeem

Share this post


Link to post
Share on other sites

I usually just use trial and error with the byte order.  if the data doesn't look right, swap the endian.

I don't think Logix has an unsigned integer tag type.

Share this post


Link to post
Share on other sites

I don't think they have an unsigned data type either. The "SINT" type is 8 bits, the "INT" data type is 16 bits, the "DINT" data type is 32 bits. All are signed, but it may not matter, depending on what you're doing with the data in your CompactLogix. If you need it to be unsigned, IOW you will be receiving numbers outside the range -32768 to 32767, you will need to put the data into a DINT tag to do any calculations. If you just need the status of the individual bits, it won't matter.

A "COP" instruction creates a bit-by-bit copy of the original register in the destination so you can experiment with that to get your data from the 16-bit register into the 32 bit register.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now