AXFNC (axis functions)
Functions that are required when the equipment is started up after errors, to prepare an axis for normal operation, are assembled in this block. Only one function from this block may be active at any one time!
If a rising or falling edge is presented to more than one input the command with highest priority is sent to the axis.
The prorities of the function block inputs:
- Falling edge to SETDRIVE ( highest priority );
- Falling edge to MANFW;
- Falling edge to MANBW;
- Rising edge to SETDRIVE;
- Rising edge to MANFW;
- Rising edge to MANBW;
- Rising edge to RESET;
- Rising edge to CALIBR;
- Rising edge to SETPOS;
- Rising edge to SETTARG ( lowest priority );
Inputs
The block has the following inputs:
Input | Data type | Description |
---|---|---|
AXID | INT | ID of the axis (see System Manager) |
RESET | BOOL | Places the axis into a basic error-free state, as far as that may be logically and physically possible. It must not be triggered during movement, as this would abruptly halt the axis. |
CALIBR | BOOL | A rising edge at this input will initiate referencing of the selected axis. |
SETPOS | BOOL | Sets the actual value of an axis to the value supplied in 'Val', in accordance with the setting type given in 'Mode'. |
SETDRIVE | BOOL | A rising edge will result in the output value specified in 'Val' (usually a voltage) being sent to the controller assigned to the axis, in accordance with the specifications of the mode parameter. This means that the axis no longer operates under the influence of the controller. The controller enable must be set continuously during this function is active. The output is maintained until a falling edge occurs at 'SetDrive'. |
SETTARG | BOOL | Changes the destination of an axis while it is in operation. The new target position must be specified in 'Val'. The target position will be interpreted in accordance with the specification in the 'Mode' parameter. |
MODE | DWORD | Mode – see below |
VAL | LREAL | Contains the value required by the function being carried out: |
MANFW | BOOL | If the axis starts continuous movement at a rising edge in the direction of positive encoder counts, it will be stopped by a falling edge. The software limit switches are effective unless they have been deselected by the axis configuration. The desired velocity must be provided in 'Val'. Alternatively, the axis could be stopped by an instance of the AXACT or AXACTEX blocks. |
MANBW | BOOL | If the axis starts continuous movement at a rising edge in the direction of negative encoder counts, it will be stopped by a falling edge. The software limit switches are effective unless they have been deselected by the axis configuration. The desired velocity must be provided in 'Val'. Alternatively, the axis could be stopped by an instance of the AXACT or AXACTEX blocks. |
TMOUT | TIME | ADS Timeout-Delay |
Output | Data type | Description |
---|---|---|
BUSY | BOOL | This output remains TRUE until the block has executed a command, but at the longest for the duration supplied to the ‘Timeout’ input. While Busy = TRUE, no new command will be accepted at the inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored. |
ERR | BOOL | This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in ‘ErrorId’. If the block has a timeout error, ‘Error’ is TRUE and ‘ErrorId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs. |
ERRID | UDINT | Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of an instruction at the inputs. The error numbers in ErrId can be consulted in the ADS error documentation |
MODE: depending on the function being carried out, mode specifies the effect of the function more precisely:
Define | Set types for the actual value |
---|---|
1 | Absolute |
2 | Relative (± travel region) |
3 | Reserved |
4 | Reserved |
5 | Modulo (can also be larger than the modulo factor) |
Define | Drive output |
---|---|
1 | Drive output in % in the range [-100%, 100%] of the maximum range that can be set |
2 | Drive output as an absolute output speed (e.g. mm/s) |
Define | New target position |
---|---|
1 | Absolute |
2 | Relative (± travel region) |
3 | Reserved |
4 | Reserved |
5 | Modulo (can also be larger than the modulo factor) |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 | PC (i386) | PlcNc.Lib |
TwinCAT v2.8.0 | PC (i386) | TcNC.Lib |