How to use a CPS instruction in CompactLogix

nightline

Member
Join Date
Feb 2010
Location
Prinsenbeek
Posts
425
Gents,

I've a recipe program which uses UDT which has 58 int's / bool / dint's.
I like to copy UDT[0] to UDT [1].
What should be the lenght ?

Is this 1 or 58 ?......

Jack
 
Use a Length of 1.

The COP and CPS instructions in ControlLogix operate on the number of elements of the Destination data type, not the number of bits, bytes, words, or dwords.
 
Oke, so that part seems to be right.

The strange thing is that only a part of the data from UDT[0] is copied to UDT[1].....

I'm using an ONS in front of the CPS, is this maybe the thing which gives the trouble? Or do the CPS not need an ONS ?
 
Last edited:
Are you certain both tags of of the exact same UDT data type ? Can you post an example of the *.ACD file ?
 
Be certain you are addressing the whole UDT, not the first element.

The destination should be "mytag [2]", not "mytag[2].element"
 
Well it seems that the file size is to big to post as a free member....

try doing a File SaveAs - and save it as a TYPE = .L5K ... that usually makes the saved file a LOT smaller ... then ZIP the resulting file and see if you can post that ... also tell the forum what RSLogix5000 version number you're using ...
 
Well, I don't know why, but the "attach files" button on this site won't work...

So I try to explane what I got:
I've an UDT like discibed above called BagRecipeDataFile.
I've created an array of 100 UDT's called BagRecipeStore.
I've a rung with:

---||---|ons|----CPS----

The CPS has: Source = BagRecipeStore[0]
Destination = BagRecipeStore[1]
Length = 1

If the right Recipe is found, the input of the rung comes true, and stays true till the next search commando is given.

The strange thing is, that it works time after time on my desk, but it fails in the machine....

I'm using RSLogix 5000 Version 18
 
Last edited:

Similar Topics

Using Studio 5000 Version 28.02 Professional Processor is a ControlLogix L73S with L7SP safety partner I always use the Synchronous Copy [CPS]...
Replies
15
Views
4,619
Dear all, In RS Logix 5000 i m using the CPS instruction to copy an UDT with 8 strings & 1 DINT tag in it. While the rung is executed sometimes...
Replies
2
Views
1,251
I was having an issue where I would use the CPS instruction to copy a sint value to a string value( len=decimal , data= sint[82]) The data values...
Replies
2
Views
2,807
Hi, I wish to verify the CPS instruction using RSLogix 5000 v20 on Controllogix PLC. Is there any method i could do this and generate a...
Replies
1
Views
4,248
I very rarely work with STRINGS and can't remember the last time. I've attached a l5k file that contains four rungs where I'm simulating...
Replies
6
Views
1,725
Back
Top Bottom