i'm learning structured text, to program with Cx-programmer, an Omron software.
i' ve looked around but i can't find a way to assign multiple element to an array, i've tried this soluion, but it doesn't work,
this is Arrays declaration(internals variables):
Name Data type Initial value
SenCheck_Array BOOL[8] FALSE
SEN INT[2] 0
Array of INT:
SEN[1...2]:=[1,2];
Array of BOOL:
SenCheck_Array[0...7] := [ S_LF,S_LS,S_LH2O,S_LO,S_Col ,S_BAR,S_TAP,S_ET ] ;
The error is the same:
ERROR: Missing ]
i succeded in assigning element singularly, but i need to assign them in a single line.
Any help is apreciated:)
P.S: i'm using cx programmer educational edition.
Edit: This example (showing the declaration part of the SCL block code) is only valid for Siemens PLCs.
To initialize an array the values must be separated by a comma without square brackets: