Step 3: HelloWorld program: Instancing PLCopen FBs
The FB instances listed below are required to execute the task and are created in the HelloWorld program in which the motion task is to be implemented:
Instances of the FBs used in the HelloWorld program
PLCopen FB | Instance name | Remarks |
MC_Power | MC_Power_1 | Serves to set controller and feed enabling |
MC_ReadActualPosition | MC_ReadActualPosition_1 | Shows the position of the axis at the OUT variable "position" |
MC_MoveRelative | MC_MoveRelative_1 | Moves the axis by the value of the IN variable "distance" relative to the current position. |
The figure below shows the variables definition area in which the required function blocks are defined and how they are displayed in the CFC editor.