I need to move values from a UDT to a new array.
Currently I am using:
HMI_BZ_PS[00] := XtrA_Bz1.PS;
HMI_BZ_PS[01] := XtrA_Bz2.PS;
HMI_BZ_PS[02] := XtrA_Bz3.PS;
HMI_BZ_PS[03] := XtrA_Bz4.PS;
HMI_BZ_PS[04] := XtrA_Bz5.PS;
But I have a lot of these to do. In the past I have been able to move large amounts of data using the following:
For i := 1 to 11 by 1
Do
OfflineDie_Zone_Heat_Cntrl.PS := HMI2CLx_REAL_OfflineDie_PS;
End_For;
I am wondering if there is a way to to add another variable to have it do the same function but to have it fill in number in the tag also:
HMI_BZ_PS := XtrA_Bz(b).PS;
HMI_BZ_PS := XtrA_Bz(b).PS;
HMI_BZ_PS := XtrA_Bz(b).PS;
Currently I am using:
HMI_BZ_PS[00] := XtrA_Bz1.PS;
HMI_BZ_PS[01] := XtrA_Bz2.PS;
HMI_BZ_PS[02] := XtrA_Bz3.PS;
HMI_BZ_PS[03] := XtrA_Bz4.PS;
HMI_BZ_PS[04] := XtrA_Bz5.PS;
But I have a lot of these to do. In the past I have been able to move large amounts of data using the following:
For i := 1 to 11 by 1
Do
OfflineDie_Zone_Heat_Cntrl.PS := HMI2CLx_REAL_OfflineDie_PS;
End_For;
I am wondering if there is a way to to add another variable to have it do the same function but to have it fill in number in the tag also:
HMI_BZ_PS := XtrA_Bz(b).PS;
HMI_BZ_PS := XtrA_Bz(b).PS;
HMI_BZ_PS := XtrA_Bz(b).PS;