IO data for the MceAlarms function.
Version history
0.1.1
 
deGroot
Changes
Changed:
- variable comments
show full history
0.1.0
 
deGroot
Changes
Added:
- first version
Overview
name | type | default | comment |
---|---|---|---|
bReset | BOOL | 0 | input: reset alarm (uses rising edge) |
bResetIndicator | BOOL | output: indicator for reset button (off: no alarms, on: one or more alarms active, blink fast: reset busy) | |
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.
bResetIndicator
BOOL
Used as output
Connect this signal to the indicator light of the reset button.
value | explanation |
---|---|
1) off | no alarms |
2) blinking | one or more alarms active |
3) fast blinking | reset busy |
bAlarmActive
BOOL
Used as output
This tells the system is having one or more alarms.
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
value | explanation |
---|---|
a | number of the state machine (1=first, 2=second etc.) |
b | state where the error occured |
nAlarms
USINT
Used 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
MceAlarmData
List 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.1.1
* Date : 2022-02-24
* 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)*)
bResetIndicator : BOOL; (*output: indicator for reset button (off: no alarms, on: one or more alarms active, blink fast: reset busy)*)
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