IO data for the MceManualMotion function.
Version history
0.2.0
Changes
- input
bEnableManualMode - jog to point function
- input
nOperatingMode
show full history
0.1.0
Changes
- first version
Overview
| name | type | default | comment |
|---|---|---|---|
| nMlxNumber | USINT | 0 | input: number of the MotoLogix system (for detecting changes) |
| nRobotNumber | USINT | 0 | input: motion device targeted by this function [0 to 3] |
| bEnableManualMode | BOOL | 0 | input: enable manual mode. Must be set to True to perform any manual motion |
| bSystemReady | BOOL | 0 | input: system ready for running motion commands |
| bInchingMode | BOOL | 0 | input: inching mode (single short motion at a time) |
| bIdle | BOOL | output: state machine: idle | |
| bBusy | BOOL | output: state machine: busy | |
| bCoasting | BOOL | output: state machine: coasting | |
| bDone | BOOL | output: state machine: done | |
| bError | BOOL | output: state machine: error | |
| nErrorCode | UDINT | 0 | output: state machine error code |
| aJogRobotAxisNeg | ARRAY [0..5] OF BOOL | [0, 0, 0, 0, 0, 0] | input: jog manipulator: negative direction |
| aJogRobotAxisPos | ARRAY [0..5] OF BOOL | [0, 0, 0, 0, 0, 0] | input: jog manipulator: positive direction |
| bMoveTo | BOOL | 0 | input: jog to target position |
| aTargetPosition | ARRAY [0..5] OF REAL | [0, 0, 0, 0, 0, 0] | input: target position for jog to point |
| bTargetType | BOOL | 0 | input: 0=Axis position [S,L,U,R,B,T]; 1=Cartesian position [X,Y,Z,Rx,Ry,Rz] |
| bUseRotationalSpeed | BOOL | 0 | input: 0=as linear speed (mm/s), 1=as rotational speed (deg/sec) |
| nAcc | SINT | 40 | input: acceleration [20 to 100%] |
| nDec | SINT | 80 | input: deceleration [20 to 100%] |
| aJogRobotAxisNegIndicator | ARRAY [0..5] OF BOOL | output: indicators for jog buttons | |
| aJogRobotAxisPosIndicator | ARRAY [0..5] OF BOOL | output: indicators for jog buttons | |
| bMoveToIndicator | BOOL | output: indicators for jog to position button | |
| nJogType | USINT | 0 | input: type of jog [0=axis, 1=cartesian (linear)] |
| nCoordFrame | USINT | 0 | input: coord frame for cartesian jog [0=world, 1=tool, 2=user] |
| nUserFrame | USINT | 0 | input: selected user frame for cartesian jog |
| nTool | USINT | 1 | input: selected tool for cartesian jog |
| fSpeed | REAL | 5 | input: speed rate [0.1 to 100% of maximum jog] |
| nSmManualMotion | UINT | 0 | in/out: state machine 1: motion commands |
| nSmSettings | UINT | 0 | in/out: state machine 2: update settings for cartesian motion |
| tIdleTime | TIME | T#10ms | input: waiting time between jog commands |
| tCoastTime | TIME | T#110ms | input: coasting time after last jog command (set to at least value of S3C1385) |
Details
nMlxNumber
USINTUsed as input
Specifies the number of the MotoLogix system mapped to this function.
This input is monitored for changes (will reset the state machine and send user frame and tool settings on the next jog command).
nRobotNumber
USINTUsed as input
Specifies the motion device targeted by this function.
| value | explanation |
|---|---|
| 0-3 | Robot number (use MLxRobotGetProperties to see the mapping). |
bEnableManualMode
BOOLUsed as input
Set to True to enable the manual mode.
While the manual mode is enabled, the FB is active and manual motions can be performed.
Disable this parameter when performing automatic motions (e.g. McePosTable).
bSystemReady
BOOLUsed as input
System ready for running motion commands.
This signal is produced by
MceStartStop
.
bInchingMode
BOOLUsed as input
In inching mode a rising edge of a jog input leads to just a single relative motion command with a very short travel distance. This is useful for the last really fine jog motions in scenarios where highest precision is required such as defining a user frame.
| Jog type | Travel distance |
|---|---|
axis (S/L/U/R/B/T) | 0.1 deg |
cartesian, translational (X/Y/Z) | 0.1 mm |
cartesian, rotational (Rx/Ry/Rz) | 0.1 deg |
bIdle
BOOLUsed as output
State machine in idle state.
bBusy
BOOLUsed as output
State machine in busy state.
bCoasting
BOOLUsed as output
State machine in coasting state.
bDone
BOOLUsed as output
State machine in done state.
bError
BOOLUsed as output
State machine in error state. For details see
nErrorCode
.
nErrorCode
UDINTUsed as output
Details on the state machine error.
Format aa.bbb
| value | explanation |
|---|---|
| a | number of the state machine (1=first, 2=second etc.) |
| b | state where the error occured |
aJogRobotAxisNeg
ARRAY [0..5] OF BOOLUsed as input
Jog manipulator axis in negative direction.
// nJogType 0 (axis)
[0] // S
[1] // L
[2] // U
[3] // R
[4] // B
[5] // T
// nJogType 1 (cartesian)
[0] // X
[1] // Y
[2] // Z
[3] // Rx
[4] // Ry
[5] // Rz
aJogRobotAxisPos
ARRAY [0..5] OF BOOLUsed as input
Jog manipulator axis in positive direction.
// nJogType 0 (axis)
[0] // S
[1] // L
[2] // U
[3] // R
[4] // B
[5] // T
// nJogType 1 (cartesian)
[0] // X
[1] // Y
[2] // Z
[3] // Rx
[4] // Ry
[5] // Rz
bMoveTo
BOOLUsed as input
Jog to
aTargetPosition
in the selected
nUserFrame
.
This function can be used to manually move the robot to a specific position (e.g. the home position).
If McePosTable is used for automatic motion, bMoveTo can also be used
to jog to a position registered in the PosTable.
It is convenient for testing a robot position at slow speed with the
possibility to stop the motion if a collision is going to occur.
aTargetPosition
ARRAY [0..5] OF REALUsed as input
Target position for the “jog-to-point” function (bMoveTo).
The position type depends on
aTargetType
value.
// aTargetType 0 (axis)
[0] // S
[1] // L
[2] // U
[3] // R
[4] // B
[5] // T
// aTargetType 1 (cartesian)
[0] // X
[1] // Y
[2] // Z
[3] // Rx
[4] // Ry
[5] // Rz
bTargetType
BOOLUsed as input
Select the target type of
aTargetPosition
.
| value | explanation |
|---|---|
| False | Axis position [S,L,U,R,B,T] |
| True | Cartesian position [X,Y,Z,Rx,Ry,Rz] |
bUseRotationalSpeed
BOOLUsed as input
Specifies how the speed setting for the jog to point motion should be interpreted.
By default, the speed setting for a motion to a TCP target position is interpreted as linear speed. That is fine for most cases. However, if the resulting motion of this entry has a big portion of TCP rotational motion and just little (or no) TCP translational motion, it will result in unexpected fast axis motion.
In such case, this parameter shall be set True.
| value | explanation |
|---|---|
| False | as linear speed (mm/s) |
| True | as rotational speed(deg/sec) |
nAcc
SINTUsed as input
Acceleration in % of maximum rated acceleration (range: 20-100%).
nDec
SINTUsed as input
Deceleration in % of maximum rated deceleration (range: 20-100%).
aJogRobotAxisNegIndicator
ARRAY [0..5] OF BOOLUsed as output
Connect these signals to the indicator lights of the jog buttons.
| value | explanation |
|---|---|
| off | jog not active |
| on | jog active |
aJogRobotAxisPosIndicator
ARRAY [0..5] OF BOOLUsed as output
Connect these signals to the indicator lights of the jog buttons.
| value | explanation |
|---|---|
| off | jog not active |
| on | jog active |
bMoveToIndicator
BOOLUsed as output
Connect this signal to the indicator light of the jog to position button.
| value | explanation |
|---|---|
| off | jog to position not active |
| on | jog to position active |
nJogType
USINTUsed as input
Type of jog motion.
| value | explanation |
|---|---|
| 0 | axis motion |
| 1 | cartesian motion (linear) |
nCoordFrame
USINTUsed as input
Coord frame for the cartesian jog motion.
This only applies to regular jog functions (e.g. aJogRobotAxisNeg),
not to jogging to a target position (bMoveTo).
| value | explanation |
|---|---|
| 0 | World frame |
| 1 | Tool frame (not available for jog to position) |
| 2 | User frame |
nUserFrame
USINTUsed as input
Selected user frame for cartesian jog (range: 0-GVL.USERFRAMES_UBOUND)
and for jogging to a target position (bMoveTo).
This input is monitored for changes. A change will activate the selected user frame on the next jog command or at standstill.
nTool
USINTUsed as input
Selected tool for cartesian jog (range: 0-63).
This input is monitored for changes. A change will activate the selected tool on the next jog command or at standstill.
fSpeed
REALUsed as input
Speed as percentage of rated maximum jog (range: 0.1-100%).
nSmManualMotion
UINTState machine 1: Handling the manual motion.
| value | explanation |
|---|---|
| 0 | idle, not ready for jog |
| 10 | ready for jog |
| 11 | jog selection |
| 15 | update TCP settings |
| 20 | jog axis with MLxRobotJogAxes |
| 21 | jog axis - idle time |
| 22 | jog axis - coasting |
| 25 | inch axis with MLxRobotMoveAxisRelative |
| 30 | jog TCP with MLxRobotJogTCP |
| 31 | jog TCP - idle time |
| 32 | jog TCP - coasting |
| 35 | inch TCP with MLxRobotMoveLinearRelative |
| 40 | jog to point - copy target data |
| 41 | jog to point - move axis |
| 42 | jog to point - move linear |
| 45 | jog to point - stop motion |
| 46 | jog to point - coasting |
| 50 | done |
| 99 | error |
nSmSettings
UINTState machine 2: Update settings for cartesian motion.
| value | explanation |
|---|---|
| 0 | idle |
| 10 | select tool with MLxRobotSelectTool |
| 20 | set user frame with MLxRobotSetUserFrame |
| 30 | zero-distance motion with MLxRobotMoveAxisRelative (to update actual position) |
| 40 | done |
| 99 | error |
tIdleTime
TIMEDefines a waiting time between consecutive jog commands. This allows other MotoLogix commands to be sent in between the flow of jog commands.
tCoastTime
TIMEDefines the coasting time which applies after the last jog command was processed. This is used by the state machine to determine when the jog motion has completed.
- This value should be set to at least the value of the jog coast
setting defined in robot parameter
S3C1385.
Source code
Declarations
(*IO data for the MceManualMotion function*)
TYPE MceManualMotionIO :
(*
* -----------------------------------------------------------------------------
* Name : MceManualMotionIO
* Version : 0.2.0
* Date : 2025-01-07
* Author : Rioual
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* IO data for the MceManualMotion function
* -----------------------------------------------------------------------------
*)
STRUCT
nMlxNumber : USINT := 0; (*input: number of the MotoLogix system (for detecting changes)*)
nRobotNumber : USINT := 0; (*input: motion device targeted by this function [0 to 3]*)
bEnableManualMode : BOOL := 0; (*input: enable manual mode. Must be set to True to perform any manual motion*)
bSystemReady : BOOL := 0; (*input: system ready for running motion commands*)
bInchingMode : BOOL := 0; (*input: inching mode (single short motion at a time)*)
bIdle : BOOL; (*output: state machine: idle*)
bBusy : BOOL; (*output: state machine: busy*)
bCoasting : BOOL; (*output: state machine: coasting*)
bDone : BOOL; (*output: state machine: done*)
bError : BOOL; (*output: state machine: error*)
nErrorCode : UDINT := 0; (*output: state machine error code*)
aJogRobotAxisNeg : ARRAY [0..5] OF BOOL := [0, 0, 0, 0, 0, 0]; (*input: jog manipulator: negative direction*)
aJogRobotAxisPos : ARRAY [0..5] OF BOOL := [0, 0, 0, 0, 0, 0]; (*input: jog manipulator: positive direction*)
bMoveTo : BOOL := 0; (*input: jog to target position*)
aTargetPosition : ARRAY [0..5] OF REAL := [0, 0, 0, 0, 0, 0]; (*input: target position for jog to point*)
bTargetType : BOOL := 0; (*input: 0=Axis position [S,L,U,R,B,T]; 1=Cartesian position [X,Y,Z,Rx,Ry,Rz]*)
bUseRotationalSpeed : BOOL := 0; (*input: 0=as linear speed (mm/s), 1=as rotational speed (deg/sec)*)
nAcc : SINT := 40; (*input: acceleration [20 to 100%]*)
nDec : SINT := 80; (*input: deceleration [20 to 100%]*)
aJogRobotAxisNegIndicator : ARRAY [0..5] OF BOOL; (*output: indicators for jog buttons*)
aJogRobotAxisPosIndicator : ARRAY [0..5] OF BOOL; (*output: indicators for jog buttons*)
bMoveToIndicator : BOOL; (*output: indicators for jog to position button*)
nJogType : USINT := 0; (*input: type of jog [0=axis, 1=cartesian (linear)]*)
nCoordFrame : USINT := 0; (*input: coord frame for cartesian jog [0=world, 1=tool, 2=user]*)
nUserFrame : USINT := 0; (*input: selected user frame for cartesian jog*)
nTool : USINT := 1; (*input: selected tool for cartesian jog*)
fSpeed : REAL := 5; (*input: speed rate [0.1 to 100% of maximum jog]*)
nSmManualMotion : UINT := 0; (*in/out: state machine 1: motion commands*)
nSmSettings : UINT := 0; (*in/out: state machine 2: update settings for cartesian motion*)
tIdleTime : TIME := T#10ms; (*input: waiting time between jog commands*)
tCoastTime : TIME := T#110ms; (*input: coasting time after last jog command (set to at least value of S3C1385)*)
END_STRUCT
END_TYPE