My requirement is that the number of input/output parameters to the FB should be a variable and when instantiating the FB, the required number of parameters can be specified. So one instance of the FB can have 2 IOs, another can have 10 etc. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think so using an array of [ * ] elements as input.
The mainnidea is to have 1 to n elements as input this way.
Within the FB you should loop over the 1..n elements using a FOR loop or something.
be sure to read help onnthis topic for further hints on using this mechanism.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My requirement is that the number of input/output parameters to the FB should be a variable and when instantiating the FB, the required number of parameters can be specified. So one instance of the FB can have 2 IOs, another can have 10 etc. Thanks!
Hi,
I think so using an array of [ * ] elements as input.
The mainnidea is to have 1 to n elements as input this way.
Within the FB you should loop over the 1..n elements using a FOR loop or something.
be sure to read help onnthis topic for further hints on using this mechanism.
I will check this out, thanks!
see
https://help.codesys.com/webapp/_cds_datatype_array;product=codesys;version=3.5.17.0#id3