Data structure AXIS_REF

PLCopen requires the supply of a structure that goes by the name of AXIS_REF. It must be transferred to the individual FBs as VAR_IN_OUT parameter to identify an axis. As defined by PLCopen, the contents of the AXIS_REF structure are specific to each manufacturer. In the version realised by ISG, AXIS_REF contains a variable hli_axis_idx for the axis index with which an axis-specific area on the HLI can be addressed.

This axis index is assigned once in every PLC project by calling the FB MCV_PlatformBase.

This structure also contains working data that has to be kept for each axis at the PLC end. This includes the current state of the axis state diagram (Axis State Diagram – AXSD) in accordance with PLCopen, an array for the last six error messages that were reported by the MCE for an axis and a few other items of working data.

Attention

attention

Before the application can access the axis-specific area of the HLI, the structure AXIS_REF must contain the axis state axsd_state > 0. This ensures that the motion libraries have initialised all the necessary safety processes (see example).

Example

example

IF Axis.axsd_state > 0 (*INIT_STATE*) THEN

    (* Access to axis-specific HLI area allowed*)

    hli_axis_idx := Axis.hli_axis_idx;

    hli.axis[hli_axis_idx].