Sign in to follow this  
Followers 0
AlThePal

Using arrays of structures for ControlLogix inputs

4 posts in this topic

Hi, I have an application with a ControlLogix L61 processor, a number of local 32-way input and output cards and an ENBT Ethernet module, which connects to a network of 16 Point IO racks. The local IO connects to 4 identical devices, with the Point IO modules in 16 identical devices. From the point of view of the PLC code, it makes most sense to store the IO data in arrays of structures, so the same code can be run multiple times on data from each device. After a bit of head-scratching (this is our first CLX installation) it turns out you cannot alias array members directly to IO points - you have to copy the data in through code. When I try to use the COP command to copy the data, it doesn't seem to be happy unless I copy the whole of an input card to a structure. However, each 32-bit input card handles data from 2 devices. Is there any way I can use the copy command at the bit level, so I can copy the first 16 bits from an input card into one structure and the second 16 bits into another structure?

Share this post


Link to post
Share on other sites
Have you tried a UDT instead EDIT: Nope it grays out as well. Edited by Groo

Share this post


Link to post
Share on other sites
This suggests that this is the standard way of doing things. My problem now is finding how I can use the COP command to fill the structures with I/O data in the order I want (i.e. potentially a bit at a time).

Share this post


Link to post
Share on other sites
BTD will move a section and reditribute to where you want Just noticed the inputs udt had been changed when I tried placing the alias in. But the same method can be done bit in two instructions, you would have to create a temp dint/sint or whatever, to use in the BTD and then move/copy into your UDT.

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
Sign in to follow this  
Followers 0