scarince
Lifetime Supporting Member
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]
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 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.