Commissioning
EL70x1168 Version: 4.4
Fig.191: Required libraries
Once this is done, certain global variables are declared (see Fig. Global variables). The data types
PLCTONC_AXLESTRUCT and NCTOPLC_AXLESTRUCT deal with the communication between the PLC
and the NC.
Fig.192: Global variables
Once the global variables have been declared, programming can commence. Start with declaring local
variables (see Fig. Local variables).
MC_Direction is an enumeration type that specifies the direction of movement for the MC_MoveVelocity
function block, which in turn initiates continuous travel of the motor.
An axis reset is carried out with the MC_Reset function block. Absolute positioning is carried out with the
MC_MoveAbsolute function block. The current axis position can be read with the MC_ActualPosition function
block.
MC_Power enables the axis; MC_Stop is required for stopping the axis.
Fig.193: Local variables
The program code is as follows (see Fig. Program code):