MceStartStopIO

0.2.0

IO data for the MceStartStop function.

Version history

0.2.0

  deGroot

Changes

Changed:
  • number the state machines
show full history

0.1.0

  Rioual

Changes

Added:
  • first version

Overview

nametypedefaultcomment
bExternalConditionsOkBOOL0input: external conditions for executing motion commands
bStartBOOL0input: start/hold/restart (uses rising edge)
bStopBOOL0input: stop/abort (uses rising edge)
bFlushBOOL0input: stop and flush the motion queue (uses rising edge)
bSystemReadyBOOLoutput: system ready for processing motion commands
bStartIndicatorBOOLoutput: indicator for start button (on: system ready, blink slow: waiting for user, blink fast: busy, double flash: start ready)
bStopIndicatorBOOLoutput: indicator for stop button (on: system off, blink slow: finishing motions, blink fast: busy)
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%]

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/hold/restart 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).

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

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)

bSystemReady

BOOL

Used as output

This tells 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).

bStartIndicator

BOOL

Used as output

Connect this signal to the indicator light of the start button.

valueexplanation
1) double flashstart ready
2) slow blinkingwaiting for user (press start to continue)
3) onsystem ready
4) fast blinkingstartup commands busy

bStopIndicator

BOOL

Used as output

Connect this signal to the indicator light of the stop button.

valueexplanation
1) onsystem switched off
2) slow blinkingfinishing motions
3) fast blinkingstop commands busy

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

Source code

Declarations

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

(*
 * -----------------------------------------------------------------------------
 * Name               : MceStartStopIO
 * Version            : 0.2.0
 * Date               : 2022-02-23
 * Author             : deGroot
 * 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: start/hold/restart (uses rising edge)*)
  bStop : BOOL := 0; (*input: stop/abort (uses rising edge)*)
  bFlush : BOOL := 0; (*input: stop and flush the motion queue (uses rising edge)*)
  bSystemReady : BOOL; (*output: system ready for processing motion commands*)
  bStartIndicator : BOOL; (*output: indicator for start button (on: system ready, blink slow: waiting for user, blink fast: busy, double flash: start ready)*)
  bStopIndicator : BOOL; (*output: indicator for stop button (on: system off, blink slow: finishing motions, blink fast: busy)*)
  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%]*)
END_STRUCT
END_TYPE

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