Functional Description

Device - <name device module>

The Device Module implements the device Lexium 32S for Sercos. This device is added under the Sercos Master with the name selected within the Add Function From Template dialog box.

Global Variable List - GVL_<name device module>

The Device Module implements a GVL. This GVL is added under the Application node within a folder with the name selected within the Add Function From Template dialog box. The GVL gets the same name as the folder and the device but with the prefix GVL_.

The GVL contains the variables which build the interface from the implemented program code of the application. The clear name of the GVL and the uniform naming of the variables facilitate a simple and structured implementation in the application.

Program - Prg_<name device module>

The Device Module implements a program. This program is added under the Application node within a folder with the name selected within the Add Function From Template dialog box. The program gets the same name as the folder and the device but with the prefix SR_. Additionally, the program-call is added automatically to a task with the name MOTION. If this task is not present it is created. Verify whether the task configuration of the created task meets the requirements for your application.

For basic control functions, the program code does not need to be modified, all required signals and parameter are linked to the associated variables in the GVL.

The program is divided into several subroutines, referred to as actions. These are described in the following table.

Name of the action

Description

Init

Is called only at the very first cycle of the program and contains initialization of particular variables.

AxisConfig

Contains programmatic configuration of the axis. Once the configuration steps have been completed successfully this action is no longer called.

AxisControl

Contains a selection of function block calls to control the axis. Each function block is called in each program cycle.

AxisState

Processes the status information from the axis and the Sercos slave device and assigns them to the corresponding variables from the associated GVL.

FbErrorCheck

Contains the logic for the evaluation of the error messages which are provided by the motion control (MC_) function blocks.

Further information about the control logic is available in the comments of the program.

Visualization - Vis_<name device module>

The Device Module implements a visualization to control and monitor the provided functions. It is added in the same folder as the program and the GVL with the same name but with the prefix Vis_.