IO data for the MceStartStop function.
Version history
0.2.0
Changes
- number the state machines
show full history
0.1.0
Changes
- first version
Overview
name | type | default | comment |
---|---|---|---|
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%] |
Details
bExternalConditionsOk
BOOL
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
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
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
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.
value | explanation |
---|---|
1) double flash | start ready |
2) slow blinking | waiting for user (press start to continue) |
3) on | system ready |
4) fast blinking | startup commands busy |
bStopIndicator
BOOL
Used as output
Connect this signal to the indicator light of the stop button.
value | explanation |
---|---|
1) on | system switched off |
2) slow blinking | finishing motions |
3) fast blinking | stop commands busy |
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 |
nSmStartStop
UINT
State machine 1: Handling the start/stop sequence.
value | explanation |
---|---|
0 | idle, not ready for start |
1 | ready for start |
10 | reset system with MLxReset |
20 | enable system with MLxEnable |
30 | system ready for processing motion commands |
35 | hold motion with MLxHold |
40 | system held (restart with start button) |
45 | restart motion with MLxRestart |
50 | stop and flush buffered motions with MLxStop |
60 | finish buffered motions |
70 | abort motion and disable system with MLxAbort |
99 | state machine error |
nSmSpeedOverride
UINT
State machine 2: Handling the speed override.
value | explanation |
---|---|
0 | idle |
10 | send speed override with MLxSetGlobalParameter |
99 | state machine error |
fSpeedOverride
REAL
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