Logic, a loop for an array with type variables
Hello,
I have a type BatteryInRack:
Voltage: real;
Ready: bool;
and a type BatteryRack:
Battery1: BatteryInRack
Battery2: BatteryInRack
Battery3: BatteryInRack
...
I have in Logic a variable:
BatteryRack: BatteryRack
I try to assign a value to the Voltage value, for example:
for i:= 1 to 3 do
BatteryRack[i]:= i;
end_for;
But it isn't work.
Is there a way to assign the value in a Loop?
Thank you in advance.
This is a migrated post! Originally posted on 08.05.2018 by user genakust. Please be aware that information can be outdated.