# Function block MCV_Axis

The FB MCV_Axis, which has an AXIS_REF structure as input/output variable, updates the data of an AXIS_REF structure. This FB also performs the following tasks:

- Logging an axis to the MCE via the HLI. This is done by setting the "plc_present_w" flag in the axis -specific HLI area
- Register the PLC via the HLI so that the PLC can command the MCE with spindle reset, controller enable, feed enable and drive ON for a specific axis.
- During initialisation, the consistency of the HLI is verified by checking the version identifier and the size of the HLI.
- Adoption of error messages reported by the MCE for each axis

In each PLC application which uses the PLCopen Part1 FB of the ISG-MCP, an instance of this FB must be created for each axis used and an AXIS_REF structure in the form of g_array_axis_ref[i] must be assigned to it as a VAR_IN_OUT parameter.

To ensure this, ISG-MCP contains the FB MCV_P1_PLATFORM (see Sec. MCV_P1_PLATFORM function block) which must be called in a program of a PLC application. This ensures that the working data of one axis is updated in every PLC cycle.

Providing AXIS_REF by the FB “MCV_Axis”

## Programing Example

Declaration and call in ST:

Declaration in ST:

cam_in_1 : MC_CamIn;

Call in ST:

cam_in_1 (Master:= g_array_axis_ref[0], Slave := g_array_axis_ref [1]);