IO data for the MceWarnings function.
Version history
0.1.1
Changes
- variable comments
show full history
0.1.0
Changes
- first version
Overview
name | type | default | comment |
---|---|---|---|
bPollingCompleted | BOOL | output: one-shot every time the polling cycle is completed | |
bError | BOOL | output: state machine: error | |
nErrorCode | UDINT | 0 | output: state machine error code |
nWarnings | USINT | output: number of active warnings | |
tPollInterval | TIME | T#100ms | input: min interval for polling robot warnings |
nSmReadWarnings | UINT | 0 | in/out: state machine 1: getting warning information |
aWarnings | ARRAY [0..GVL.WARNINGS_UBOUND] OF STRING[162] | output: list of active robot warnings |
Details
bPollingCompleted
BOOL
Used as output
This one-shot signal fires every time a full polling cycle has completed. It can be useful for further processing of the warning data (e.g. scrolling on HMI).
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 |
nWarnings
USINT
Used as output
This tells how many warnings are active.
It is updated at
bPollingCompleted
.
tPollInterval
TIME
Minimum interval for polling robot warnings.
The following rules apply:
- Set this time to at least two times your plc scan time
- Don’t use a setting lower than
50ms
In certain SytemStates
this interval will be multiplied by five.
This will free up communication resources and lead to faster response
times for more important commands such as motions.
nSmReadWarnings
UINT
State machine 1: Getting warning information from the MotoLogix system.
value | explanation |
---|---|
0 | idle |
10 | read warning with MLxGetMessageDetail |
20 | poll delay |
30 | poll sequence complete |
99 | state machine error |
aWarnings
ARRAY [0..GVL.WARNINGS_UBOUND] OF STRING[162]
List of active robot warnings.
It is updated at
bPollingCompleted
.
Source code
Declarations
(*IO data for the MceWarnings function*)
TYPE MceWarningsIO :
(*
* -----------------------------------------------------------------------------
* Name : MceWarningsIO
* Version : 0.1.1
* Date : 2022-02-24
* Author : deGroot
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* IO data for the MceWarnings function
* -----------------------------------------------------------------------------
*)
STRUCT
bPollingCompleted : BOOL; (*output: one-shot every time the polling cycle is completed*)
bError : BOOL; (*output: state machine: error*)
nErrorCode : UDINT := 0; (*output: state machine error code*)
nWarnings : USINT; (*output: number of active warnings*)
tPollInterval : TIME := T#100ms; (*input: min interval for polling robot warnings*)
nSmReadWarnings : UINT := 0; (*in/out: state machine 1: getting warning information*)
aWarnings : ARRAY [0..GVL.WARNINGS_UBOUND] OF STRING[162]; (*output: list of active robot warnings*)
END_STRUCT
END_TYPE