Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion source/examples/functions/MceWarnings/definition.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
author: deGroot
comment: Reading warnings
changelog:
- version: 0.4.0
date: 2026-05-04
author: deGroot
added:
- '`bEnable` input for activating the polling sequence'
changed:
- 'clear strings using FOR loop for platform compatibility'
- requires `MceWarningsIO` data type version `0.2.0`
- version: 0.3.1
date: 2025-02-24
author: Rioual
Expand Down Expand Up @@ -48,4 +56,6 @@ var:

- name: aWarningBuffer
type: ARRAY [0..GVL.WARNINGS_UBOUND] OF STRING[162]
comment: buffer of received robot warnings
comment: buffer of received robot warnings

- name: i
26 changes: 14 additions & 12 deletions source/examples/functions/MceWarnings/source.iecst
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,20 @@ CASE io.nSmReadWarnings OF
// idle
// -------------------------------------
0:
IF MLX.Signals.MLXGatewayConnected THEN
IF MLX.Signals.MLXGatewayConnected AND io.bEnable THEN
// init
nIndex := 0;
MEMUtils.MemSet(
pbyBuffer := ADR(aWarningBuffer),
byValue := 0,
dwSize := SIZEOF(aWarningBuffer));
FOR i := 0 TO GVL.WARNINGS_UBOUND DO
aWarningBuffer[i] := '';
END_FOR;

io.nSmReadWarnings := 10;
ELSE
// clear old data
io.nWarnings := 0;
MEMUtils.MemSet(
pbyBuffer := ADR(io.aWarnings),
byValue := 0,
dwSize := SIZEOF(io.aWarnings));
FOR i := 0 TO GVL.WARNINGS_UBOUND DO
io.aWarnings[i] := '';
END_FOR;
END_IF;

// -------------------------------------
Expand All @@ -74,10 +72,14 @@ CASE io.nSmReadWarnings OF

// the errorNumber returns the "warning slot number" (0..9) so let's
// use it to detect when the polling sequence is complete
IF (fbGetMessageDetail.MessageDetail.errorNumber < 9 ) THEN
io.nSmReadWarnings := 20;
IF io.bEnable THEN
IF (fbGetMessageDetail.MessageDetail.errorNumber < 9 ) THEN
io.nSmReadWarnings := 20;
ELSE;
io.nSmReadWarnings := 30;
END_IF;
ELSE;
io.nSmReadWarnings := 30;
io.nSmReadWarnings := 0;
END_IF;
END_IF;
END_IF;
Expand Down
15 changes: 15 additions & 0 deletions source/examples/types/MceWarningsIO/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ company: Yaskawa Europe GmbH
author: deGroot
comment: IO data for the MceWarnings function
changelog:
- version: 0.2.0
date: 2026-05-04
author: deGroot
added:
- '`bEnable` input for activating the reading of robot warnings'
- version: 0.1.1
date: 2022-02-24
author: deGroot
Expand All @@ -19,6 +24,16 @@ changelog:
# security:
var:

- name: bEnable
description: |
*Used as input*

This activates the polling cycle for reading robot warnings.

type: BOOL
default_value: "FALSE"
comment: "input: activate reading robot warnings"

- name: bPollingCompleted
description: |
*Used as output*
Expand Down