It is important to clearly understand what is different between functions and function blocks.
) is called once and it performs an action. This is synchronous.
) or "FB" is an instance that has its own set of data. A FB very likely maintains its own, internal machine state and very often has an output to indicate when the work is done. A FB is most likely to be asynchronous. The best way to work with a function block is to call it during multiple scan. This triggers the action the first time, then you may monitor the status of this action, especially via the "done" output.
|
Copyright © 2015 Kollmorgen™ |
|