IO data for the MceManualMotion function.
Version 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] |
nOperatingMode | USINT | 0 | input: machine operating mode [0=none, 1=manual, 2=semi-auto, 3=auto] |
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 |
aJogRobotAxisNegIndicator | ARRAY [0..5] OF BOOL | output: indicators for jog buttons | |
aJogRobotAxisPosIndicator | ARRAY [0..5] OF BOOL | output: indicators for jog buttons | |
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
USINT
Used 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
USINT
Used as input
Specifies the motion device targeted by this function.
value | explanation |
---|---|
0-3 | Robot number (use MLxRobotGetProperties to see the mapping). |
nOperatingMode
USINT
Machine operating mode.
This signal is produced by
MceOperatingMode
.
value | explanation |
---|---|
0 | none |
1 | manual mode |
2 | semi-automatic mode (step by step) |
3 | automatic mode |
bSystemReady
BOOL
Used as input
System ready for running motion commands.
This signal is produced by
MceStartStop
.
bInchingMode
BOOL
Used 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
BOOL
Used as output
State machine in idle state.
bBusy
BOOL
Used as output
State machine in busy state.
bCoasting
BOOL
Used as output
State machine in coasting state.
bDone
BOOL
Used as output
State machine in done state.
bError
BOOL
Used as output
State machine in error state. For details see
nErrorCode
.
nErrorCode
UDINT
Used 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 BOOL
Used 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 BOOL
Used 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
aJogRobotAxisNegIndicator
ARRAY [0..5] OF BOOL
Used 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 BOOL
Used as output
Connect these signals to the indicator lights of the jog buttons.
value | explanation |
---|---|
off | jog not active |
on | jog active |
nJogType
USINT
Used as input
Type of jog motion.
value | explanation |
---|---|
0 | axis motion |
1 | cartesian motion (linear) |
nCoordFrame
USINT
Used as input
Coord frame for the cartesian jog motion.
value | explanation |
---|---|
0 | World frame |
1 | Tool frame |
2 | User frame |
nUserFrame
USINT
Used as input
Selected user frame for cartesian jog (range: 0-GVL.USERFRAMES_UBOUND
).
This input is monitored for changes. A change will activate the selected user frame on the next jog command or at standstill.
nTool
USINT
Used 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
REAL
Used as input
Speed as percentage of rated maximum jog (range: 0.1-100%
).
nSmManualMotion
UINT
State 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 |
50 | done |
99 | error |
nSmSettings
UINT
State 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
TIME
Defines a waiting time between consecutive jog commands. This allows other MotoLogix commands to be sent in between the flow of jog commands.
tCoastTime
TIME
Defines 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.1.0
* Date : 2022-04-14
* Author : deGroot
* 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]*)
nOperatingMode : USINT := 0; (*input: machine operating mode [0=none, 1=manual, 2=semi-auto, 3=auto]*)
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*)
aJogRobotAxisNegIndicator : ARRAY [0..5] OF BOOL; (*output: indicators for jog buttons*)
aJogRobotAxisPosIndicator : ARRAY [0..5] OF BOOL; (*output: indicators for jog buttons*)
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