RSLogix5000 Array question

kevbloke

Member
Join Date
Jul 2004
Location
Kent uk
Posts
81
Hi all, I am using RSLogix5000 version 7 to modify a program on a 1756-L1 controller. We have installed 5 more drives on a conveyor system. The existing program is using an array to control the cascade start. M[77].0 - M[77].15. M[77.0] being the last conveyor and therefore being the first to start. The Array 0 is being copied to M[77] Length 2.
The 5 drives we have installed are right on the end i.e. last. So i would like to make the last new drive M[77].0 and the existing M[77].0 is to become M[77].5.
How do I increase the size of the Array and what would the COP command become?
I have sorted all the control side but just cant get my head around this bit!!
Many Thanks in advance for any help given.

Kev
 
Array help

Hi all, Having looked a bit deeper i'm thinking that the Array is 32 bits. The COP command is saying a length of 2. This is bytes i believe. So it will copy the first 16bits into M[77] which makes sense because originally there was 16 motors. If i up the length to 3. Will this then copy the further 8 bits into M[78] automatically or just ignore them because i haven't designated an area for them?
If this is the case can someone tell me how to use the COP command correctly for the extra byte please.

Kev
 
Your assumption is incorrect: the COP instruction Length parameter is not in Bytes.

Instead, the Length parameter is in destination elements.

If the destination datatype is a SINT, the Length is in SINTs (8 bit elements).
If the destination datatype is an INT, the Length is in INTs (16 bit elements).
If the destination datatype is a DINT, the Length is in DINTs (32 bit elements).
If the destination datatype is a REAL, the Length is in REALs (32 bit elements).

and so on.

The COP instruction will take as many bytes as necessary from the Source to fill the Destination. If the Source and Destination are the same datatype (they usually are), the data will simply match.

I think there might be some confusion where you're talking about the sub-elements of an INT tag as an 'array'. That word has a very specific meaning in ControlLogix, where it refers to tags that include multiple members that are specified using square bracket [x] notation.

To figure out what's happening in your program, a screenshot would be best. V7 is very old (about 10 years) but you could still post a *.ACD file and other users could open it while converting it to a modern revision of RSLogix 5000.

It sounds to me like your program was written to effectively use a 16-bit INT tag array as though it was a PLC-5 data table. I'm sure folks can help you sort it out once we know what the datatypes are.
 

Similar Topics

Hi all, I'm trying to access a variable address in a shift register. I have used BSL with an array DINT[20]. Now I wan't to access...
Replies
4
Views
1,524
This should be a simple one. I have a Dint array in my program that is setup for 30 elements. If I want to increase the array size, will the...
Replies
3
Views
3,511
Hi All, I have some job settings in an array of real[6], I would like to save into another array in order to be able to load those settings back...
Replies
12
Views
4,466
Hello All, I was wondering if there is a way to reset an array of timers by using a FLL or similar instruction. Timer[100] Thanks:beer:
Replies
17
Views
5,129
I have a tag called 'MBTCP.DATA.ReadData' INT[600] of which I would like to pull 16 sequential values into an add-on instruction. I will need...
Replies
6
Views
2,533
Back
Top Bottom