IO data for the MceAlarms function.
Version history
0.2.0
deGroot
Changes
Removed:
bResetIndicatorsignal no longer used
show full history
0.1.1
deGroot
Changes
Changed:
- variable comments
0.1.0
deGroot
Changes
Added:
- first version
Overview
| name | type | default | comment |
|---|---|---|---|
| bReset | BOOL | 0 | input: reset alarm (uses rising edge) |
| bAlarmActive | BOOL | output: one or more alarms active | |
| bError | BOOL | output: state machine: error | |
| nErrorCode | UDINT | 0 | output: state machine error code |
| nAlarms | USINT | output: number of active alarms | |
| nSmReadAlarms | UINT | 0 | in/out: state machine 1: getting alarm information |
| nSmResetAlarm | UINT | 0 | in/out: state machine 2: alarm reset |
| aAlarms | ARRAY [0..GVL.ALARMS_UBOUND] OF MceAlarmData | output: list of active robot alarms |
Details
bReset
BOOL(default: 0)
Used as input
A rising edge of this input will reset the robot alarms.
This input can be connected to an HMI momentary button.
bAlarmActive
BOOLUsed as output
This tells the system is having one or more alarms. Can be used for an indicator light of the reset button.
bError
BOOLUsed 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
| value | explanation |
|---|---|
| a | number of the state machine (1=first, 2=second etc.) |
| b | state where the error occured |
nAlarms
USINTUsed as output
This tells how many alarms are active.
nSmReadAlarms
UINT(default: 0)
State machine 1: Getting alarm information from the MotoLogix system.
| value | explanation |
|---|---|
| 0 | idle, wait for new alarm data |
| 10 | prepare reading |
| 20 | read alarm with MLxGetErrorDetail |
| 30 | check if done |
| 99 | state machine error |
nSmResetAlarm
UINT(default: 0)
State machine 2: Resetting the alarms.
| value | explanation |
|---|---|
| 0 | idle |
| 10 | reset alarm with MLxResetAndHold |
| 99 | state machine error |
aAlarms
ARRAY [0..GVL.ALARMS_UBOUND] OF MceAlarmDataList of active robot alarms.
Check the data type for more information.
Source code
Declarations
(*IO data for the MceAlarms function*)
TYPE MceAlarmsIO :
(*
* -----------------------------------------------------------------------------
* Name : MceAlarmsIO
* Version : 0.2.0
* Date : 2025-11-13
* Author : deGroot
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* IO data for the MceAlarms function
* -----------------------------------------------------------------------------
*)
STRUCT
bReset : BOOL := 0; (*input: reset alarm (uses rising edge)*)
bAlarmActive : BOOL; (*output: one or more alarms active*)
bError : BOOL; (*output: state machine: error*)
nErrorCode : UDINT := 0; (*output: state machine error code*)
nAlarms : USINT; (*output: number of active alarms*)
nSmReadAlarms : UINT := 0; (*in/out: state machine 1: getting alarm information*)
nSmResetAlarm : UINT := 0; (*in/out: state machine 2: alarm reset*)
aAlarms : ARRAY [0..GVL.ALARMS_UBOUND] OF MceAlarmData; (*output: list of active robot alarms*)
END_STRUCT
END_TYPE