MceManualMotionIO

0.1.0
jog 

IO data for the MceManualMotion function.

Version 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]
nOperatingModeUSINT0input: machine operating mode [0=none, 1=manual, 2=semi-auto, 3=auto]
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
aJogRobotAxisNegIndicatorARRAY [0..5] OF BOOLoutput: indicators for jog buttons
aJogRobotAxisPosIndicatorARRAY [0..5] OF BOOLoutput: indicators for jog buttons
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).

nOperatingMode

USINT
(default: 0)

Machine operating mode. This signal is produced by MceOperatingMode .

valueexplanation
0none
1manual mode
2semi-automatic mode (step by step)
3automatic mode

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

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

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.

valueexplanation
0World frame
1Tool frame
2User frame

nUserFrame

USINT
(default: 0)

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

Pages built with Hugo - 23 Apr 2024 11:54 CEST