MCV_ManModeKeys
The outputs of keys used as input elements to move axes in incremental or continuous jog mode are connected to this function block.
The following criteria must be met to ensure that an axis moves when these key are pressed:
The axis group to which an axis belongs must be in manual mode (see FB MCV_GrpOperationMode).
One of the incremental or continuous jog mode operation modes must be activated for the axis and the axis must be linked to an input element (see FB MCV_ManualMode).
Block diagram
FB parameters
VAR_INPUT | ||
Variable name | Data type | Description |
Enable | BOOL | If the input is TRUE, the commands applied to the inputs are commanded for each of the axis groups (NC channel) if they are in manual mode. |
KeyCmd | MCV_AY_MM_KEY_CMD | This input transfers the signals of manual mode keys so that the motion controller starts the corresponding motion. This is an array containing elements of the data structure MCV_MM_KEY_CMD. The array element [x] then affects all axes which are connected to the operating element where CtrlElemId = x + 1 (see FB MCV_ManMode, data structure MCV_MM_AX_SEL). |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Valid | BOOL | Is TRUE when TRUE is present at the “Enable” input. The function block then acts on the axis group in manual mode. |
Error | BOOL | Indicates TRUE when an error occurs. |
ErrorID | INT | Error identifier |
KeyState | MCV_AY_MM_KEY_STATE | The signals of the manual mode keys are output via this output. This is an array containing elements of the data structure MCV_MM_KEY_STATE. |
Attention
If axes in different axis groups which are in manual mode are connected to the same key pair, all these axes move when one of the key pair is pressed.
Data structure MCV_MM_KEY_CMD
This structure is used to transfer axis motion signals to the motion controller in incremental or continuous jog mode. The structure variables are used as follows:
- PosDir: is assigned TRUE if the key pair is assigned to move the connected axes in a positive direction.
- NegDir: is assigned TRUE if the key pair is assigned to move the connected axes in a negative direction.
- Rapid: is assigned TRUE if the connected axes are to execute the motion in rapid traverse.
Data structure MCV_MM_KEY_STATE
This data structure indicates the current state or a key pair.
- PosDirAct: indicates TRUE if a positive motion direction is commanded.
- NegDirAct: indicates TRUE if a negative motion direction is commanded.
- RapidAct: indicates TRUE if rapid traverse is selected.
- PosDirAvail: TRUE indicates that positive motion direction is not selected.
- NegDirAvail: TRUE indicates that negative motion direction is not selected.
- RapidAvail: TRUE indicates that rapid traverse is not selected.