IO data for the MceStartStop function.
Version history
0.3.0
Changes
- Input
bHold - Output
bHoldActive
- Rename
bSystemReadytobServoOn - Output
bServoOnis now TRUE at state 50 - Rename
bStopIndicatortobSystemStopped
- Output
bStartIndicator - blinking behavior on
bSystemStopped
show full history
0.2.0
Changes
- number the state machines
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: 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] |
Details
bExternalConditionsOk
BOOLUsed 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
BOOLUsed 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
BOOLUsed 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
BOOLUsed 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
BOOLUsed 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
BOOLUsed 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
BOOLUsed as output
State machine is in idle state.
The robot controller servos are off.
bHoldActive
BOOLUsed 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
BOOLUsed as output
State machine in error state. For details see
nErrorCode
.
nErrorCode
UDINTUsed 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
UINTState 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 |
| 51 | reset system with MLxReset |
| 60 | finish buffered motions |
| 70 | abort motion and disable system with MLxAbort |
| 99 | state machine error |
nSmSpeedOverride
UINTState machine 2: Handling the speed override.
| value | explanation |
|---|---|
| 0 | idle |
| 10 | send speed override with MLxSetGlobalParameter |
| 99 | state machine error |
fSpeedOverride
REALUsed 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
DINTUsed as output
Elapsed time in current state of the Start/Stop (
nSmStartStop
) state machine.
Value is in ms.
nSmSpeedOverrideTime
DINTUsed 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