ryangriggs
Lifetime Supporting Member
Hello, I'm trying to copy the entire value of a UDT base tag to an element of an array of another UDT containing an element of the first UDT:
MyFirstUDT:
- SomeElement(DINT)
- AnotherElement(REAL)
MySecondUDT:
- AnElement(DINT)
- AnElement2(BOOL)
- ...
- DATA(MyFirstUDT)
Tags:
TemporaryTag (MyFirstUDT)
ArrayOfElements[10] (MySecondUDT)
I want to copy the entire UDT from "TemporaryTag" to "ArrayOfElements[0].DATA", so I am doing this:
However, RSLogix5000 throws the following two errors on verifying the rung:
Error: Rung 1, MOV, Operand 0: Invalid data type. Argument must match parameter data type.
Error: Rung 1, MOV, Operand 1: Invalid data type. Argument must match parameter data type.
Why can't I MOV the UDT tag's values into the element of the destination tag? And how would this be accomplished, other than MOVing each member of the DATA element individually (there are about 50 members of this UDT).
Thanks for any insight.
MyFirstUDT:
- SomeElement(DINT)
- AnotherElement(REAL)
MySecondUDT:
- AnElement(DINT)
- AnElement2(BOOL)
- ...
- DATA(MyFirstUDT)
Tags:
TemporaryTag (MyFirstUDT)
ArrayOfElements[10] (MySecondUDT)
I want to copy the entire UDT from "TemporaryTag" to "ArrayOfElements[0].DATA", so I am doing this:
---[true]-------| MOV |---
| Source: TemporaryTag |
| Dest: ArrayOfElements[0].DATA |
However, RSLogix5000 throws the following two errors on verifying the rung:
Error: Rung 1, MOV, Operand 0: Invalid data type. Argument must match parameter data type.
Error: Rung 1, MOV, Operand 1: Invalid data type. Argument must match parameter data type.
Why can't I MOV the UDT tag's values into the element of the destination tag? And how would this be accomplished, other than MOVing each member of the DATA element individually (there are about 50 members of this UDT).
Thanks for any insight.
Last edited: