Hello, Dear Nexidator, I understand what you said: “passing a reference to an OpconUnit into the FB means the FB is no longer independent from the Control plus infrastructure” , I think it's because each OpconUnit (in my case, the Cmd handler) is defined differently. Therefore, there is no way to reference something that can be applied to all OpconUnits. But is it possible to directly reference to the "SetEvent" method, and when calling the instance of the FB, pass the "XXXUnit.SetEvent" to it, since the SetEvent method might be the same for each different OpconUnit, and then could the independence of the FB be ensured in this way? I tried defining the input of the FB as: VAR_INPUT XXX : REFERENCE TO SetEvent; END_VAR but when building the solution, it throws an error saying : "Error Unknown type: 'SetEvent' ." Is this approach really unfeasible?
... View more