The PTOSimple function block manages the PTO function.
Call the function block in each cycle of the MAST task.
The function block instance name is the name defined by configuration.
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
This table describes the input variables:
Inputs |
Type |
Comment |
---|---|---|
ResetError |
BOOL |
On rising edge, resets the detected PTO error. NOTE: Set the Execute pin on any PTOMoveVelocity tied to the PTO00 axis toFALSE for resetting detected errors. |
DIS_AuxInput |
BOOL |
TRUE = disables the auxiliary input when configured as Drive Ready input. This pin has no effect when auxiliary input is not used or configured as Origin input. |
EN_SW_Limits |
BOOL |
Enable software limits. |
This table describes the output variables:
Outputs |
Type |
Comment |
---|---|---|
PTO_REF |
Reference to the PTO channel. To be used with the PTO_REF_IN input pin of the Administrative and Motion function blocks. |
|
PTOError |
BOOL |
TRUE = indicates that an error was detected. Use PTOGetDiag function block to get more information about this detected error. |
ProxLimitFault |
BOOL |
TRUE = indicates that the PROX input is TRUE during a homing command. |
Referenced |
BOOL |
TRUE = indicates that the PTO is executing a PTOMoveAbsolute. FALSE = indicates that the PTO is executing a PTOMoveRelative. |
Idle |
BOOL |
see table below. |
FreeCmdBuf |
BOOL |
see table below. |
Moving |
BOOL |
TRUE = indicates that the motion state is moving. |
Stopping |
BOOL |
TRUE = indicates that the motion state is stopping. |
Frequency |
DWORD |
Current velocity (in Hz) of the move. |
Position |
DINT |
Using PTOMoveRelative: Relative distance of the motion in pulses (relative to the actual position). Reset before starting a new move, latched at falling edge of Moving bit. Using PTOMoveAbsolute: Absolute position of the motion. |
Idle |
FreeCmdBuf |
Description |
---|---|---|
0 |
0 |
A move command is currently active while another move command is pending in the buffer. In both cases, no command to the buffer should be sent. Otherwise, an error will be detected and the current move will be aborted. |
0 |
1 |
A command is being executed, but the command buffer is free. A new command to the buffer can be send. |
1 |
0 |
Not relevant |
1 |
1 |
There are 2 cases: oThe buffer is free and no command is being executed. A new command to the buffer can be sent. oA PTO error had been detected and the PTO is in a stop state. The error state must be reset before sending a new command. |