Datatype containing data for state machine monitoring.
Version history
0.2.0
deGroot
Changes
Added:
bOsrStateChangefor providing signal at a state change event
show full history
0.1.1
Rioual
Changes
Added:
- first version
Overview
| name | type | default | comment |
|---|---|---|---|
| nStateStored | DINT | stored state for detecting change | |
| nStatePrevious | DINT | previous state | |
| nStateTimeUs | DINT | elapsed time [µs] | |
| nStateTime | DINT | elapsed time [ms] | |
| nStateTimePrevious | DINT | elapsed time previous state [ms] | |
| tStored | LTIME | stored plc clock | |
| bOsrStateChange | BOOL | rising edge on state change |
Details
nStateStored
DINTStored state for detecting change.
nStatePrevious
DINTPrevious state.
nStateTimeUs
DINTElapsed time [µs].
nStateTime
DINTElapsed time [ms].
nStateTimePrevious
DINTElapsed time previous state [ms].
tStored
LTIMEStored plc clock.
bOsrStateChange
BOOLRising edge on state change. Useful for e.g. initializing some data at entering a state.
Source code
Declarations
(*data for state machine monitoring*)
TYPE MceStateMonitoringData :
(*
* -----------------------------------------------------------------------------
* Name : MceStateMonitoringData
* Version : 0.2.0
* Date : 2026-02-18
* Author : deGroot
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* data for state machine monitoring
* -----------------------------------------------------------------------------
*)
STRUCT
nStateStored : DINT; (*stored state for detecting change*)
nStatePrevious : DINT; (*previous state*)
nStateTimeUs : DINT; (*elapsed time [µs]*)
nStateTime : DINT; (*elapsed time [ms]*)
nStateTimePrevious : DINT; (*elapsed time previous state [ms]*)
tStored : LTIME; (*stored plc clock*)
bOsrStateChange : BOOL; (*rising edge on state change*)
END_STRUCT
END_TYPE