beckhoff TX1250 — 2.6 External set value generation

TwinCAT NC Master Axes Activation of the external setpoint generation: The adoption of the external setpoint specifications is initiated by an ADS axis function from the PLC with the function block MC_ExtSetPointGenEnable . The axis start types absolute (1) or relative (2) and, if sensible and required, the target position of the axis, are specified as parameters. This target position has either an absolute or relative effect, depending on the starting mode, and enables position and target position window monitoring (PEH). The activation of the external setpoint specification is thus similar to a conventional axis start.

A status bit from the status double word of the cyclic axis interface from the NC to the PLC provides information about the state, i.e. whether the external setpoint generation is active or inactive (see function AxisHasExtSetPointGen in TcNc.lib ). In order for the activation to be accepted without error, no axis error must be present, the controller and feed releases must be granted, the drive hardware must be ready to run and the axis must not be coupled (no slave). To be observed:

In case of an axis error (runtime error of the axis) or an axis reset (including edge change of the software controller enable) the external setpoint specification is automatically disabled (similar to an abortion of PTP axis positioning in case of a runtime error or axis reset). If only external setpoint generation is carried out, both absolute and relative start types are per- mitted.

If external setpoint generation is started in parallel or in addition to internal setpoint generation (PTP), only the relative starting mode is possible, since the internal positioning is ultimately al- ways converted to an absolute start, and it is not possible to have two absolute positions simulta- neously. Whilst external positioning can be activated during an active internal PTP positioning via the rela- tive start type, the opposite case is not permitted. If the external setpoint generation is already active and this is activated for the repeated time, then the start types must match, otherwise this is answered with an error.

The repeated activation of the external setpoint generation can be useful insofar as here the tar- get position is taken over each time and thus the target position window monitoring (PEH) is up- dated. Disabling the external setpoint generation: External setpoint specification is switched off from the PLC via the function block MC_ExtSetPointGenDisable . The above-mentioned status bit from the status double word of the cyclic axis interface from the NC to the PLC provides feedback (see function AxisHasExtSetPointGen in TcNc.lib ). After the deactivation of the external setpoint generation, the external set position is taken over for exactly one more cycle.

Specification of setpoints via the cyclic axis interface: After faultless activation of the external setpoint generation, in each PLC cycle a setpoint packet can now be created at the axis interface. A setpoint package consists of the external set position, target velocity, set acceleration and set direction (-1, 0, +1). The set direction is of particular importance here, because setpoints are only accepted and applied internally if this is not equal to zero (0: no movement). For the complete range of external setpoint generation, the direction flag therefore has to be set quasi-overlapping at the start and at the end. To be observed:

After resetting of the set direction to zero, the external set position is taken over for exactly one further SAF cycle. The set direction should already be set to a value not equal zero (i.e. -1 or +1 ) one cycle before and for one more cycle after the motion. This provides a safe time frame that is guaranteed to prevent a value being ignored, either at the start or at the end. TX1250 24 Version: 1.1