Step 5: Connect variables to FB in-/output variables
Local defined variables will be connected to the necessary and interesting in-/outputs of the PLCopen FBs. These local variables can be forced while the PLC application is running. Default values of the local variables are listed in the table below.
Variable | Data type | Default value |
---|---|---|
Instanz MC_Power_1 |
|
|
EnablePower | BOOL | FALSE |
EnablePositive | BOOL | FALSE |
EnableNegative | BOOL | FALSE |
Instanz MC_ReadActualPosition_1 |
|
|
EnableReadActPos | BOOL | TRUE |
Position | REAL |
|
Instanz MC_MoveRelative_1 |
|
|
Distance | REAL | 100000.0 |
Velocity | REAL | 10000.0 |
Acceleration | REAL | 2000.0 |
Deceleration | REAL | 2000.0 |
Jerk | REAL | 2000.0 |
Done | BOOL |
|
Now the local variables are defined in variables definition area and some of them are initialized with a default value. Within the CFC editor the variables connected to the FBs in-/output pins are recognizable:
![Step 5: Connect variables to FB in-/output variables 1:](Images/jpg/15303341451__en-US__Web.jpg)