CLX COP Question

scarince

Lifetime Supporting Member
Join Date
Jan 2009
Location
Dayton, OH
Posts
152
1769-L16ER-BB1B, ver. 24,

I can't figure out why a COP instruction will not work. I'm trying to copy a string array that is in a UDT into another string array.

The UDT is like this:

Name / Type
PartNumber / String
RecipeNumber / DINT

The array is 50 elements long, so it looks like this (I named the tag PartNumber):

PartNumber[0]
PartNumber[0].PartNumber (string)​
PartNumber[0].RecipeNumber (dint)​

etc, up to PartNumber[50]

I'm trying to copy into a regular tag called "View" (defined as string[50])

The COP is:

Source=PartNumber[0].PartNumber
Dest=View[0]
Length=50

The result is that it copies the very first element but no more.

It seems to have something to do with the UDT since this of course works for non-UDT's.

Am I trying to do something that can't be done like this? Should I use a true 2 dimensional array instead of this UDT structure?

Thanks.

B.
 
I deleted my previous response:

The source and destination must be the same to use with COP

Your View array must be defined as UDT as well

In your case you should be a loop logic or may be FAL
 
Last edited:
Since the source strings are not an array (the UDT tag is an array) it won't copy as you wish. Look at the FAL instruction to sequence through the UDT array copying each string individually to the target array.
 

Similar Topics

Controller: 1756-L84E v.35 Prosoft MVI56E-MNETC for ModbusTCP/IP I'm having an issue with some of my write commands. The write command that...
Replies
0
Views
197
I have several Avery scale units and they are configured as Generic Ethernet modules, and I am actually reading the data fine for the weight...
Replies
2
Views
424
What's the best way to move a tag value from the panelview+7 to the clx plc. We display amps from a power meter on the panelview screen, read in...
Replies
1
Views
400
I'm running into an issue migrating a PLC-5 using the newer Logix Designer Export when opening a saved .ACD from RSLogix-5. It has multiple RIO...
Replies
2
Views
620
We have two sites that are stranded with no line of site, they are handled by phone/modem with a chain that includes: Stranded site (client)...
Replies
5
Views
911
Back
Top Bottom