MceStartStopIO

0.3.0
System 

IO data for the MceStartStop function.

Version history

0.3.0

  Rioual

Changes

Added:
  • Input bHold
  • Output bHoldActive
Changed:
  • Rename bSystemReady to bServoOn
  • Output bServoOn is now TRUE at state 50
  • Rename bStopIndicator to bSystemStopped
Removed:
  • Output bStartIndicator
  • blinking behavior on bSystemStopped
show full history

0.2.0

  deGroot

Changes

Changed:
  • number the state machines

0.1.0

  Rioual

Changes

Added:
  • first version

Overview

nametypedefaultcomment
bExternalConditionsOkBOOL0input: external conditions for executing motion commands
bStartBOOL0input: enable the servos (uses rising edge)
bStopBOOL0input: stop/abort (uses rising edge)
bHoldRestartBOOL0input: hold/restart (uses rising edge)
bFlushBOOL0input: stop and flush the motion queue (uses rising edge)
bServoOnBOOLoutput: state machine: servo on. Servos are enabled and system is ready for processing motion commands
bIdleBOOLoutput: state machine: idle. Robot controller servos are off
bHoldActiveBOOLoutput: state machine: held. Trajectory is suspended
bErrorBOOLoutput: state machine: error
nErrorCodeUDINT0output: state machine error code
nSmStartStopUINT0in/out: state machine 1: start/stop sequence
nSmSpeedOverrideUINT0in/out: state machine 2: speed override
fSpeedOverrideREAL100.0input: for overriding the programmed speed [0 to 150%]
nSmStartStopTimeDINToutput: elapsed time in current state of StartStop state machine [ms]
nSmSpeedOverrideTimeDINToutput: elapsed time in current state of SpeedOverride state machine [ms]

Details

bExternalConditionsOk

BOOL
(default: 0)

Used as input

Chain all required external conditions for executing motion commands to this input. Typical conditions are:

  • Machine operating mode
  • Safety circuit OK (fence/light curtains etc.)

Note: internal conditions (e.g. communication ok or pendant keyswitch) are already handled in the function and do not need to be connected here.

bStart

BOOL
(default: 0)

Used as input

A rising edge of this input will start the system by enabling the servos.

This input can be connected to an HMI momentary button and if applicable, to a higher level state machine (e.g. machine operating mode).

bStop

BOOL
(default: 0)

Used as input

A rising edge of this input will stop/abort the system.

This input can be connected to an HMI momentary button and if applicable, to a higher level state machine (e.g. machine operating mode).

bHoldRestart

BOOL
(default: 0)

Used as input

A rising edge of this input will hold/restart the system. If the robot is moving, a rising edge on this signal will hold the trajectory. If the robot is in held state (bHoldActive = TRUE), a rising edge will resume the trajectory.

This input can be connected to an HMI momentary button and if applicable, to a higher level state machine (e.g. machine operating mode).

bFlush

BOOL
(default: 0)

Used as input

A rising edge of this input will stop the motion and flush (clear) the motion queue. This is useful to abort the current trajectory in order to immediately send new motion commands.

If applicable, this input can be connected to a higher level state machine (e.g. order processing)

bServoOn

BOOL

Used as output

State machine is in servo on state.

This tells the servos are enabled. The system is ready for processing motion commands.

This output can be used as condition by lower level state machines which issue motion commands (e.g. PosTable).

bIdle

BOOL

Used as output

State machine is in idle state.

The robot controller servos are off.

bHoldActive

BOOL

Used as output

State machine is in hold state.

The robot controller is in Held mode.

The servos are ON and the trajectory is paused.

The trajectory can be resumed with a rising edge on bHoldRestart .

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

nSmStartStop

UINT
(default: 0)

State machine 1: Handling the start/stop sequence.

valueexplanation
0idle, not ready for start
1ready for start
10reset system with MLxReset
20enable system with MLxEnable
30system ready for processing motion commands
35hold motion with MLxHold
40system held (restart with start button)
45restart motion with MLxRestart
50stop and flush buffered motions with MLxStop
51reset system with MLxReset
60finish buffered motions
70abort motion and disable system with MLxAbort
99state machine error

nSmSpeedOverride

UINT
(default: 0)

State machine 2: Handling the speed override.

valueexplanation
0idle
10send speed override with MLxSetGlobalParameter
99state machine error

fSpeedOverride

REAL
(default: 100.0)

Used as input

Setting for overriding the programmed speed (range: 0-150%).

If a change is detected the internal state machine will send the new speed override setting to the robot controller using the MLxSetGlobalParameter function, with very quick response time. The state machine uses an idle time to prevent an overload of MLxSetGlobalParameter function calls when continuously changing the setting.

The speed override allows to slow down the robot motion all the way to standstill, making it an alternative for the hold function.

By setting a speed larger than 100% you can test your cycle at a faster speed (capped by the manipulator speed limits).

This input is typically connected to an HMI element (e.g. input field or slider) or a hand wheel.

nSmStartStopTime

DINT

Used as output

Elapsed time in current state of the Start/Stop ( nSmStartStop ) state machine.

Value is in ms.

nSmSpeedOverrideTime

DINT

Used as output

Elapsed time in current state of the Speed Override ( nSmSpeedOverride ) state machine.

Value is in ms.

Source code

Declarations

(*IO data for the MceStartStop function*)
TYPE MceStartStopIO : 

(*
 * -----------------------------------------------------------------------------
 * Name               : MceStartStopIO
 * Version            : 0.3.0
 * Date               : 2024-12-12
 * Author             : Rioual
 * Family             : YaskawaMce
 * Organisation       : github.com/YaskawaEurope/mlx-examples
 * 
 * -----------------------------------------------------------------------------
 * IO data for the MceStartStop function
 * -----------------------------------------------------------------------------
 *)

STRUCT
  bExternalConditionsOk : BOOL := 0; (*input: external conditions for executing motion commands*)
  bStart : BOOL := 0; (*input: enable the servos (uses rising edge)*)
  bStop : BOOL := 0; (*input: stop/abort (uses rising edge)*)
  bHoldRestart : BOOL := 0; (*input: hold/restart (uses rising edge)*)
  bFlush : BOOL := 0; (*input: stop and flush the motion queue (uses rising edge)*)
  bServoOn : BOOL; (*output: state machine: servo on. Servos are enabled and system is ready for processing motion commands*)
  bIdle : BOOL; (*output: state machine: idle. Robot controller servos are off*)
  bHoldActive : BOOL; (*output: state machine: held. Trajectory is suspended*)
  bError : BOOL; (*output: state machine: error*)
  nErrorCode : UDINT := 0; (*output: state machine error code*)
  nSmStartStop : UINT := 0; (*in/out: state machine 1: start/stop sequence*)
  nSmSpeedOverride : UINT := 0; (*in/out: state machine 2: speed override*)
  fSpeedOverride : REAL := 100.0; (*input: for overriding the programmed speed [0 to 150%]*)
  nSmStartStopTime : DINT; (*output: elapsed time in current state of StartStop state machine [ms]*)
  nSmSpeedOverrideTime : DINT; (*output: elapsed time in current state of SpeedOverride state machine [ms]*)
END_STRUCT
END_TYPE

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