BITS N BYTES

How to copy dissimilar data types - Boolean and SINT.

3 posts in this topic

I have a custom module on Ethernet/IP with an EDS import that consists of a single BOOLEAN and array of 11 SINT.

How do I copy dissimilar data types [1xBoolean and 11xSINT] using Logix5000?

This data will be eventually used to develop a AOI where multiple Ethernet/IP modules could be used?

5b8af7d46d1a6_EthernentInputStructure..P

 

Share this post


Link to post
Share on other sites

This is a Module-Defined Data Type, so it's similar to a User-Defined Data Type.

I'm not totally sure what you're asking.   You can create a new Tag of the same datatype and copy 1:1 into that, or you could use an ordinary SINT[11] array and just copy starting at the .Data[0] sub-element.

 

Share this post


Link to post
Share on other sites
20 hours ago, Ken Roach said:

This is a Module-Defined Data Type, so it's similar to a User-Defined Data Type.

I'm not totally sure what you're asking.   You can create a new Tag of the same datatype and copy 1:1 into that, or you could use an ordinary SINT[11] array and just copy starting at the .Data[0] sub-element.

 

I'm trying to figure out best/preferred method of handling the input assembly. Attached is 11 byte incoming data consisting of three datatypes  UINT, INT and USINT.

It appears most efficient method of handling data in Logix 5000 is to convert all elements to DINT using COP command. But I'm not clear as to how the resulting DINT data will be converted or how best to utilize the COP instruction. Note I'm new to Logix 5000!

Input Assemblies.JPG

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