I have a FB (SmartLogic) with two boolean input variables and one output variable, but I want the output to depend of a parameter X too which i want to set during instantiation before the FB is called. Is that possible? And how do I do that?
Asked
Active
Viewed 813 times
2 Answers
0
- If you define
X
as global it will be accessible in your FB. - You can pass
X
variable as another input parameter. Simply call FB after you initializeX
variable.

Sergey Romanov
- 2,949
- 4
- 23
- 38
0
You can initialize FBs variables with the FB_Init method.
In CoDeSys help there is information about this methods.
https://help.codesys.com/webapp/_cds_method_fb_init_fb_reinit;product=codesys;version=3.5.16.0

loraul
- 16