I'm looking to simplyfy my code by using the FOR loop but how do I change the MasterStatusPortX
It should look something like what I have below but how do I attach that last tag using the "i" variable also
FOR i := 1 TO 8 DO
GVL.HMITags.MasterPortStatus[i]:= MasterStatusPort??
END FOR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to populate a large number of variables that looks like this.
GVL.HMITags.MasterPortStatus[1]:= MasterStatusPort1;
GVL.HMITags.MasterPortStatus[2]:= MasterStatusPort2;
GVL.HMITags.MasterPortStatus[3]:= MasterStatusPort3;
GVL.HMITags.MasterPortStatus[4]:= MasterStatusPort4;
GVL.HMITags.MasterPortStatus[5]:= MasterStatusPort5;
GVL.HMITags.MasterPortStatus[6]:= MasterStatusPort6;
GVL.HMITags.MasterPortStatus[7]:= MasterStatusPort7;
GVL.HMITags.MasterPortStatus[8]:= MasterStatusPort8;
I'm looking to simplyfy my code by using the FOR loop but how do I change the MasterStatusPortX
It should look something like what I have below but how do I attach that last tag using the "i" variable also
FOR i := 1 TO 8 DO
GVL.HMITags.MasterPortStatus[i]:= MasterStatusPort??
END FOR
in my opinion you have to make array of "MasterStatusPort" too.
FOR i := 1 TO 8 DO
GVL.HMITags.MasterPortStatus[i]:= MasterStatusPort[i]
END FOR