MceManualMotionIO

0.2.0
Jog 

IO data for the MceManualMotion function.

Version history

0.2.0

  Rioual

Changes

Added:
  • input bEnableManualMode
  • jog to point function
Removed:
  • input nOperatingMode
show full history

0.1.0

  deGroot

Changes

Added:
  • first version

Overview

nametypedefaultcomment
nMlxNumberUSINT0input: number of the MotoLogix system (for detecting changes)
nRobotNumberUSINT0input: motion device targeted by this function [0 to 3]
bEnableManualModeBOOL0input: enable manual mode. Must be set to True to perform any manual motion
bSystemReadyBOOL0input: system ready for running motion commands
bInchingModeBOOL0input: inching mode (single short motion at a time)
bIdleBOOLoutput: state machine: idle
bBusyBOOLoutput: state machine: busy
bCoastingBOOLoutput: state machine: coasting
bDoneBOOLoutput: state machine: done
bErrorBOOLoutput: state machine: error
nErrorCodeUDINT0output: state machine error code
aJogRobotAxisNegARRAY [0..5] OF BOOL[0, 0, 0, 0, 0, 0]input: jog manipulator: negative direction
aJogRobotAxisPosARRAY [0..5] OF BOOL[0, 0, 0, 0, 0, 0]input: jog manipulator: positive direction
bMoveToBOOL0input: jog to target position
aTargetPositionARRAY [0..5] OF REAL[0, 0, 0, 0, 0, 0]input: target position for jog to point
bTargetTypeBOOL0input: 0=Axis position [S,L,U,R,B,T]; 1=Cartesian position [X,Y,Z,Rx,Ry,Rz]
bUseRotationalSpeedBOOL0input: 0=as linear speed (mm/s), 1=as rotational speed (deg/sec)
nAccSINT40input: acceleration [20 to 100%]
nDecSINT80input: deceleration [20 to 100%]
aJogRobotAxisNegIndicatorARRAY [0..5] OF BOOLoutput: indicators for jog buttons
aJogRobotAxisPosIndicatorARRAY [0..5] OF BOOLoutput: indicators for jog buttons
bMoveToIndicatorBOOLoutput: indicators for jog to position button
nJogTypeUSINT0input: type of jog [0=axis, 1=cartesian (linear)]
nCoordFrameUSINT0input: coord frame for cartesian jog [0=world, 1=tool, 2=user]
nUserFrameUSINT0input: selected user frame for cartesian jog
nToolUSINT1input: selected tool for cartesian jog
fSpeedREAL5input: speed rate [0.1 to 100% of maximum jog]
nSmManualMotionUINT0in/out: state machine 1: motion commands
nSmSettingsUINT0in/out: state machine 2: update settings for cartesian motion
tIdleTimeTIMET#10msinput: waiting time between jog commands
tCoastTimeTIMET#110msinput: coasting time after last jog command (set to at least value of S3C1385)

Details

nMlxNumber

USINT
(optional, default: 0)

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
(default: 0)

Used as input

Specifies the motion device targeted by this function.

valueexplanation
0-3Robot number (use MLxRobotGetProperties to see the mapping).

bEnableManualMode

BOOL
(default: 0)

Used 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

BOOL
(default: 0)

Used as input

System ready for running motion commands. This signal is produced by MceStartStop .

bInchingMode

BOOL
(default: 0)

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 typeTravel 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
(default: 0)

Used as output

Details on the state machine error.

Format aa.bbb

valueexplanation
anumber of the state machine (1=first, 2=second etc.)
bstate where the error occured

aJogRobotAxisNeg

ARRAY [0..5] OF BOOL
(default: [0, 0, 0, 0, 0, 0])

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
(default: [0, 0, 0, 0, 0, 0])

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

bMoveTo

BOOL
(default: 0)

Used 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 REAL
(default: [0, 0, 0, 0, 0, 0])

Used 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

BOOL
(default: 0)

Used as input

Select the target type of aTargetPosition .

valueexplanation
FalseAxis position [S,L,U,R,B,T]
TrueCartesian position [X,Y,Z,Rx,Ry,Rz]

bUseRotationalSpeed

BOOL
(default: 0)

Used 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.

valueexplanation
Falseas linear speed (mm/s)
Trueas rotational speed(deg/sec)

nAcc

SINT
(default: 40)

Used as input

Acceleration in % of maximum rated acceleration (range: 20-100%).

nDec

SINT
(default: 80)

Used as input

Deceleration in % of maximum rated deceleration (range: 20-100%).

aJogRobotAxisNegIndicator

ARRAY [0..5] OF BOOL

Used as output

Connect these signals to the indicator lights of the jog buttons.

valueexplanation
offjog not active
onjog active

aJogRobotAxisPosIndicator

ARRAY [0..5] OF BOOL

Used as output

Connect these signals to the indicator lights of the jog buttons.

valueexplanation
offjog not active
onjog active

bMoveToIndicator

BOOL

Used as output

Connect this signal to the indicator light of the jog to position button.

valueexplanation
offjog to position not active
onjog to position active

nJogType

USINT
(default: 0)

Used as input

Type of jog motion.

valueexplanation
0axis motion
1cartesian motion (linear)

nCoordFrame

USINT
(default: 0)

Used 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).

valueexplanation
0World frame
1Tool frame (not available for jog to position)
2User frame

nUserFrame

USINT
(default: 0)

Used 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

USINT
(default: 1)

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
(default: 5)

Used as input

Speed as percentage of rated maximum jog (range: 0.1-100%).

nSmManualMotion

UINT
(default: 0)

State machine 1: Handling the manual motion.

valueexplanation
0idle, not ready for jog
10ready for jog
11jog selection
15update TCP settings
20jog axis with MLxRobotJogAxes
21jog axis - idle time
22jog axis - coasting
25inch axis with MLxRobotMoveAxisRelative
30jog TCP with MLxRobotJogTCP
31jog TCP - idle time
32jog TCP - coasting
35inch TCP with MLxRobotMoveLinearRelative
40jog to point - copy target data
41jog to point - move axis
42jog to point - move linear
45jog to point - stop motion
46jog to point - coasting
50done
99error

nSmSettings

UINT
(default: 0)

State machine 2: Update settings for cartesian motion.

valueexplanation
0idle
10select tool with MLxRobotSelectTool
20set user frame with MLxRobotSetUserFrame
30zero-distance motion with MLxRobotMoveAxisRelative (to update actual position)
40done
99error

tIdleTime

TIME
(optional, default: T#10ms)

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
(optional, default: T#110ms)

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.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

Pages built with Hugo - 28 Oct 2025 16:37 CET