Reputation: 387
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?
Upvotes: 1
Views: 1291
Reputation: 16
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
Upvotes: 0
Reputation: 3080
X
as global it will be accessible in your FB.X
variable as another input parameter. Simply call FB after you initialize X
variable.Upvotes: 0