I have several controls (ie motors) running that have a structure for all related tags
Code:
TYPE stSensors:
STRUCT
EU: real;
DU: word;
Level_L: real;
.. etc
END_STRUCT
END_TYPE
then use the structure for sensors
Code:
Sensor1: stSensors;
Sensor2: stSensors;
Motor1: stMotors;
etc
When you'd have these tags defined individually you could list an initial value so that it is not zero
Code:
Sensor1_LevelHH: REAL := 25.0;
I'd like to do the same with the tags defined in the structure, but the same structure is used several times, meaning I can't define these initial values in the structure definition.
My question: Is there a way to set initial values for each structure instance?
Code:
Sensor1.LevelHH := 25.0;
Sensor2.LevelHH := 23.3;
Sensor3.LevelHH := 5.0;
etc.
Thanks!