I need to concatenate a string and an integer and a string into a variable - in this case an input.
The inputs are named as following:
DI_Section1_Valve AT %I*: BOOL;
DI_Section2_Valve AT %I*: BOOL;
DI_Section3_Valve AT %I*: BOOL;
Now, I want to loop through these (this is just a short example):
For i:= 1 TO 3 DO
Var[i] := NOT CONCAT(CONCAT('DI_Section', INT_TO_STRING(i)), '_Valve')
END_FOR
But by concatenating strings, I'll end up with a string, eg. 'DI_Section1_Valve', and not the boolean variable, eg. DI_Section1_Valve.
How do I end up with the variable instead of just the string? Any help is appreciated, thanks in advance. /Thoft99