MceWarningsIO

0.1.1

IO data for the MceWarnings function.

Version history

0.1.1

  deGroot

Changes

Changed:
  • variable comments
show full history

0.1.0

  deGroot

Changes

Added:
  • first version

Overview

nametypedefaultcomment
bPollingCompletedBOOLoutput: one-shot every time the polling cycle is completed
bErrorBOOLoutput: state machine: error
nErrorCodeUDINT0output: state machine error code
nWarningsUSINToutput: number of active warnings
tPollIntervalTIMET#100msinput: min interval for polling robot warnings
nSmReadWarningsUINT0in/out: state machine 1: getting warning information
aWarningsARRAY [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
(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

nWarnings

USINT

Used as output

This tells how many warnings are active. It is updated at bPollingCompleted .

tPollInterval

TIME
(default: T#100ms)

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
(default: 0)

State machine 1: Getting warning information from the MotoLogix system.

valueexplanation
0idle
10read warning with MLxGetMessageDetail
20poll delay
30poll sequence complete
99state 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

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