MceAlarmsIO

0.1.1

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

nametypedefaultcomment
bResetBOOL0input: reset alarm (uses rising edge)
bResetIndicatorBOOLoutput: indicator for reset button (off: no alarms, on: one or more alarms active, blink fast: reset busy)
bAlarmActiveBOOLoutput: one or more alarms active
bErrorBOOLoutput: state machine: error
nErrorCodeUDINT0output: state machine error code
nAlarmsUSINToutput: number of active alarms
nSmReadAlarmsUINT0in/out: state machine 1: getting alarm information
nSmResetAlarmUINT0in/out: state machine 2: alarm reset
aAlarmsARRAY [0..GVL.ALARMS_UBOUND] OF MceAlarmDataoutput: 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.

valueexplanation
1) offno alarms
2) blinkingone or more alarms active
3) fast blinkingreset 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

valueexplanation
anumber of the state machine (1=first, 2=second etc.)
bstate 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.

valueexplanation
0idle, wait for new alarm data
10prepare reading
20read alarm with MLxGetErrorDetail
30check if done
99state machine error

nSmResetAlarm

UINT
(default: 0)

State machine 2: Resetting the alarms.

valueexplanation
0idle
10reset alarm with MLxResetAndHold
99state 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

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