bar1:STRUCT_BAR:=(b1:=val1,b2:=val2);bar2:STRUCT_BAR:=(b1:=val1,b2:=val2);foo:ARRAY[1..2]OFFB_FOO[(bar1),(bar2)];// or like FB_FOO[(bar1,bar2)] and other variations I could think of
The compile error would look something like: [ERROR] C0032: Cannot convert type STRUCT_BAR to type POINTER TO FB_FOO
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Trying to figure out how to initialize an array of FB, where the FB itself is initialized with a STRUCT (through the FB_Init).
This works:
This does not:
The compile error would look something like:
[ERROR] C0032: Cannot convert type STRUCT_BAR to type POINTER TO FB_FOO
Thanks!
Figured it out ...
It seems that is not possible to pass diferent parameters to the array fb initialization.
You can, but, initiqlize internal variables as in structures. ( An fb is an structure too).
Se the post
l viewtopic.php?p=16838#p16838 l
Be healty!