Download as pdf or txt
Download as pdf or txt
You are on page 1of 287

GEI-100682AK

Mark* VIe Controller


Standard Block Library
These instructions do not purport to cover all details or variations in equipment, nor to provide for every possible
contingency to be met during installation, operation, and maintenance. The information is supplied for informational
purposes only, and GE makes no warranty as to the accuracy of the information included herein. Changes, modifications,
and/or improvements to equipment and specifications are made periodically and these changes may or may not be reflected
herein. It is understood that GE may make changes, modifications, or improvements to the equipment referenced herein or to
the document itself at any time. This document is intended for trained personnel familiar with the GE products referenced
herein.
Public Information – This document contains non-sensitive information approved for public disclosure.
GE may have patents or pending patent applications covering subject matter in this document. The furnishing of this
document does not provide any license whatsoever to any of these patents.
GE provides the following document and the information included therein as is and without warranty of any kind,
expressed or implied, including but not limited to any implied statutory warranty of merchantability or fitness for
particular purpose.
For further assistance or technical information, contact the nearest GE Sales or Service Office, or an authorized GE Sales
Representative.

Revised: Aug 2021


Issued: Sept 2005

© 2005 – 2021 General Electric Company.


___________________________________
* Indicates a trademark of General Electric Company and/or its subsidiaries.
All other trademarks are the property of their respective owners.

We would appreciate your feedback about our documentation.


Please send comments or suggestions to controls.doc@ge.com

Public Information
Document Updates
Rev Location Description
Change Detection (CHG_DET) Updated the STATE pin Description in the States table
Updated the block description
AK
NaN Check (NANCHECK) Removed UDINT from the SRC pin Data Type in the Inputs table
Updated the SRC pin Description in the Inputs table
Combined and clarified the Precautions Before APP_STATE Deletion,
Application State (APP_STATE)
AJ Relocation, or Causing a Major Revision Mismatch
Time Monitor (TIME_MON) Updated the Data Type for the UTCTIME output to UDINT
Capture Data (CAPTURE) Updated table entry UPL_TYPE description to include TripFlash
AH
Command Disable (CMD_DISABLE) New block
Modbus Master Read (MBUS_READ)
New blocks
Modbus Master Write (MBUS_WRITE)
Updated MAX_TIME to MAXTIME
AG Timer (TIMER)
Added Note to clarify when AT_TIME goes True
Updated MAX_TIME to MAXTIME and mCurTime to CURTIME
Timer Version 2 (TIMER_V2)
Added Note to clarify when AT_TIME goes True
Controller Monitor (CTRLR_MON)
AF Updated to include the UCSD controller platform
Temperature Status (TEMP_STATUS)
IO-Link Device Read (IO_LINK_DEVICE_READ)
AE New blocks
IO-Link Device Write (IO_LINK_DEVICE_WRITE)
Updates to increase number of supported totalizers (counters) and pins
Totalizer (TOTALIZER)
from 64 to 128
AD Added health support of a regular variable directly from an EtherCAT input
Variable Health (VAR_HEALTH) signal and removed support for an internal state variable (a connected
internal state variable results in health always True)
Array Compress Boolean (ARRAY_COMPRESS)
Array Compress Boolean (ARRAY_COMPRESS_
UDI) New blocks
AC Array Expand Integer (ARRAY_EXPAND)
Array Expand Integer (ARRAY_EXPAND_UDI)
Updated the Description in the Comparison Functions table for LE and LT
Array Compare (ARRAY_COMPARE)
Updated Data Type for N in the Inputs table
Updated for consistency and clarification as to what information applied to
AB Variable Health (VAR_HEALTH)
I/O packs or EGD
AA Timer (TIMER) Corrected parameter name from mCurTime to CURTIME
Controller Monitor (CTRLR_MON) Updated for the UCSC controller platform
Z
Temperature Status (TEMP_STATUS) Updated for the UCSC controller platform
Y Interpolator DL (INTERP_DL) A better description of the FTBL input array

2 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Contents
Introduction......................................................................................................................................................7
Block Data Type ............................................................................................................................................8
Change Data Type of Variant Block ...................................................................................................................9
Legacy Category Blocks ................................................................................................................................ 10
Absolute Value (ABS) ...................................................................................................................................... 11
Add (ADD) .................................................................................................................................................... 12
Analog Alarm (ANALOG_ALARM) .................................................................................................................. 13
Any Forces (ANY_FORCES) ............................................................................................................................ 26
Application State (APP_STATE) ........................................................................................................................ 27
Array Average (ARRAY_AVERAGE) ................................................................................................................. 29
Array Calculator (ARRAY_CALC)..................................................................................................................... 30
Array Compare (ARRAY_COMPARE)................................................................................................................ 32
Array Compress Boolean (ARRAY_COMPRESS) ................................................................................................. 37
Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI) ....................................................................... 38
Array Empty (ARRAY_EMPTY) ....................................................................................................................... 39
Array Expand Integer (ARRAY_EXPAND) .......................................................................................................... 40
Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) ................................................................................ 41
Array Fill (ARRAY_FILL) ................................................................................................................................ 43
Array Find Element (ARRAY_FIND) ................................................................................................................. 44
Array Minimum/Maximum Element Determination (ARRAY_MINMAX) ................................................................. 45
Array Relay Ladder Logic (ARRAY_RUNG) ....................................................................................................... 46
Array Sum (ARRAY_SUM) .............................................................................................................................. 47
Average Input (AVRG) ..................................................................................................................................... 48
Bit Counter (BIT_CNTR).................................................................................................................................. 49
Boolean Alarm (BOOLEAN_ALARM) ............................................................................................................... 50
Bubble Sort (BSORT)....................................................................................................................................... 53
Calculator (CALC) .......................................................................................................................................... 54
Capture Data (CAPTURE) ................................................................................................................................ 56
Theory of Operation...................................................................................................................................... 59
Configuration .............................................................................................................................................. 59
Enabling Collections ..................................................................................................................................... 60
Triggering Issues.......................................................................................................................................... 60
Buffer Control Details ................................................................................................................................... 61
Time Stamping ............................................................................................................................................ 61
Capture Status ............................................................................................................................................. 62
Redundancy Issues ....................................................................................................................................... 62
Memory Use ............................................................................................................................................... 63
Change Detection (CHG_DET) .......................................................................................................................... 64
Clamp (CLAMP) ............................................................................................................................................. 65
Code Timer (CODETIMER) .............................................................................................................................. 66
Command Disable (CMD_DISABLE) ................................................................................................................. 68
Comment (_COMMENT) ................................................................................................................................. 70
Comment Block Functionality (_COMMENT_BF) ................................................................................................ 71
Comment No Break (_COMMENT_NB) ............................................................................................................. 72
Compare (COMPARE) ..................................................................................................................................... 73
Compress Boolean (COMPRESS)....................................................................................................................... 78
Compress to Long Integer (COMPRESS_UDI) ..................................................................................................... 79

Instruction Guide GEI-100682AK 3


Public Information
Controller Monitor (CTRLR_MON).................................................................................................................... 80
Count Down (CTD) ......................................................................................................................................... 86
Count Up (CTU).............................................................................................................................................. 87
Decode (IN_DECODE) .................................................................................................................................... 88
Derivative (DERIVATIVE)................................................................................................................................ 89
Device Heartbeat (DEVICE_HB) ....................................................................................................................... 90
Divide (DIV) .................................................................................................................................................. 91
Equal (EQ) ..................................................................................................................................................... 92
Expand Integer (EXPAND)................................................................................................................................ 94
Expand Long Integer (EXPAND_UDI) ................................................................................................................ 95
Finite Impulse Response (FIR) ........................................................................................................................... 97
Function Generator (FUNGEN).......................................................................................................................... 99
Greater Than, Equal To (GE) ............................................................................................................................101
Get From Array (GET) ....................................................................................................................................103
Greater Than (GT) ..........................................................................................................................................104
Infinite Impulse Response (IIR).........................................................................................................................105
Integrator With Lead (INTWLEAD)...................................................................................................................107
Integrator, Selectable Algorithm (INTEG) ...........................................................................................................109
Interpolator (INTERP) .....................................................................................................................................111
Interpolator DL (INTERP_DL) .........................................................................................................................113
IO-Link Device Read (IO_LINK_DEVICE_READ)..............................................................................................115
IO-Link Device Backup and Restore ...............................................................................................................123
IO-Link Block Performance Numbers .............................................................................................................123
IO-Link Device Write (IO_LINK_DEVICE_WRITE) ...........................................................................................124
Lag Filter (LAG) ............................................................................................................................................125
Latch (LATCH) ..............................................................................................................................................127
Lead, Lag (LEAD_LAG) .................................................................................................................................128
Less Than (LT)...............................................................................................................................................129
Less Than, Equal To (LE).................................................................................................................................131
Limit Detect Manual (LD_MAN) ......................................................................................................................133
Logic Builder (LOGIC_BUILDER) ...................................................................................................................136
Logic Builder State Change (LOGIC_BUILDER_SC) ...........................................................................................146
Logical AND (AND).......................................................................................................................................148
Logical NAND (NAND) ..................................................................................................................................149
Logical NOR (NOR) .......................................................................................................................................150
Logical NOT (NOT)........................................................................................................................................151
Logical OR (OR) ............................................................................................................................................152
Logical XNOR (XNOR) ..................................................................................................................................153
Logical XOR (XOR) .......................................................................................................................................154
Median Selector with Enable (MEDIAN) ............................................................................................................155
Minimum, Maximum (MIN_MAX) ...................................................................................................................156
Configuring Matrix Blocks ...............................................................................................................................157
Matrix Addition Subtraction (MADDSUB)..........................................................................................................163
Matrix Concatenation (MCONCAT)...................................................................................................................165
Matrix Dot Division (MDOTDIV) .....................................................................................................................167
Matrix Dot Multiplication (MDOTMUL) ............................................................................................................168
Matrix Fill (MFILL)........................................................................................................................................169

4 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Find (MFIND) .....................................................................................................................................172
Matrix Inverse (MINV)....................................................................................................................................173
Matrix Minimum/Maximum Element Determination (MMINMAX) .........................................................................174
Matrix Multiplication (MMUL) .........................................................................................................................175
Matrix Submatrix Selection (MSUBMATRIX) .....................................................................................................176
Matrix Switch Block (MSVCH) ........................................................................................................................178
Matrix Transpose (MTRN) ...............................................................................................................................179
Modbus Master Read (MBUS_READ) ...............................................................................................................180
Modbus Master Write (MBUS_WRITE) .............................................................................................................187
Mode Select (MODSEL)..................................................................................................................................188
Move (MOVE)...............................................................................................................................................190
Move Truncated (MOVE_DT) ..........................................................................................................................191
Move Truncated (MOVE_IT)............................................................................................................................192
Mult (MULT).................................................................................................................................................193
NaN Breaker (NAN_BREAKER) ......................................................................................................................194
NaN Check (NANCHECK) ..............................................................................................................................195
Negate (NEGATE)..........................................................................................................................................196
Not Equal (NE) ..............................................................................................................................................197
On Off Delay (ON_OFF_DELAY).....................................................................................................................199
Parity Check (PARITY_CHK) ..........................................................................................................................200
Prevote (PREVOTE) .......................................................................................................................................201
Proportional Integral Derivative Control (PID) .....................................................................................................204
Pulse (PULSE)...............................................................................................................................................207
Pulse Extended (PULSE_EXT) .........................................................................................................................208
Pushbutton (P_B) ...........................................................................................................................................209
Put Into Array (PUT).......................................................................................................................................210
Rate Limiter (RATELIM) .................................................................................................................................211
Rate Monitor (RATEMON) ..............................................................................................................................213
Relay Ladder Logic (RUNG) ............................................................................................................................215
Rotary Switch (ROTARY_SW) .........................................................................................................................216
Round (ROUND) ...........................................................................................................................................217
Select (SELECT) ............................................................................................................................................218
Selector (SELECTOR).....................................................................................................................................219
Sequence Branch Block - TMR (SBB) ................................................................................................................221
Sequence Manager Block - TMR (SMGR)...........................................................................................................223
Sequence Merge Block - TMR (SMB) ................................................................................................................225
Sequence Step Block - TMR (SSB) ....................................................................................................................227
Set Array (SETARRY).....................................................................................................................................230
Square Root (SQRT) .......................................................................................................................................231
Status Combine (STATUS_COMBINE) ..............................................................................................................232
Status Monitoring ...........................................................................................................................................237
Status Block Types ......................................................................................................................................237
Status_Region.............................................................................................................................................238
Sub_Status .................................................................................................................................................238
Limit_Status...............................................................................................................................................238
Status Input Verification ...............................................................................................................................238
Status Tables ..............................................................................................................................................239
Status Split (STATUS_SPLIT) ..........................................................................................................................244

Instruction Guide GEI-100682AK 5


Public Information
Steer (STEER) ...............................................................................................................................................245
Subtract (SUB)...............................................................................................................................................246
Switch (SWITCH) ..........................................................................................................................................247
System Outputs (SYS_OUTPUTS) ....................................................................................................................248
Task Scan (SCAN)..........................................................................................................................................249
Temperature Status (TEMP_STATUS) ................................................................................................................250
Time Monitor (TIME_MON) ............................................................................................................................254
Timer (TIMER)..............................................................................................................................................256
Timer Version 2 (TIMER_V2)...........................................................................................................................258
Totalizer (TOTALIZER) ..................................................................................................................................260
Transfer Function (TRNFUN) ...........................................................................................................................261
Transport Delay (TRAN_DLY) .........................................................................................................................263
Transport Delay Version 2 (TRAN_DLY_V2) ......................................................................................................264
Unit Delay (UNIT_DELAY) .............................................................................................................................265
User Scheduled Block Heartbeat (USB_HB) ........................................................................................................266
UTC Time (UTC_TIME) .................................................................................................................................267
Variable Alarm Status (VAR_ALARM_STATUS) ................................................................................................268
Variable Health (VAR_HEALTH) ......................................................................................................................269
Variable Simulation (VARSIM) .........................................................................................................................279
Logic Examples..............................................................................................................................................280
Annunciation of Temperature Threshold for Mark VIe I/O Packs..........................................................................280
Annunciation of Loss of IONet for Mark VIe I/O Packs......................................................................................282
Annunciation of TMR Controller Heartbeat Status Not OK .................................................................................284

6 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Introduction
Blocks are software subroutines that are included in the tasks to be run in the controller. Within the ToolboxST* application,
the connections are accomplished graphically using pins and wires to form a data flow diagram. The blocks run in the order
listed in the task. The connections between the blocks are RAM memory elements through which data is passed. These
elements are referred to as variables. Each variable has a defined data type and must be connected to pins of the same data
type. Some block pins accept multiple data types and others are capable of converting from one data type to another.
Each block entry in the library consists of the following:

• Block name and category


• Block description
• Block diagram
• Pin definitions
• Application notes (optional)
Each block has a full name and a simple name. The full name is descriptive and too long to display in a block diagram. For
this reason, all blocks have a simple name. The simple name is displayed in the ToolboxST application.
Floating point (REAL and LREAL) values conform to IEEE® 754. The standard defines certain computational exceptions that
may produce non-standard results, such as divide by zero. These non-standard values include infinities and Not a Numbers
(NaNs), which, if used in subsequent calculations, produce additional non-standard results. The software has been designed to
prevent the production and proliferation of such values. Function block descriptions may include additional details concerning
floating point exception handling where needed.
Block Libraries also contain rubber blocks, which are sized according to the number of pins used. Within the library, the
blocks are grouped functionally to simplify the task of converting ideas into blocks. For example, the Controller Monitor
(CTRLR_MON) block is a member of the System category.

Note Pin names are given modifiers that provide additional information about the pin.

A graphical representation of the software for each block is provided in the form of a block diagram that includes the simple
block name and block configuration pins and variable pins, which transfer data in and out of the block. The pins are located
on the block diagram according to their usage. All input pins (pins read by the block) and block configuration pins are listed
on the left. All output pins (pins written by the block) and state pins (pins read and written by the block) are listed on the
right. The pin name is listed beside each pin inside the block diagram border.

Pin Name Modifiers Description


^ prefixed with a carat (^ONREQ) Pin is rising-edge sensitive
[ ] suffixed with square brackets (STATE[4]) Pin expects a variable that is an array of the size indicated within the brackets

Instruction Guide GEI-100682AK 7


Public Information
Block Data Type
The pin data type identifier is listed beside the pin outside of the block diagram border. The basic data types used in the block
libraries are BOOL, INT, UINT, REAL, LREAL, DINT and UDINT. Blocks with data types ANY_NUM and ANY must have
the Block Data Type set to match the intended data type of the block output.

Note The default value of Boolean inputs is False unless the input is a block Enable, in which case the default is True and
the default value of inputs with data types INT, UINT, DINT, UDINT, REAL and LREAL is 0, until otherwise specified.

The block content provides tables to define the input and output pins. Each entry includes the block name for the variable,
basic data type, typical scaling units, and a description of the variable. Typical scaling units are supplied for reference only;
specific applications may use other scaling units as appropriate.

Data Type Identifier Basic Data Type Description


A Any (ANY) Any data type
B Boolean (BOOL) 8-bit Boolean
I Integer (INT) 16-bit (Short) Signed Integer
DI Double Integer (DINT) 32-bit (Long) Signed Integer
R Real (REAL) 32-bit Floating Point
LR Long Real (LREAL) 64-bit (Long) Floating Point
UI Unsigned Integer (UINT) 16-bit (Short) Unsigned Integer
UDI Unsigned Double Integer (UDINT) 32-bit (Long) Unsigned Integer
N Numeric (ANY_NUM) Any data type except Boolean
S Analog or Boolean (Simple) Any simple data type

Data Type Identifier Type Definition Modifier Description


# m Build time constant

Note The Block Data Type is set in the block Property Editor.

8 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Change Data Type of Variant Block
There are few blocks that support more than one data type as an input and/or output.

➢ To change the block data type


1. Select the block for which to change the data type.
2. From the Block Properties window, expand the General section.
3. From the Property Editor, select the Block Data Type.
4. From the Block Data Type drop-down box, select a valid data type for the block.

Instruction Guide GEI-100682AK 9


Public Information
Legacy Category Blocks
Some of the controller software blocks have been put into the Legacy Category (this is the category that is used by the
ToolboxST Block Diagram Editor). This category is different than the blocks that reside in the Legacy Block Library. Legacy
category blocks are supported but not recommended for use in any new controller applications (ControlST V05.02 or later).
They are in the LEGACY category because no new development is to be done to add any new functionality to these blocks. In
many cases, there is a newer block that is preferred for use as a replacement for these blocks, as listed in the following table.

Legacy Category Rationale


Legacy Replacement
Reason
Category Block Block
_COMMENT is equivalent to the current functionality of _COMMENT_BF
_COMMENT_BF _COMMENT _COMMENT_BF used to provided a carriage-return/page-feed in the Mark VI and
early versions of Mark VIe controllers
TIMER TIMER_V2 TIMER_V2 supports AT_TIME output to RESET input
TRAN_DLY_V2 corrects existing issues with TRAN_DLY, which could not be made
TRAN_DLY TRAN_DLY_V2
backwards compatible

Note LEGACY category blocks are hidden by default in the ToolboxST application. Refer to the ToolboxST User Guide for
Mark Controls Platform (GEH-6700 or GEH-6703) for steps to display these blocks if needed for legacy support.

10 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Absolute Value (ABS)
Block Category: Math
The Absolute Value (ABS) block outputs the absolute value of the input, IN.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

ABS Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Input
Name Data Type Description
IN ANY_NUM† Input value
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Absolute value of the input
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 11


Public Information
Add (ADD)
Block Category: Math
The Add (ADD) block is an expandable block that adds up to 32 inputs. The sum of the connected inputs is set as the output.
Furthermore, if no inputs are connected, the output will be 0.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

ADD Block

Inputs
Name Data Type Description
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Output
† Value with status, if status option is enabled.

12 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Analog Alarm (ANALOG_ALARM)
Block Category: Analog Operations
The Analog Alarm (ANALOG_ALARM) block documents the configuration of an analog alarm. It has no associated runtime
operation; it is effectively an application code comment. When the IN pin is connected to a numeric variable, the block
displays the configuration of the analog alarms for that variable.
Each analog alarm consists of a main numeric variable and a number of SubVariables that either configure the alarms or hold
individual alarm bits. Each of these SubVariables is represented by a pin on the ANALOG_ALARM block.

Note Alarm bits must be enabled to display as pins.

➢ To create or edit configuration: double-click the ANALOG_ALARM block.

ANALOG_ALARM Block

Instruction Guide GEI-100682AK 13


Public Information
(Optional) Alarm Block Template Configuration
An alarm block template may be used to define variable aliasing behavior for blocks.

➢ To create and configure an Analog Alarm block template


1. From the System Editor, select Edit, and System Information.
2. From the Editor Tree View, expand Alarm System and right-click Alarm Block Template, then select Add Alarm
Block Template.

3. Enter a name for the Alarm Block Template and click OK.

14 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
4. Create or add any required attributes for the block template. From the Tree View, expand the block template and select
Attributes.

5. From the Editor Tree View, select the template and enter an Alias for each SubVariable in the Data Grid as needed.

Instruction Guide GEI-100682AK 15


Public Information
ToolboxST Configuration

➢ To insert the block in the ToolboxST application


1. From the Tree View, select a task to display the Block Diagram Editor in the Summary View.
2. From the Library View, select the Analog Alarm block and drag and drop into the Diagram Editor.

3. Optionally, choose a block template. From the drop down menu, select a template and click OK.

16 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
4. Add values to the SubVariables and click OK.

Analog Alarm Block Inserted


5. Double-click the IN pin and connect the global variable to the input.
a. Select Global Variable, then select (check) Create variable and enter the variable name, or click Browse
Globals to select a variable. Click OK.

Instruction Guide GEI-100682AK 17


Public Information
Global Variable Connected to Input

6. From the Block Diagram Editor, double-click the Analog Alarm block and select the variable name.

7. From the Property Editor, select Alarm and select an available Analog Alarm Definition from the drop down menu.

18 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
8. From the Property Editor, select an Alarm Type property (for example, H) and select True from the drop down menu
to change the value from False to True.

9. From the Property Editor, select Alarm Shelving and select Enabled from the drop down menu.

Instruction Guide GEI-100682AK 19


Public Information
10. Verify that the correct variables display for each alarm created, then close the window.

20 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
11. From the Tree View, right-click ANALOG_ALARM_1 and select Instance to refresh the alias’ for each alarm.

12. Double-click the block to view the alias names if they were defined using a block template.

Instruction Guide GEI-100682AK 21


Public Information
13. Configure the alarm parameters. From the Summary View, right-click the ANALOG_ALARM_1 block and select
Edit Block Pins.

22 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
14. Beside the parameter name, enter the Connection Variable or Immediate Value for each alarm setpoint, associated
time delay, and hysteresis. Then close the window.

Instruction Guide GEI-100682AK 23


Public Information
Inputs
Name Data Type Description
IN ANY_NUM Connect to a Numeric variable to document its alarm configuration
INH† BOOL When set to True, all configured alarm levels for this variable are inhibited
Unshelve†† BOOL When set to True, will cause the alarm to become unshelved
† Available as long as any analog alarm type is configured
†† Available when shelving is enabled for the alarm

Outputs
Alarm Type
Name Data Type Description
Configuration†
Alarm flag for Bad Quality. For BQ to be available, IN must be
BQ BOOL BQ
connected to a variable with status.
H BOOL Alarm flag for High H
HH BOOL Alarm flag for High High HH
HHH BOOL Alarm flag for High High High HHH
L BOOL Alarm flag for Low L
LL BOOL Alarm flag for Low Low LL
LLL BOOL Alarm flag for Low Low Low LLL
DH BOOL Alarm flag for Deviation High DH
RH BOOL Alarm flag for Rate of Change High RH
† Associated output is only available if the specific alarm type is configured

24 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Parameters
Alarm Type
Name Data Type Description
Configuration†
H_SP ANY_NUM Setpoint for High alarm (type must match IN) H
H_T UINT Delay time for High alarm (ms) H
HH_SP ANY_NUM Setpoint for High High alarm (type must match IN) HH
HH_T UINT Delay time for High High alarm (ms) HH
HHH_SP ANY_NUM Setpoint for High High High alarm (type must match IN) HHH
HHH_T UINT Delay time for High High High alarm (ms) HHH
L_SP ANY_NUM Setpoint for Low alarm (type must match IN) L
L_T UINT Delay time for Low alarm (ms) L
LL_SP ANY_NUM Setpoint for Low Low alarm (type must match IN) LL
LL_T UINT Delay time for Low Low alarm (ms) LL
LLL_SP ANY_NUM Setpoint for Low Low Low alarm (type must match IN) LLL
LLL_T UINT Delay time for Low Low Low alarm (ms) LLL
HYST ANY_NUM Hysteresis for the analog alarm (type must match IN) H, HH, HHH or L, LL, LLL
DH_SP ANY_NUM Setpoint for Deviation High alarm (type must match IN) DH
DH_T UINT Delay time for Deviation High alarm (ms) DH
DH_C ANY_NUM Compare value for Deviation High (type must match IN) DH
DH_Y ANY_NUM Hysteresis for Deviation High (type must match IN) DH
RH_SP ANY_NUM Setpoint for Rate of Change High alarm (type must match IN) RH
RH_T UINT Delay time for Rate of Change High alarm (ms) RH
RH_Y ANY_NUM Hysteresis for Rate of Change High (type must match IN) RH
Enable or Disable the Return to Normal (RTN)
Unacknowledged alarm state. The Returned to Normal
Auto Reset BOOL Unacknowledged alarm state is reached when the process N/A
returns within normal limits, and the alarm clears automatically
before an operator has acknowledged the alarm condition.
Enable or disable the ability for an operator to shelve an alarm.
A shelved alarm will temporarily be removed from the alarm
Alarm Shelving BOOL N/A
display, keeping nuisance trips or bad sensors from cluttering
the Alarm Viewer.
† Associated parameter is only available if the specific alarm type is configured

Instruction Guide GEI-100682AK 25


Public Information
Any Forces (ANY_FORCES)
Block Category: System
The Any Forces (ANY_FORCES) block provides information regarding the status of variable forcing within the controller. If
any variable is in a forced state within the controller, the Boolean output pin YES is set to True. In addition, the block
indicates the number of forced variables within the controller on integer output pin, NUMVARS.

ANY_FORCES Block

Input
Name Data Type Description
YES BOOL True if any variables are forced

Output
Name Data Type Description
NUMVARS INT Number of variables currently forced

26 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Application State (APP_STATE)
Block Category: System
The Application State (APP_STATE) block can be used to perform download and reboot checks. There can be only one APP_
STATE block in an application. All inputs and outputs are Boolean values. The two inputs of the block, DOWNLOAD_OK
and REBOOT_OK, are driven from user defined logical circuits. The APP_STATE block output, DOWNLOADING, is a
Boolean variable that indicates when a download is in progress. If the DOWNLOADING output of APP_STATE block is
True, then any changes to the DOWNLOAD_OK and REBOOT_OK input pins will not change the existing download and
reboot check status. Therefore, during downloading changes to the input pins are reflected in the download and reboot checks
only after the current download has been completed (when DOWNLOADING is False).

APP_STATE Block

If the APP_STATE block must perform download and reboot checks every frame, the
task containing the block must also run every frame.

Attention
ToolboxST Configuration
The APP_STATE block must not be used until after the input pins are configured. Configuring the APP_STATE block
involves the creation of suitable logic to drive the DOWNLOAD_OK and REBOOT_OK input pins. The user must create this
logic and consider the necessary inputs from field or application to produce Boolean signals for driving the APP_STATE
block inputs. The following figure is an example of possible input configuration where two control logics drive the two inputs
of APP_STATE block.

APP_STATE Block Configuration

Instruction Guide GEI-100682AK 27


Public Information
Impact of APP_STATE on Different Types of Downloads
All types of downloads including I/O pack, online, and offline (except Update DDR and Device Backup) are impacted by the
APP_STATE block. Update DDR and Device Backup are not affected. If the DOWNLOAD_OK input of the APP_STATE
block is True, all downloads will be allowed. If the DOWNLOAD_OK input is False, no downloads (except Update DDR
and Device Backup) will be allowed. The same rule applies when an I/O pack parameter download is requested from the
Component Editor Hardware tab. The Update DDR and Device Backup downloads do not change the application. Therefore,
they are not affected by the value of DOWNLOAD_OK.
Impact of the APP_STATE Block on Reboot Requests
If REBOOT_OK is True, reboot requests from the ToolboxST application will reboot the controller. If REBOOT_OK is
False, the controller will not reboot.
Disabling the Download and Reboot checks
The download and reboot checks are only performed when the APP_STATE block is in the application and has been
downloaded to the Mark VIe controller. After adding the block, if the user does not want to perform download and reboot
checks, then this feature can be disabled by forcing the DOWNLOAD_OK and REBOOT_OK inputs to True.
Precautions Before APP_STATE Deletion, Relocation, or Causing a Major Revision Mismatch

Removing the APP_STATE block from an application is not recommended as it adds


protection for the equipment.

Attention
The user must be very careful when either deleting or relocating the APP_STATE block or when generating a major
difference (for example, compressing variables or changing the network redundancy) with the controller. These operations
cause the variable addresses of the APP_STATE block to either change or be removed. In this case, if the current running
application has downloads/reboots disabled, there is no way to force the controller to allow downloads/reboots with the new
application. If this occurs the unit under control must be put in a state that allows downloads/reboots or, if appropriate, the
user must connect to the controller using the actively running application to force the DOWNLOAD_OK and REBOOT_OK
input pins to True.

Inputs
Name Data Type Description
When set to True, the controller allows downloads to occur.
DOWNLOAD_OK BOOL
When set to False, the controller rejects downloads.
When set to True, the controller allows reboots to occur.
REBOOT_OK BOOL
When set to False, the controller rejects reboots.

Output

Name Data Type Description


DOWNLOADING BOOL True when a download is in progress

28 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Average (ARRAY_AVERAGE)
Block Category: Array
The Array Average (ARRAY_AVERAGE) block performs the average of the input array IN at each scan the ENABLE pin is
True. It includes in the average the element whose corresponding INDEX_ENABLE array element is True. If the INDEX_
ENABLE pin is attached to a scalar variable, then all elements of the IN array are averaged. The average type performed
depends on the type enumerated on the TYPE pin.

Average Types
Average Type Value Description
Average Linear 1 Average of the elements of input IN(n).
Average of the elements of angle based inputs IN(n). It takes into account 0 degrees
equals/360 degrees wrap-around for angles. For each Linear Angle data point, the
direction vector is broken down into its corresponding x and y components. x(n)=cosine(IN
Average Linear Angle 2
(n)), y(n)=sine(IN(n)). The average of the x and y components are computed separately.
After the result is calculated, a final resulting output, OUT is determined from the x and y
components. Out = arctangent(y/x).
Average calculations are first calculated using:
y(n) = abs(IN(n))/IN(n) x arccos(abs(IN(n))).
Average Cosine Phi 3
If average y(n) is yAvg, then OUT = cos(yAvg).
For average type = cosine phi, the value of IN(n) is restricted to be within -1 to 1.

ARRAY_AVERAGE Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
IN REAL/LReal array Input Variable Array
TYPE ENUM(INT) Average Type
N Unsigned double integer Constant number of IN values to average
INDEX_ENABLE BOOL array Defines which array elements are included in the average.

Output
Name Data Type Description
OUT REAL Current average

Instruction Guide GEI-100682AK 29


Public Information
Array Calculator (ARRAY_CALC)
Block Category: Array
The Array Calculator (ARRAY_CALC) block is an expandable block that performs mathematical operations, defined by the
equation string, on up to 8 inputs, A(x), B(x), C(x), D(x), E(x), F(x), G(x), and H(x), for which the corresponding element in
the INDEX_ENABLE array is True, and places the result in the output variable, OUT(x). The data type of the inputs and
output is implied by the block data type selected in the Block Properties. Any modification to the equation string EQUAT
requires a re-download to the controller.
The INDEX_ENABLE pin is a Boolean array that determines whether the calculation specified by EQUAT is enabled for
elements “x”. For example, if Inputs A and B are arrays, then
IF (INDEX_ENABLE(x)) OUT(x) = A(x) + B(x);
If the variable attached to the INDEX_ENABLE pin is a scalar, then the value of the scalar determines if all the elements are
enabled on not.
IF (INDEX_ENABLE) OUT(x) = A(x) + B(x)
The 8 inputs are either arrays of size N or a scalar variable. If the input is a scalar, the operation for that input will be applied
to every element of the input arrays as defined by EQUAT.
For example, if A is a scalar and B is an array and EQUAT is A + B, then,
OUT(x) = A + B(x).
If A is a scalar and B is a scalar and EQUAT is A + B, then,
OUT(x) = A + B.
Another example, if A is a scalar and the EQUAT is A, then,
OUT(x) = A.
The following operators are supported within EQUAT:
+ (add), - (subtract), * (multiply), / (divide), ^ (power),
% (modulus), ABS() (absolute value), NEG() (negate),
LOG() (logarithm, base 10), LN() (natural logarithm),
EXP() (Exponential, e^x), RECIP (1/x)
RND() (round to nearest integer), SQR() (square root),
COS() (cosine), SIN() (sine), TAN() (tangent),
ACS() (arccosine), ASN() (arcsine), ATN() (arctangent).
The equation must be stated in terms of the operators and the A through H operands. The trigonometric functions expect angle
operands to be expressed in units of radians.
There is a limit of 64 elements (Operands and Operators) that may be specified in the equation string. For example, an
equation to ADD two input variables A+B, has two Operands (A and B) and one Operator (+): a total of three elements.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

30 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
ARRAY_CALC Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
A ANY_NUM_array† First operand
↓ ↓ ↓
H ANY_NUM_array† Eighth operand
N UINT Number of element of the array to evaluate.
INDEX_ENABLE BOOL array Defines which array elements are calculated per the equation
EQUAT String Equation string to be performed
† Array inputs are at least size N or a scalar.

Output
Name Data Type Description
OUT ANY_NUM_array† Output Array
† Array inputs are at least size N or a scalar.

Instruction Guide GEI-100682AK 31


Public Information
Array Compare (ARRAY_COMPARE)
Block Category: Array
The Array Compare (ARRAY_COMPARE) block compares two input values and sets an output Boolean as the result. The
input variable data type is implied by the block data type. Inputs IN1 is an array of at least size N. IN2 is either an array of at
least size N or a scalar.

ARRAY_COMPARE Block

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Comparison Functions
Function Description
GT Greater than
GE Greater than or equal
EQ Equal
NE Not equal
LT Less than
LE Less than or equal

32 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
COMPARE Blocks
Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity refers to the
tolerance band of the equality relationship. That is, IN1 is equal to IN2 if it is numerically within the band defined by IN2 ±
SENS. Hysteresis applies for all relationships. Once any relationship evaluates to True it must exceed the normal specification
by the value of HYST amount before it evaluates to False.

Greater Than

Instruction Guide GEI-100682AK 33


Public Information
Greater Than or Equal To

Equal To

34 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Not Equal

Less Than or Equal To

Instruction Guide GEI-100682AK 35


Public Information
Less Than

Inputs
Name Data Type Description
IN1 ANY_NUM_array The input to compare
IN2 ANY_NUM_array The input to compare against
FUNC ENUM (INT) The comparison function (GT, LT, GE, LE, EQ, NE) (Default: GT)
HYST ANY_NUM The hysteresis value
SENS ANY_NUM The sensitivity value
N UINT Number of elements in comparison

Output
Name Data Type Description
OUT BOOL array The result of the comparison

36 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Compress Boolean (ARRAY_COMPRESS)
Block Category: Boolean Operations
The Array Compress Boolean (ARRAY_COMPRESS) block packs up Boolean input arrays into a single integer array
variable. For example, if the input Booleans for a particular array index contain the values 0000 0000 0000 0101, the output
integer for that index will contain the value 5. The least significant input bit is IN0(x) and the most significant input bit is
IN15(x). Each input IN0-IN15 may be either a Boolean array or a single Boolean value. If the input is a single Boolean, its
value is used when compressing for all array indexes.
This is a rubber block that can accept a maximum of 16 inputs.

Note The Array Expand Integer (ARRAY_EXPAND) block performs the opposite operation of the ARRAY_COMPRESS
block.

ARRAY_COMPRESS Block

Inputs
Name Data Type Description
IN0 BOOL or BOOL array Contains the first input (least significant binary digit)
↓ ↓ ↓
IN15 BOOL or BOOL array Contains the sixteenth input (most significant binary digit)
N UINT Number of elements to compress
INDEX_ENABLE BOOL array Defines which array elements are included in the compress

Output
Name Data Type Description
OUT UINT array Contains the packed information

Instruction Guide GEI-100682AK 37


Public Information
Array Compress Boolean Long Integer
(ARRAY_COMPRESS_UDI)
Block Category: Boolean Operations
The Array Compress Boolean (ARRAY_COMPRESS) block packs up Boolean input arrays into a single integer array
variable. For example, if the input Booleans for a particular array index contain the values 0000 0000 0000 0101, the output
integer for that index will contain the value 5. The least significant input bit is IN0(x) and the most significant input bit is
IN31(x). Each input IN0-IN31 may be either a Boolean array or a single Boolean value. If the input is a single Boolean, its
value is used when compressing for all array indexes.
This is a rubber block that can accept a maximum of 32 inputs.

Note The Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) block performs the opposite operation of the
ARRAY_COMPRESS_UDI block.

ARRAY_COMPRESS_UDI Block

Inputs
Name Data Type Description
IN0 BOOL or BOOL array Contains the first input (least significant binary digit)
↓ ↓ ↓
IN31 BOOL or BOOL array Contains the thirty-second input (most significant binary digit)
N UINT Number of elements to compress
INDEX_ENABLE BOOL array Defines which array elements are included in the compress

Output
Name Data Type Description
OUT UINT array Contains the packed information

38 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Empty (ARRAY_EMPTY)
Block Category: Array
The Array Empty (ARRAY_EMPTY) block empties array elements into individual output pins. It is expandable up to 32
outputs. The block works in reverse of the ARRAY_FILL block. When the IN_INDEX input is 0 (default), the array copy
starts at 0 offset of the IN_ARRAY. OUT1 = IN_ARRAY[0], OUT2 = IN_ARRAY[1] and so forth. When the IN_INDEX
input is > 0, the block checks if there is a big enough array connected to the IN_ARRAY pin. If the array is not big enough,
the block does nothing. If the array size is within the copy range, it starts copying from the offset. As a rule, IN_INDEX
should be less than (length of IN_ARRAY minus number of output pins) for a copy to occur.

Note This block supports all data types. It is required that an array be connected to the input array and the data type of the
array is the same as the output pins.

ARRAY_EMPTY Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN_ARRAY ANY Input array
IN_INDEX Unsigned Long Offset in input array to start copy

Outputs
Name Data Type Description
OUT1 ANY Output 1
↓ ↓ ↓
OUT32 ANY Output 32

Instruction Guide GEI-100682AK 39


Public Information
Array Expand Integer (ARRAY_EXPAND)
Block Category: Boolean Operations
The Array Expand Integer (ARRAY_EXPAND) block transforms the unsigned integer input array into its binary equivalent
form and stores the expanded information into 16 Boolean output arrays. For example, if the value of the input for a particular
index is 5, the output Booleans contain the values 0000 0000 0000 0101 at the same array index. The least significant output
bit is pin OUT0(x) and the most significant output bit is pin OUTF(x).

Note The Array Compress Boolean (ARRAY_COMPRESS) block performs the opposite operation of the ARRAY_EXPAND
block.

ARRAY_EXPAND Block

Inputs
Name Data Type Description
IN UINT array Value to expand
N UINT Number of elements to expand
INDEX_ENABLE BOOL array Defines which array elements are included in the expansion

Outputs
Name Data Type Description
OUT0 BOOL array Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUTF BOOL array Contains the results of the expansion process (most significant binary digit)

40 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Expand Integer Long Integer (ARRAY_EXPAND_UDI)
Block Category: Boolean Operations
The Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) block transforms the unsigned integer input array into its
binary equivalent form and stores the expanded information into 32 Boolean output arrays. For example, if the value of the
input for a particular index is 5, the output Booleans contain the values 0000 0000 0000 0101 at the same array index. The
least significant output bit is pin OUT0(x) and the most significant output bit is pin OUT1F(x).

Note The Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI) block performs the opposite operation of the
ARRAY_EXPAND_UDI block.

ARRAY_EXPAND_UDI Block

Instruction Guide GEI-100682AK 41


Public Information
Inputs
Name Data Type Description
IN UINT array Value to expand
N UINT Number of elements to expand
INDEX_ENABLE BOOL array Defines which array elements are included in the expansion

Outputs
Name Data Type Description
OUT0 BOOL array Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUT1F BOOL array Contains the results of the expansion process (most significant binary digit)

42 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Fill (ARRAY_FILL)
Block Category: Array
The Array Fill (ARRAY_FILL) block fills an output array with input values. It is expandable up to 32 inputs. When the
OUT_INDEX input is 0 (default), the array copy starts at 0 offset of the OUT_ARRAY. OUT_ARRAY[0] = IN1, OUT_
ARRAY[1] = IN2 and so forth. When the OUT_INDEX input is > 0, the block checks if there is a big enough array connected
to the OUT_ARRAY pin. If the array does not have enough space the block does nothing. If the array size is within the copy
range it starts copying from the offset. As a rule OUT_INDEX should be less than [Length of OUT_ARRAY minus Number
of input pins] for a copy to happen.

Note This block supports all data types. It is required that an array be connected to the output and the data type of the array
is the same as the input pins.

ARRAY_FILL Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
OUT_INDEX BOOL Offset to start copy in output array
IN1 ANY Input 1
↓ ↓ ↓
IN32 ANY Input 32

Output
Name Data Type Description
OUT_ARRAY ANY Destination array

Instruction Guide GEI-100682AK 43


Public Information
Array Find Element (ARRAY_FIND)
Block Category: Array
The Array Find Element (ARRAY_FIND) block determines if a given value is present in a given array and reports a Boolean
status as to whether the value is found in the array. If the value is found, the block reports the index of the array element
containing the value. It also supports the ability to specify the starting index in the array from which to search (default is from
the start of the array). Additionally, it supports sensitivity input to be used when evaluating equality. If multiple array
elements contain the given value, the ARRAY_FIND block returns the index of the first matching element.

Note This is a variant block that supports the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer, and Boolean. Refer to the section Change Data Type of Variant Block.

ARRAY_FIND Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
Integer zero-based array index to begin searching from (default of 0, or beginning of
IN_INDEX UDINT the array). This should be less than the size of the array. If this value is greater than
the size of the array, then the search will begin from the beginning of the array.
IN_ARRAY[ ] ANY_NUM array Input array to be searched
IN_VALUE ANY_NUM Value to be searched for in the array
Sensitivity value. This is not applicable for the Boolean block data type. If SENS is
SENS ANY_NUM
less than 0, it will be treated as 0.

Outputs
Name Data Type Description
OUT BOOL Result of the find. True indicates that the value was found in the array.
OUT_INDEX UDINT Integer zero-based array index of the array element that matched the value.

44 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Minimum/Maximum Element Determination
(ARRAY_MINMAX)
Block Category: Array
The Array Minimum/Maximum Element Determination (ARRAY_MINMAX) block finds the location and value of the
minimum or maximum element in a given array. The input is a column array (IN) holding the floating-point/double entries
according to the variant of the block. The input pin N (specifying the size of the array) is an immediate pin. Therefore, it
cannot be changed while the controller is online.
There is only one failure mode for this block, the failure to properly specify an input array (has either more or less elements
than defined by the N).

Note This is a variant block that supports the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, and Unsigned Double Integer.

ARRAY_MINMAX Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
N Constant UINT Number of elements in input array IN
INDEX_ENABLE BOOL array Defines which array elements determine MAX/MIN
IN[ ] ANY_NUM array Array holding elements
FUNC Constant UINT Choice of operation { 0 for Maximum,1 for Minimum }

Outputs
Name Data Type Description
INDEX UINT Integer Zero-Based array Index for Min/Max Element (1st instance)
VALUE ANY_NUM Value of Min/Max element found

Instruction Guide GEI-100682AK 45


Public Information
Array Relay Ladder Logic (ARRAY_RUNG)
Block Category: Array
The Array Relay Ladder Logic (ARRAY_RUNG) block solves a Boolean equation of up to 16 input arrays. The arrays are of
size at least N. The equation is specified as a character string or can be configured through the Relay Ladder Logic editor in
the ToolboxST application. The equation may consist of up to 128 elements, or combinations of operators and operands. For
example, the equation A + B contains two operands and one operator for a total of three elements.

Supported Operators
Operation Operator
Parenthesis ()
NOT ~
OR +
AND *

RUNG Block

Inputs
Name Data Type Description
EQN Constant String Boolean equation
A BOOL array Required Boolean input used in equation
↓ ↓ ↓
P BOOL array Boolean input used in the equation
NVal Unsigned double integer Number of elements to evaluate

Output
Name Data Type Description
OUT_ARRAY BOOL array The result of the equation

46 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Array Sum (ARRAY_SUM)
Block Category: Array
The Array Sum (ARRAY_SUM) block performs a summation of all the elements of the input array IN. It includes the
element for which the corresponding INDEX_ENABLE array element is True.

ARRAY_SUM Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
IN REAL/LReal array Input Variable Array
N Unsigned double integer Constant number of IN values to be summed
INDEX_ENABLE BOOL array Defines which array elements are included in the summation

Output
Name Data Type Description
OUT REAL Current sum

Instruction Guide GEI-100682AK 47


Public Information
Average Input (AVRG)
Block Category: Math
The Average Input (AVRG) block performs a rolling average on the last N values of the input IN at each scan the ENABLE
pin is True. The N values used to calculate the rolling average are stored in the output array, ARRAY[N] and ARRAY[N]
must be defined with at least N elements. ARRAY[N] can be initialized to the current value of IN by setting the PRESET pin
to True. The block automatically performs a PRESET if the block detects that the value of N has changed after a download.

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

AVRG Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN REAL† Last input to be included in the rolling average
PRESET BOOL True to initialize all N values of ARRAY to current value of IN
N Unsigned double integer Constant number of IN values to average
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT REAL† Current rolling average
Storage for last N values of input, IN. This array must be defined with
ARRAY[N] REAL
at least N elements
† Value with status, if status option is enabled.

48 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Bit Counter (BIT_CNTR)
Block Category: Boolean Operations
The Bit Counter (BIT_CNTR) block counts the number of Boolean inputs that are currently set to 1. This is a rubber block
that can handle from 1 to 32 input Boolean variables. The resulting count is placed in the integer output COUNT.

BIT_CNTR Block

Inputs
Name Data Type Description
IN1 BOOL Input Boolean variable 1
↓ ↓ ↓
IN32 BOOL Input Boolean variable 32

Output
Name Data Type Description
COUNT UINT Number of input bits set to True

Instruction Guide GEI-100682AK 49


Public Information
Boolean Alarm (BOOLEAN_ALARM)
Block Category: Boolean Operations
The Boolean Alarm (BOOLEAN_ALARM) block documents the alarm configuration of a Boolean variable. It has no
associated runtime operation; it is effectively an application code comment. When the IN pin is connected to a Boolean
variable, the block displays the alarm configuration for that variable.
ToolboxST Configuration

➢ To insert the BOOLEAN_ALARM block in the ToolboxST application


1. From the Tree View, select a task to display the Block Diagram Editor in the Summary View.
2. From the Library View, select the BOOLEAN_ALARM block and drag and drop into the Diagram Editor.

Inserted BOOLEAN_ALARM Block

50 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
3. Double-click the IN pin and connect the global variable to the input.
a. Select Global Variable, then select (check) Create variable and enter the variable name, or click Browse
Globals to select a variable. Click OK.

BOOLEAN_ALARM Block Global Variable Connected to the Input

4. From the Block Diagram Editor, double-click the BOOLEAN_ALARM block and select the variable name.

Instruction Guide GEI-100682AK 51


Public Information
5. From the Property Editor, select Alarm, and then select Alarmed from the drop down list.

Configured BOOLEAN_ALARM Block

Inputs
Name Data Type Description
IN BOOL Connect to a Boolean variable to document its alarm configuration
Unshelve† BOOL When set to True when the alarm is shelved, will cause the alarm to unshelve
† Available only when the Alarm Shelving property is set to Enabled

52 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Bubble Sort (BSORT)
Block Category: Array
The Bubble Sort (BSORT) block sorts the input array, SRC, of data and transfers it to the sorted array, DEST. BSORT is
optimized for small variation in the input data, SRC[ ], between task performance by initially using the mapping from the
previous task scan, stored in array, INDEX[ ], to move the data in SRC[ ] to the output array, DEST[ ]. The algorithm checks
the array to make sure it is sorted using a comparison system and corrects any errors using a bubble sort algorithm. The
number of elements sorted is the least of N, the array size of SRC[ ], the array size of DEST[ ], or the array size of INDEX[ ].
The function is complete when the list is navigated completely without an exchange of data between elements of DEST[ ].

BSORT Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
N UDINT Number of elements in the array to be sorted
SRC[ ] REAL The input array

Outputs
Name Data Type Description
DEST[ ] REAL The sorted array
INDEX[ ] UDINT The mapping used to take the source array to the destination array

Instruction Guide GEI-100682AK 53


Public Information
Calculator (CALC)
Block Category: Math
The Calculator (CALC) block is an expandable block that performs mathematical operations as defined by the equation string
on up to eight inputs, A, B, C, D, E, F, G, and H, and places the result in the output variable, OUT. The data type of the inputs
and output is implied by the block data type selected in the Block Properties. Any modification to the equation string EQUAT
requires a re-download to the controller.

Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the CALC block.

The following operators are supported within EQUAT:

Note The equation must be stated in terms of the operators and the A through H operands. The trigonometric functions
expect angle operands to be expressed in units of radians.

+ (add), - (subtract), * (multiply), / (divide), ^ (power),


% (modulus), ABS() (absolute value), NEG() (negate),
LOG() (logarithm, base 10), LN() (natural logarithm),
EXP() (Exponential, e^x), RECIP (1/x)
RND() (round to nearest integer), SQR() (square root),
COS() (cosine), SIN() (sine), TAN() (tangent),
ACS() (arccosine), ASN() (arcsine), ATN() (arctangent).
There is a limit of 64 elements (Operands and Operators) that may be specified in the equation string. For example, an
equation to ADD two input variables A+B, has two Operands (A and B) and one Operator (+): a total of three elements.

CALC Block

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

54 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
This block propagates quality status if the status operations are enabled.

Block status modifications:

• When using the division operator (/), if the denominator = 0, the denominator will be replaced by 3.4e-38. The status will
be either LOW_LIMITED-CONFIGURATION_ERROR-BAD [5] if the numerator < 0 or HIGH_
LIMITED-CONFIGURATION_ERROR-BAD” [6] if the numerator > 0.
• When using the modulus operator (%), if the divisor = 0, the divisor will be replaced by 3.4e-38. The status will be either
LOW_LIMITED-CONFIGURATION_ERROR-BAD [5] if the dividend < 0 or HIGH_LIMITED-CONFIGURATION_
ERROR-BAD [6] if the numerator > 0.
• When using the RECIP() function, if the input operand A = 0, it is replaced by 3.4e-38. The status will be HIGH_
LIMITED-CONFIGURATION_ERROR-BAD [6].
• When using the SQR() function, if the input is negative, the output will be the square root of the absolute value of the
input. The status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD [4].
• When using the TAN() function, if the input operand A is equal to np + p/2 (where n is an integer), then OUT = 0.
• When using the LOG() function, if the input operand A is less than or equal to zero, then the output value is set to 0. The
status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD [4].
• When using the LN() function, if the input operand A is less than or equal to zero, then the output value is set to 0. The
status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD [4].
• When using the power operator (^), if the input operand A = 0 and operand B is not an integer, the calculation is done
with the rounded value of operand B. The status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD [4].
Refer to the Status Monitoring (STATUS_MONITORING) block.

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
A ANY_NUM† First operand
B ANY_NUM† Second operand
C ANY_NUM† Third operand
↓ ↓ ↓
H ANY_NUM† Eighth operand
EQUAT String Equation string to be performed
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Output
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 55


Public Information
Capture Data (CAPTURE)
Block Category: System
The Capture Data (CAPTURE) block collects multiple samples of 1 to 32 variables in a buffer that can be uploaded to
ToolboxST application or the Data Historian for display and analysis. Multiple clients may upload the same buffer. The block
supports a variety of triggering and sampling options. Changes to the configuration can only be accomplished by a download.
An optional, automatic re-enable feature allows the collector to re-arm for the next collection following a specified timeout
from the last upload.

CAPTURE Block

CAPTURE Block Expanded

56 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Function Description
The sensitivity applied to the trigger condition for trigger evaluation. (Default:
Level)
Constant
TR_TYPE Trigger Type Edge (1) – If the current trigger condition is True and the previous trigger
Tr_Type_T
condition is False, the trigger is True

Level (2) – If the current trigger condition is True, the trigger is True
If True, the block is automatically re-enabled for a new capture after the
Constant
AUTOENA Automatic Enable buffer is uploaded. Note: if automatic enabling is selected all manual enable
BOOL
inputs are ignored. (Default: False)
Constant Automatic Enable The number of seconds after the last upload before capturing is re-enabled –
ATOUT
UDINT Timeout only applicable if AUTOENA is True. (Default: 60 seconds)
Buffer Control – Controls how and when the data is collected. (Default:
NORMAL)

NORMAL (1) – PRE_SAM samples are collected before a trigger event.


POSTSAM samples are collected after the trigger event. Samples are
collected every FMULT scans. Capturing stops when the specified samples
have been collected, an upload command is received, or when the ENA_
CAP pin transitions to False if automatic re-enabling is not selected.

CIRCULAR (2) – Samples are collected indefinitely every FMULT scans. The
Constant
BUF_CTL Buffer Control buffer contains the newest PRE_SAM + POSTSAM samples unless
Buf_Ctl_T
capturing is stopped prior to filling the buffer. Capturing stops when an
upload command is received, or when the ENA_CAP pin transitions to False
if automatic re-enabling is not selected.

ONLY (3) – The trigger condition is evaluated each scan. Samples are only
collected when the trigger event is valid. The buffer contains PRE_SAM +
POSTSAM samples unless capturing is stopped prior to filling the buffer.
Capturing stops when the specified samples have been collected, an upload
command is received, or when the ENA_CAP pin transitions to False if
automatic re-enabling is not selected.
If True and the AUTOENA pin is False, enable the block for capture. This pin
gives the application code the ability to enable and disable data collection.
ENA_CAP BOOL Manual Enable This is an edge-triggered pin. Once a capture has been stopped the pin must
be toggled False and then True again to re-enable the next capture. (Default:
False)
Allows data to be collected slower than the performance rate of the block
(scan period) by specifying a multiple of the scan period for samples to be
Constant Sample Period
FMULT taken (only applies to Normal and Circular buffer control) (Default: 1)
UINT Multiplier
If a zero value is given, then the block will treat it as one Frame multiple.
Constant Post Trigger The number of samples to collect after and including the trigger event.
POSTSAM
UDINT Sample Size (Default: 100)
Constant Pre Trigger
PRE_SAM The number of samples to collect prior to the trigger event. (Default: 10)
UDINT Sample Size

Instruction Guide GEI-100682AK 57


Public Information
Inputs (continued)
Name Data Type Function Description
The relational comparison between the trigger variable (TR_VAR) and the
trigger value (TR_VAL), to be evaluated by the triggering logic each scan,
(Default: NE)

EQ (1) – TR_VAR must equal to TR_VAL

Constant GT (2) – TR_VAR must be greater than TR_VAL


TR_COND Trigger Condition
Tr_Cond_T
GE (3) – TR_VAR must be greater than or equal to TR_VAL

LT (4) – TR_VAR must be less than TR_VAL

LE (5) – TR_VAR must be less than or equal to TR_VAL

NE (6) – TR_VAR must not be equal to TR_VAL


Constant The value compared against the trigger variable for trigger evaluation.
TR_VAL Trigger Value
LREAL (Default: 0)
TR_VAR ANY Trigger Variable The variable against which the trigger condition is evaluated. (Default: 0)
Constant Time Stamp If True, the UTC time of each sample is collected with the sample. (Default:
TSTAMP
BOOL Enable False)
One to thirty-two variables to be collected each sample. The trigger variable
Collected
VAR1 ANY is not required to be one of the captured variables, but including it in the
Variables
variable list normally adds value to the collection.
↓ ↓ ↓ ↓
One to thirty-two variables to be collected each sample. The trigger variable
Collected
VAR32 ANY is not required to be one of the captured variables, but including it in the
Variables
variable list normally adds value to the collection.
Manual (1) – Captured data must be manually uploaded by the user.

Automatic (2) – Captured data is automatically uploaded by the data


collection system.

Trip (3) – Captured data is automatically uploaded by the data collection


system and is incorporated as part of the trip log.

Flash (4) – Captured data is written to flash disk on the controller. The last
UPL_TYPE Upl_Type_T three samples are preserved after which the oldest one is overwritten. This
works only when the BUF_CTL is set to NORMAL.

TripFlash (5) - This type is a combination of Trip and Flash types. The
Captured data is automatically uploaded by the data collection system and is
incorporated as part of the trip log. Also, the captured data is written to flash
disk on the controller and the last three samples are preserved after which
the oldest one is overwritten. Note: For proper operation, the BUF_CTL must
be set to NORMAL and the Compressed Data Log (CDL) feature must be
enabled.

58 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Outputs
Name Data Type Function Description
The current status of the capture:
DISABLED (0) – Not running
WAITING FOR TRIGGER (1) – Collecting pre-trigger samples
STATUS UINT Capture Status CAPTURING (2) – Collecting post-trigger samples
CAPTURE COMPLETE (3) – Data ready to be uploaded
LOCKED (8003H) – The buffer is locked by an upload to another client
FLASH WRITING (4) – The captured samples are being written to flash.
DONE BOOL Capture Done Set to True when a buffer is ready to be loaded

Theory of Operation
The Capture block is a software function used to collect application variables in real-time for offline display and analysis. The
core software is shared between the Capture block and Dynamic Data Recorders (DDRs). The main differences between them
are:

• Capture blocks require an application code download to configure, while DDRs are configured by an independent
download mechanism.
• Capture blocks are embedded in the application code and can be used to catch events that occur between application code
blocks. DDRs perform outside of the application code and can only sample data after all of the application code has
performed in a particular frame.
• Capture blocks perform at the same priority as the other application code and so insure the highest data fidelity. DDRs
perform at a lower priority than the application code and are not guaranteed to catch data transitioning at frame rate.
The Capture block collects data sets of variables, known as samples and stores them in a local buffer. The buffer may be
uploaded to one or more client devices. Once uploaded the block may be re-armed to take another collection. Typically, for
clients other than ToolboxST application the status pin must be mapped to EGD so that it can be monitored outside the
controller. Once an upload is in progress, the buffer is locked to prevent it from being re-armed during the data transfer.
Multiple clients may upload the buffer simultaneously. The block ignores the transitions of its ENA_CAP pin until all clients
have been serviced.
Data collection is managed by specifying a buffer control mode and a trigger event. There are three buffer control modes. A
NORMAL collection is one where a specified number of samples are collected prior to a trigger event and a specified number
of samples are collected after the trigger event. Once the trigger event has been found to be satisfied it is no longer evaluated.
A CIRCULAR collection is one where no trigger event is specified and samples are taken indefinitely until the collection is
halted by requesting an upload or disabling the block. An ONLY collection is one where samples are only collected if the
specified trigger event is True each opportunity the block has to collect a sample. This is useful when collecting data around
an event that occurs sporadically.
A trigger event is completely specified by selecting a trigger condition, a trigger type, a trigger variable, and a trigger value.
The trigger variable is an application variable that the block monitors. It is compared against a trigger value using the
relational specifications of the trigger condition, and the sensitivity of the trigger type. Acceptable trigger conditions include
EQUAL TO, NOT EQUAL TO, GREATER THAN, GREATER THAN OR EQUAL TO, LESS THAN, and LESS THAN OR
EQUAL TO. Acceptable trigger types include LEVEL or EDGE. A level trigger is one that is satisfied at present, regardless
of past values. An edge trigger is one that is satisfied at present but was not satisfied at the previous evaluation.

Configuration
The Capture block may be re-configured by either an offline or online download. Downloading causes the states of ALL
Capture blocks in the controller to be re-initialized, invalidating any data that may be in the process of being collected.
Therefore, if external blockware is used to sequence to collection of data, it must be sufficiently robust to recover from such a
re-initialization. This may be accomplished by examining the DONE and STATUS pins or through timeouts.

Instruction Guide GEI-100682AK 59


Public Information
Enabling Collections
A new collection may be enabled manually through blockware, or automatically, if so configured. If manual enabling is
selected, the application code must toggle the ENA_CAP to False for at least one frame then back to True to re-enable a
collection. Additionally, the block ignores all transitions of the ENA_CAP pin while the buffer is locked for uploading so this
toggling must occur when the buffer is unlocked. If automatic enabling is selected, the block is initially enabled and all
transitions of the ENA_CAP pin are ignored. The block will re-enable a capture after at least one upload occurs, and no new
upload requests are received within ATOUT seconds following the completion of the last upload. Uploading a collection that
is not complete automatically changes the block status to complete. Another upload is not necessary to re-enable the next
collection.

Note A variable needs to be connected to the Status pin to enable the automatic upload functionality of the CAPTURE block
in the WorkstationST* application.

Triggering Issues
The trigger event is evaluated differently for each of the buffer control modes. For the NORMAL and CIRCULAR modes the
sample period multiplier pin, FMULT allows the block to collect samples at rates slower than the block performs, thereby
extending its range. A sample is only collected every FMULT scans. Using the NORMAL mode, the trigger event is evaluated
every scan regardless of the value of FMULT. When the event occurs, the sample is collected and post-trigger samples are
collected every FMULT scans away from the trigger sample. Note that because the trigger sample may not occur on an
FMULT boundary, the time between the last pre-trigger sample and the trigger sample may not be the same when FMULT is
not equal to one.

60 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Buffer Control Details

NORMAL
NORMAL mode is used to collect samples before and after a specified trigger event.
Once enabled, the block begins collecting pre-trigger samples, retaining the most recent PRE_SAM samples before a trigger
event occurs. Once the trigger occurs, the block collects POSTSAM more samples before changing the STATUS pin to
Complete. The trigger sample is included in the post sample count. Typically the buffer will contain PRE_SAM + POSTSAM
total samples. If the trigger occurs prior to collecting all of the pre-trigger samples, or the collection is halted prior to
capturing all of the post trigger samples this may not be the case.

CIRCULAR
CIRCULAR mode is used to collect samples continuously until the buffer is manually stopped. Specifying a trigger event is
meaningless in this mode.
Once enabled, the block begins collecting samples, retaining the most recent PRE_SAM + POSTSAM total samples. It is
possible for the buffer to contain fewer samples if the collection is halted prematurely.

ONLY
ONLY mode is used to collect samples only when the trigger event is True. The FMULT pin is ignored in this mode.
Once enabled, the block begins looking for trigger events every scan but only collects samples on the scans where the trigger
event is True. The block collects the first PRE_SAM + POSTSAM trigger samples before changing the STATUS pin to
Complete. It is possible for the buffer to contain fewer samples if the collection is halted prematurely.

Time Stamping
The TSTAMP pin specifies whether wall clock time (in UTC format) is collected with each sample, or whether it is collected
only at the trigger event and all other sample times are extrapolated from the block performance period modified by FMULT.
It is recommended that TSTAMP always be left True, to insure that trends are displayed with the most accurate timestamp
information.

Instruction Guide GEI-100682AK 61


Public Information
Capture Status
The state of each collection is expressed through the DONE and STATUS output pins. The DONE pin may be monitored by
application code to drive manual reset algorithms. The STATUS pin provides more detailed state information and is usually
published on EGD for use by external clients. The definition of the states is affected by the specified buffer control mode and
is provided in the following table.

Buffer Control Mode Affected States


Status BUF_CTL Description
DISABLED All Prior to being enabled for the first time (manual enable mode only)
NORMAL Collecting pre-trigger samples while looking for a trigger
WAITING CIRCULAR Does not occur
ONLY Waiting for a trigger to occur
NORMAL Collecting post-trigger samples
CAPTURING CIRCULAR Collecting samples
ONLY Collecting a trigger sample
COMPLETE All No longer collecting, ready to be uploaded, ready to be re-enabled
NORMAL Writing the pre-trigger and post-trigger samples to flash.
FLASHWRITING CIRCULAR Does not occur
ONLY Does not occur

Redundancy Issues
Like all application code blocks configured in a redundant controller system, the Capture block is replicated faithfully in each
controller. However, unlike other blocks, the Capture block maintains un-voted internal state information in each controller.
This independence allows the block to trigger on and capture data that may be different in each controller (for example,
anti-voted data). Likewise the communication channel established between the block and an external client (for example,
ToolboxST application) for an upload is not replicated to any redundant controllers. The STATUS and DONE pins are not
voted and as a result may not always track between controllers. This is normal if a capture is terminated early by an upload
request or anti-voted data is used in the trigger specification. Application writers who want to monitor these pins through
blockware should be aware of this discrepancy.

Note For potential application code pitfalls, refer to the section Redundancy Issues.

62 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Memory Use
Capture blocks consume RAM memory from the system memory pool to create the capture buffers. The allocation of memory
in the controller is a compromise that must be made considering the amount of real RAM available, the amount required for
application code, the amount needed for data collection (for example, Capture blocks and DDRs), and a free pool necessary
for support services, such as ToolboxST application and HMI connections.
The amount of memory required for a particular CAPTURE block may be calculated as the number of samples times the sum
of the size of each collected variable. If time-stamping is enabled add 8 bytes times the number of samples. For example, if a
CAPTURE block is configured to collect 1000 total samples where each sample contains two Reals, three Short Integers, and
five Booleans, and time-stamping is enabled, the amount of memory required for the captured data is:
1000 x ((2 x 4) + (3 x 2) + (5 x 1) + 8) = 27,000 bytes

Data Type Size (Bytes)


Boolean (BOOL) 1
Short Integer (INT) 2
Unsigned Sort Integer (UINT) 2
Long Integer (DINT) 4
Unsigned Long Integer (UDINT) 4
Float (REAL) 4
Long Float (LREAL) 8

Instruction Guide GEI-100682AK 63


Public Information
Change Detection (CHG_DET)
Block Category: Sequencing
The Change Detection (CHG_DET) block sets the OUT to True whenever it detects a difference between IN and STATE
greater than the absolute value of DBAND, effectively generating a Boolean pulse that may be used to synchronize other
blocks. In addition a symmetric range around zero may be specified by NZBAND that will cause the output to pulse
whenever IN moves into it, regardless of the size of the step change made to get there. Once inside NZBAND, IN must move
equal to or outside DBAND to reset the near zero detection function.

Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the outpin must match with the selected data
type of the block. Refer to the section Change Data Type of Variant Block.

Inputs
Name Data Type Description
IN ANY The variable to watch
The maximum numerical difference (deadband) that will not be detected. This pin is
DBAND ANY
inactivated for CHG_DET_B.
The range around zero (near zero band) that when entered by IN will cause OUT to
NZBAND ANY be pulsed True even if the change to get there was less than the DBAND value. This
pin is inactivated for CHG_DET_B.

Output
Name Data Type Description
OUT ANY True when a change is detected or when entering near zero, otherwise False

States
Name Data Type Description
STATE ANY The value of IN at the last detected change
NZFLAG BOOL Near Zero Flag. Not used for CHG_DET_B.

64 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Clamp (CLAMP)
Block Category: Math
The Clamp (CLAMP) block restricts the output to values defined by MIN and MAX. Outputs IN_MIN or IN_MAX become
True to indicate a low or high limitation active.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

CLAMP Block

This block propagates quality status if the status operations are enabled.

Block status modifications: OUT status is propagated from IN status. The status of OUT is modified to include HIGH_
LIMITED or LOW_LIMITED when applicable. For example:

• If IN status = NOT_LIMITED-GOODN” [128]


• And OUT = MAX, then OUT status = HIGH_LIMITED-GOODNC [130]
• Or OUT = MIN, then OUT status = LOW_LIMITED-GOODNC [129]
• Or MIN < OUT < MAX, then OUT status = NOT_LIMITED-GOODNC [128]
Refer to the Status Monitoring (STATUS_MONITORING) block.

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
MAX ANY_NUM Maximum limit
IN ANY_NUM† Value to be clamped
MIN ANY_NUM Minimum limit
†Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT ANY_NUM† Clamped output
IN_MAX BOOL Output is clamped at HILIM
IN_MIN BOOL Output is clamped at LOLIM
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 65


Public Information
Code Timer (CODETIMER)
Block Category: System
The Code Timer (CODETIMER) block calculates the time in microseconds between successive performances of the block. It
is used to determine how much time it takes to run a section of blockware, or how often a task runs in the controller. The
CODETIMER block calculates the interval of time, sweep, which passes between successive performances of the block, and
stores the result in output DELTA. The block may be used to measure the scan period of a task by inserting a block at the start
of the task. It is used to measure the performance time of a group of blocks by placing a CODETIMER block before and after
the group and tying the DTIME pin of both blocks together. The correct time is displayed by the output DELTA of the second
CODETIMER block in that configuration.
The CODETIMER block collects statistical information about the sweep times measured. The PBAND pin is used to specify
a time period for which no statistical data is collected, allowing the block to be configured to filter all but the worst-case
performance times. The worst sweep times are stored in output variables WORST1 to WORST5 with WORST1 being the
highest time. The output variable SWEEPS provides the number of block performances since the block is enabled. The MIN
and MAX output variables indicate the lowest and highest sweep time respectively. To eliminate any known constant delays, a
value placed on the OFFSET pin is subtracted from the time period measured. Toggle the ENABLE pin to reset the block to
its old statistics and start up. To calculate the average performance time connect the CODETIMER block with the FIR block.

Note The block functionality is not supported in the Virtual Controller. All the outputs default to a value of 0 except for the
MIN, which defaults to 4294267295.

CODETIMER Block

CODETIMER Block Expanded

66 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
OFFSET UINT Calibration offset in microseconds
PBAND REAL Minimum time of sweep in microseconds to collect statistics on

Outputs
Name Data Type Description
MAX LREAL The longest period in microseconds between block performances
MIN LREAL The shortest period in microseconds between block performances
DELTA LREAL The time in microseconds since the last performance of the block
NPBAND UDINT The number of sweep times that have been longer than PBAND
SWEEPS UDINT The number of performance cycles recorded
WORST1 LREAL The longest sweep time greater than PBAND
WORST2 LREAL The second longest sweep time greater than PBAND
WORST3 LREAL The third longest sweep time greater than PBAND
WORST4 LREAL The fourth longest sweep time greater than PBAND
WORST5 LREAL The fifth longest sweep time greater than PBAND

State
Name Data Type Description
DTIME LREAL Internal State Variable

Instruction Guide GEI-100682AK 67


Public Information
Command Disable (CMD_DISABLE)
Block Category: Communications
The Command Disable (CMD_DISABLE) block conditionally disables the reception of commands from EGD CMP, Modbus
Master, OPCUA, and Web clients.

Note This block is supported in all platforms and in all redundancy configurations.

Only one instance of this block is allowed per controller set.

Attention
For each command type there is a disable pin to disable commands of that type. If the ALL_DIS pin is set to True, commands
of all types are disabled regardless of their individual disable pin value. If a command type is disabled, the reception of a
command of that type is silently ignored by default. Each command type has an error/NAK enable pin which causes the
reception of a command of the given type to be responded to with an error value selected by the error/NAK value pin.

CMD_DISABLE Block

68 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
When set to True, disables write commands from EGD CMP, Modbus
ALL_DIS BOOL Master, OPCUA, and Web clients. When set to False, enables write
commands from EGD CMP, Modbus Master, OPCUA, and Web clients.
EGD_CMP_DIS BOOL When set to True, disables EGD CMP client write commands.
When set to True and EGD CMP commands are disabled, responds to
EGD_CMP_ERR_ENA BOOL
EGD CMP client write request with an error code.
Error code response to EGD CMP client. The error code is embedded in
EGD_CMP_ERR_VAL UDINT
the message returned to the EGD CMP client.
MBUS_DIS BOOL When set to True, disables Modbus Master write commands.
When set to True and Modbus commands are disabled, responds to
MBUS_NAK_ENA BOOL
Modbus Master write request with a NAK code.
MBUS_NAK_VAL UDINT NAK code response to Modbus Master.
OPC_DIS BOOL When set to True, disables OPCUA client write commands.
When set to True and OPCUA commands are disabled, responds to
OPC_ERR_ENA BOOL
OPCUA client write request with an error code.
Error code response to OPCUA client.
Error Name OPCUA Error Code
OPC_ERR_VAL UDINT OpcUa_Good 0
OpcUa_Uncertain 0x40000000
OpcUa_Bad 0x80000000
WEB_DIS BOOL When set to True, disables Web client write commands.
When set to True and Web commands are disabled, responds to Web
WEB_ERR_ENA BOOL
client write request with an error code.
WEB_ERR_VAL UDINT Error code response to Web client.

Instruction Guide GEI-100682AK 69


Public Information
Comment (_COMMENT)
Block Category: System
The Comment (_COMMENT) block adds comment text in the block diagram. The block inserts a line break as viewed from
the tool and on the printed page. The comment will appear on the left side of the page on the next line after the previous
block. The text of the comment is added in the Property View on the lower left side of the screen. The Show Description
property must be set to True to display the entire text of the comment.
The COMMENT block also controls the Mode (flow mode or list mode) of the diagram to the next comment block (or end of
the code if there are no subsequent comment blocks).

70 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Comment Block Functionality (_COMMENT_BF)
Block Category: Legacy, System

Note This block is not recommended for use in any new controller applications (ControlST V05.02 or later). Refer to the
section Legacy Category Blocks.

The Comment Block Functionality (_COMMENT_BF) block adds comment text in the block diagram. The block inserts a
line break as viewed from the tool and on the printed page. The comment will display on the left side of the page on the next
line after the previous block. The text of the comment is added in the Property View on the lower left side of the screen. The
Show Description property must be set to True to display the entire text of the comment.
The COMMENT_BF block also controls the mode (Flow or List mode) of the diagram to the next comment block (or end of
the code if there are no subsequent comment blocks).

Instruction Guide GEI-100682AK 71


Public Information
Comment No Break (_COMMENT_NB)
Block Category: System
The Comment No Break (_COMMENT_NB) block adds comment text in the block diagram without causing a page break.
The comment will appear after the next break in connected blocks. The text of the comment is added in the Property View on
the lower left side of the screen. The Show Description property must be True to display the entire text of the comment.
The COMMENT_NB block also controls the Mode (flow mode or list mode) of the diagram to the next Comment block (or
end of the code if there are no subsequent comment blocks).

72 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Compare (COMPARE)
Block Category: Comparison
The Compare (COMPARE) block compares two input values and sets an output Boolean as the result. The input variable data
type is implied by the block data type.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Note Annunciation of Overtemp for Mark VIe I/O Packs and Annunciation of Controller TMR Heartbeat Status Not OK are
logic examples of using the COMPARE block.

Comparison Functions
Function Description
GT Greater than
GE Greater than or equal
EQ Equal
NE Not equal
LT Less than
LE Less than or equal

COMPARE Blocks
Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity refers to the
tolerance band of the equality relationship. That is, IN1 is equal to IN2 if it is numerically within the band defined by IN2 ±
SENS. Hysteresis applies for all relationships. Once any relationship evaluates to True it must exceed the normal specification
by the value of HYST amount before it evaluates to False.

Instruction Guide GEI-100682AK 73


Public Information
Greater Than

Greater Than or Equal To

74 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Equal To

Not Equal

Instruction Guide GEI-100682AK 75


Public Information
Less Than or Equal To

Less Than

76 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
FUNC ENUM (integer) The comparison function (GT, LT, GE, LE, EQ, NE). (Default: GT)
HYST ANY_NUM The hysteresis value
SENS ANY_NUM The sensitivity value

Output
Name Data Type Description
OUT BOOL The result of the comparison

Instruction Guide GEI-100682AK 77


Public Information
Compress Boolean (COMPRESS)
Block Category: Boolean Operations
The Compress Boolean (COMPRESS) block packs up Booleans inputs into a single integer variable. For example, if the input
Booleans contain the values 0000 0000 0000 0101, the output integer will contain the value 5. The least significant input bit is
IN0 and the most significant input bit is IN15. This is a rubber block that can accept a maximum of 16 inputs.

Note The Expand Integer (EXPAND) block performs the opposite operation of the COMPRESS block.

COMPRESS Block

Inputs
Name Data Type Description
IN0 BOOL Contains the first input (least significant binary digit)
↓ ↓ ↓
IN15 BOOL Contains the sixteenth input (most significant binary digit)

Output
Name Data Type Description
OUT UINT Contains the packed information

78 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Compress to Long Integer (COMPRESS_UDI)
Block Category: Boolean Operations
The Compress to Long Integer (COMPRESS_UDI) block is an expandable block of up to 32 inputs that converts Boolean
inputs into a single unsigned double integer. For example, if the input Booleans contain the values 0000 0000 0000 0000 0000
0000 0000 0101, the output integer will be 5. The least significant input bit is IN0 and the most significant input bit is IN31.

Note The Expand Long Integer (EXPAND_UDI) block performs the opposite operation of the COMPRESS_UDI block.

COMPRESS_UDI Block

Inputs
Name Data Type Description
IN0 BOOL Contains the first input (least significant binary digit)
↓ ↓ ↓
IN31 BOOL Contains the thirty-second input (most significant binary digit)

Output
Name Data Type Description
OUT Unsigned double integer Contains the packed information

Instruction Guide GEI-100682AK 79


Public Information
Controller Monitor (CTRLR_MON)
Block Category: System
The Controller Monitor function block (CTRLR_MON) provides the application code with basic information about the
controllers in the unit. One set of the outputs supplied by the block is ONLINE_R/S/T. These signals are set to TRUE when
ControllerStateHeartbeat_R/S/T are incrementing, and are set to FALSE when ControllerStateHeartbeat_R/S/T are not
incrementing. A configurable filter allows you to adjust the timeout.

Only one instance of this block is allowed per controller set.

Attention

Note From the ToolboxST Component Editor Software tab, press F1 for more information on the ControllerStateHeartbeat
intrinsic variable.

The Controller Monitor (CTRLR_MON) block is used for the following purposes:

• The Block has a POWER_UP output that transitions to True 5 secs after the controller is in control mode. SIG_FORCED
turns on if there are any forced variables in the controller, SIG_FORCED is set to False for 2 s every time the number of
forced variables is increased. SIG_FORCED_NUM indicates the number of forced variables in the controller.
• The block detects the current controller configuration (simplex, dual, or TMR). According to this configuration,
over-temperature alarms OVERTEMP_R, OVERTEMP_S, OVERTEMP_T and controller online variables ONLINE_R,
ONLINE_S, and ONLINE_T are generated for R, S and T, respectively.

Note In the virtual controller, the OVERTEMP_R, OVERTEMP_S and OVERTEMP_T are all False because there is
no temperature measurement functionality. ONLINE_S and ONLINE_T are always False regardless of the controller
configuration (Simplex, Dual or TMR).

• The input ONLINE_FL_TMR is used to delay the controller online variables change from True to False in the event that
the controller heartbeat stops.
• The outputs HW_ALARM_R, HW_ALARM_S, HW_ALARM_T are set to True whenever a hardware failure diagnostic
is generated for R, S and T controllers respectively. The outputs FAN1_FAIL_R, FAN1_FAIL_S and FAN1_FAIL_T are
set to True whenever a FAN 1 failure is detected for R, S and T controllers respectively (applicable to UCSB only). The
outputs FAN2_FAIL_R, FAN2_FAIL_S and FAN2_FAIL_T are set to True whenever a FAN 2 failure is detected for R, S
and T controllers respectively (applicable to UCSB only). Fans 1 and 2 are available only in UCSB, and the
corresponding failure outputs will be False for other platforms.
• The outputs MEM_LOW1_R, MEM_LOW1_S, MEM_LOW1_T are set to True when more than 70% of RAM memory
has been used. Otherwise, these outputs remain False for R, S and T controllers, respectively. The outputs MEM_LOW2_
R, MEM_LOW2_S, MEM_LOW2_T are True when more than 95% of RAM memory has been used. Otherwise, these
outputs remain False for R, S and T controllers, respectively.

Note CTRLR_MON creates global variables that can be used throughout the controller application logic.

80 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
CTRLR_MON Block

Instruction Guide GEI-100682AK 81


Public Information
Mark VIe Controller Platforms
Output Pins UCCA UCCC UCSA UCSBH1/H4 UCSBH3 UCSC/UCSD
True: Controller has been powered up and is controlling
POWER_UP
False: Controller has not reached controlling state
True: At least one signal is forced
SIG_FORCED
False: No forced signals or set to False for 2 s every time the number of forced variables are increased
SIG_FORCED_NUM Number of forced signals in the application
True: CPU temperature too high True: CPU temperature too high
OVERTEMP_R N/A (False)
False: CPU temperature normal False: CPU temperature normal
True: CPU temperature too high True: CPU temperature too high
OVERTEMP_S N/A (False)
False: CPU temperature normal False: CPU temperature normal
True: CPU temperature too high True: CPU temperature too high
OVERTEMP_T N/A (False)
False: CPU temperature normal False: CPU temperature normal
True: R Controller is Online
ONLINE_R
False: R Controller is not Online
True: S Controller is Online
ONLINE_S
False: S Controller is not Online
True: T Controller is Online
ONLINE_T
False: T Controller is not Online
True: R controller hardware failure has occurred
HW_ALARM_R
False: No R controller hardware failure
True: S Controller hardware failure has occurred
HW_ALARM_S
False: No S controller hardware failure
True: T Controller hardware failure has occurred
HW_ALARM_T
False: No T Controller hardware failure

82 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Mark VIe Controller Platforms (continued)
Output Pins UCCA UCCC UCSA UCSBH1/H4 UCSBH3 UCSC/UCSD
True: R Controller Fan1 not functioning
FAN1_FAIL_R N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: R Controller Fan1 is functioning
True: S Controller Fan1 not functioning
FAN1_FAIL_S N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: S Controller Fan1 is functioning
True: T Controller Fan1 not functioning
FAN1_FAIL_T N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: T Controller Fan1 is functioning
True: R Controller Fan2 not functioning
FAN2_FAIL_R N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: R Controller Fan2 is functioning
True: S Controller Fan2 not functioning
FAN2_FAIL_S N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: S Controller Fan2 is functioning
True: T Controller Fan2 not functioning
FAN2_FAIL_T N/A (False) N/A (False) N/A (False) N/A (False) N/A (False)
False: T Controller Fan2 is functioning
False: R controller RAM memory usage is less than 70% of total RAM memory
MEM_LOW1_R
True: R controller RAM memory usage is more than 70% of total RAM memory
False: S controller RAM memory usage is less than 70% of total RAM memory
MEM_LOW1_S
True: S controller RAM memory usage is more than 70% of total RAM memory
False: T controller RAM memory usage is less than 70% of total RAM memory
MEM_LOW1_T
True: T controller RAM memory usage is more than 70% of total RAM memory
False: R controller RAM memory usage is less than 95% of total RAM memory
MEM_LOW2_R
True: R controller RAM memory usage is more than 95% of total RAM memory
False: S controller RAM memory usage is less than 95% of total RAM memory
MEM_LOW2_S
True: S controller RAM memory usage is more than 95% of total RAM memory
False: T controller RAM memory usage is less than 95% of total RAM memory
MEM_LOW2_T
True: T controller RAM memory usage is more than 95% of total RAM memory

GEI-100682AK Instruction Guide 83


Public Information
Input
Initial Interface
Name Description Type Visibility Usage
Value Type
ONLINE_FL_TMR Online Fail Triple Modular Redundancy UDINT 5000 ms Parameter Input Value only

Outputs
Initial Interface
Name Description Type Visibility Usage
Value Type
HW_ALARM_R R Controller Hardware Failure Alarm BOOL False Always Output Value only
HW_ALARM_S 1 S Controller Hardware Failure Alarm BOOL False Always Output Value only
HW_ALARM_T 2 T Controller Hardware Failure Alarm BOOL False Always Output Value only
FAN1_FAIL_R R Controller Fan1 Failure BOOL False Always Output Value only
FAN1_FAIL_S 1 S Controller Fan1 Failure BOOL False Always Output Value only
FAN1_FAIL_T 2 T Controller Fan1 Failure BOOL False Always Output Value only
FAN2_FAIL_R R Controller Fan2 Failure BOOL False Always Output Value only
FAN2_FAIL_S 1 S Controller Fan2 Failure BOOL False Always Output Value only
FAN2_FAIL_T 2 T Controller Fan2 Failure BOOL False Always Output Value only
POWER_UP Controller Powered Up BOOL 0 Always Output Value only
SIG_FORCED Signal Forced In Controller BOOL False Always Output Value only
SIG_FORCED_NUM Number of Forced Signals INT 0 Always Output Value only
OVERTEMP_R R Controller Over Temperature BOOL False Always Output Value only
OVERTEMP_S 1 S Controller Over Temperature BOOL False Always Output Value only
OVERTEMP_T 2 T Controller Over Temperature BOOL False Always Output Value only
ONLINE_S 1 R Controller Online BOOL False Always Output Value only
ONLINE_R S Controller Online BOOL False Always Output Value only
ONLINE_T 2 T Controller Online BOOL False Always Output Value only
MEM_LOW1_R R Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW1_S 1 S Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW1_T 2 T Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW2_R R Controller Low Memory 2 BOOL False Always Output Value only
MEM_LOW2_S 1 S Controller Low Memory 2 BOOL False Always Output Value only
MEM_LOW2_T 2 T Controller Low Memory 2 BOOL False Always Output Value only
1 Exists only when the controller’s redundancy is dual or TMR
2 Exists only when the controller’s redundancy is TMR

84 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Global Variables
EGD
Alarm External
Global Pin Name Description Alarm Event Default
Class Access
Page
HW_ALARM_R R Controller Hardware Failure Alarm Alarmed Diag False $Default Read Only
HW_ALARM_S 1 S Controller Hardware Failure Alarm Alarmed Diag False $Default Read Only
HW_ALARM_T 2 T Controller Hardware Failure Alarm Alarmed Diag False $Default Read Only
FAN1_FAIL_R R Controller Fan1 Failure Alarmed Diag False $Default Read Only
FAN1_FAIL_S 1 S Controller Fan1 Failure Alarmed Diag False $Default Read Only
FAN1_FAIL_T 2 T Controller Fan1 Failure Alarmed Diag False $Default Read Only
FAN2_FAIL_R R Controller Fan2 Failure Alarmed Diag False $Default Read Only
FAN2_FAIL_S 1 S Controller Fan2 Failure Alarmed Diag False $Default Read Only
FAN2_FAIL_T 2 T Controller Fan2 Failure Alarmed Diag False $Default Read Only
POWER_UP Controller Powered Up Not Alarmed N/A False N/A Read Only
SIG_FORCED Signal Forced In Controller Alarmed Diag False N/A Read Only
SIG_FORCED_NUM Number of Forced Signals Not Alarmed N/A False N/A Read Only
OVERTEMP_R R Controller Over Temperature Alarmed Diag False $Default Read Only
OVERTEMP_S 1 S Controller Over Temperature Alarmed Diag False $Default Read Only
OVERTEMP_T 2 T Controller Over Temperature Alarmed Diag False $Default Read Only
ONLINE_R R Controller Online Not Alarmed N/A False $Default Read Only
ONLINE_S 1 S Controller Online Not Alarmed N/A False $Default Read Only
ONLINE_T 2 T Controller Online Not Alarmed N/A False $Default Read Only
MEM_LOW1_R R Controller Low Memory 1 Alarmed Diag False $Default Read Only
MEM_LOW1_S 1 S Controller Low Memory 1 Alarmed Diag False $Default Read Only
MEM_LOW1_T 2 T Controller Low Memory 1 Alarmed Diag False $Default Read Only
MEM_LOW2_R R Controller Low Memory 2 Alarmed Diag False $Default Read Only
MEM_LOW2_S 1 S Controller Low Memory 2 Alarmed Diag False $Default Read Only
MEM_LOW2_T 2 T Controller Low Memory 2 Alarmed Diag False $Default Read Only
1 Exists only when the controller’s redundancy is dual or TMR
2 Exists only when the controller’s redundancy is TMR

Instruction Guide GEI-100682AK 85


Public Information
Count Down (CTD)
Block Category: Timers and Counters
The Count Down (CTD) block counts down and the counter, CUR_CNT, is decremented upon each rising edge of the DEC
pin. CUR_CNT is only decremented as long as the ENABLE pin is True. If ENABLE is False, the countdown is suspended
but CUR_CNT holds its value. By default, the ENABLE pin is True. If RESET is True, the countdown is suspended and the
value of CUR_CNT is set to MAX_CNT. MAX_CNT must be greater than or equal to 1.
Once CUR_CNT is equal to zero, AT_CNT becomes True. Then, each rising edge transitions of DEC CUR_CNT remains
zero and AT_CNT remains True, until RESET is True.

CTD Block

Inputs
Name Data Type Description
DEC BOOL Decrements counter upon rising edge
MAX_CNT Unsigned double integer Value to start countdown
RESET BOOL Sets counter to MAX_CNT
ENABLE BOOL Permissive for block performance

Outputs
Name Data Type Description
AT_CNT BOOL True when CUR_CNT reaches zero
CUR_CNT Double integer Current countdown value

86 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Count Up (CTU)
Block Category: Timers and Counters
The Count Up (CTU) block counts up and the accumulating counter, CUR_CNT, is incremented upon each rising edge of the
INC pin. CUR_CNT is only incremented as long as the ENABLE pin is True. If ENABLE is False, then the counting is
suspended but CUR_CNT holds its value. By default, the ENABLE pin is True. If RESET is True, then the counting is
suspended and the value of CUR_CNT is set to zero. MAX_CNT must be greater than or equal to 1.
Once MAX_CNT is reached, AT_CNT becomes True. Then, each rising edge of INC increments CUR_CNT. AT_CNT
remains True, until MAX_CNT < CUR_CNT.

CTU Block

Inputs
Name Data Type Description
INC BOOL Increments counter upon rising edge
MAX_CNT UDINT Maximum count value
RESET BOOL Sets counter to zero
ENABLE BOOL Permissive for block performance

Outputs
Name Data Type Description
AT_CNT BOOL True when CUR_CNT reaches MAX_CNT
CUR_CNT UDINT Current count value

Instruction Guide GEI-100682AK 87


Public Information
Decode (IN_DECODE)
Block Category: Type Conversion
The Decode (IN_DECODE) block decodes the INPUT variable per type of decoding specified and communicates the results
through real OUTPUTs. This is a rubber block that can accept a maximum of 32 inputs.

IN_DECODE Block

Inputs
Name Data Type Description
TYPE Unsigned Short Specifies the type of decoding; defaults to zero
STATUS Unsigned Short Specifies the Decode status; defaults to zero
IN0 Long Integer Identifies the variable to decode
↓ ↓ ↓
IN31 Long Integer Identifies the variable to decode

Outputs
Name Data Type Description
OUT0 REAL Decoded output corresponding to IN0
↓ ↓ ↓
OUT31 REAL Decoded output corresponding to IN31

88 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Derivative (DERIVATIVE)
Block Category: Controls (Basic)
The Derivative (DERIVATIVE) block calculates OUT by differentiating IN and filters IN with lag time TC in seconds. The
transfer function is of the form 1/( 1 + sTC). If TC equals zero, the smoothing is disabled.

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

DERIVATIVE Block

Inputs
Name Data Type Description
DIF_IN REAL† Input analog signal (Default: 0)
TC REAL† Time constant for smoothing (sec) (Default: 0)
ENABLE BOOL Block enable (Default: True)
† Value with status, if status option is enabled.

Output
Name Data Type Description
DIF_OUT REAL† Derivative of input
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 89


Public Information
Device Heartbeat (DEVICE_HB)
Block Category: System
The Device Heartbeat (DEVICE_HB) block outputs an incrementing value to drive the heartbeat signal on a protection I/O
module, such as PPRO. This block is similar to the USB_HB block. However, it differs in that it follows the internal frame
counter, which is synchronized in the three controllers of a TMR system, whereas the USB_HB outputs the task/user block
heartbeat, which is not synchronized.
The DEVICE_HB block provides a voted variable representation of the controller scheduler frame number (another
free-running counter). It is normally used to drive the heartbeat input into the protection I/O packs. Because the variable is the
same in all controllers in a redundant set. It does not cause a potential voter disagreement diagnostic in the packs (could
happen with ControllerStateHeartbeat_R/S/T). The protection I/O pack trips the unit after five frames if no updates are
detected. After the unit trips, it must detect 60 frames of incrementing heartbeat before it allows the unit to go back online.

Note The OUT value freezes if the associated task/user block stops running.

DEVICE_HB Block

Output
Name Data Type Description
OUT DINT Device heartbeat

90 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Divide (DIV)
Block Category: Math
The Divide (DIV) block divides two numeric values; the quotient, OUT, and the mantissa, M, are outputs of the block. For
example, if NUM = 10, DENOM = 8, then OUT = 1.25, M = 0.25. If the data type of the block is not Real or Long Real then,
OUT is rounded to the nearest integer and M is set to 0. When DENOM is equal to 0, the output is limited to the high value
for that data type and Mantissa is 0.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

DIV Block

This block propagates quality status if the status operations are enabled.

Block status modifications: If DENOM = 0, then the output status will be either LOW_LIMITED-CONFIGURATION_
ERROR-BAD [5] if NUM < 0 or HIGH_LIMITED-CONFIGURATION_ERROR-BAD [6] if NUM > 0. The status of M always
follows the status of OUT.

Refer to the Status Monitoring (STATUS_MONITORING) block.

Inputs
Name Data Type Description
NUM ANY_NUM† Numerator
DENOM ANY_NUM† Denominator
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT ANY_NUM† Output
M REAL† Mantissa
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 91


Public Information
Equal (EQ)
Block Category: Comparison
The Equal (EQ) block compares the two input values to determine if IN1 is equal to IN2. The result of the comparison is the
output, OUT. Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity
refers to the tolerance band of the equality relationship. That is, IN1 is equal to IN2 if it is numerically within the band
defined by IN2 ± SENS. Once the equality relationship evaluates to True, based on the value of the sensitivity input, SENS,
the block output will not become False until the equality relationship exceeds the value of the hysteresis input, HYST.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

EQ Block
Example
If HYST equals 5, SENS equals 2, IN1 equals 10 and IN2 equals 11.9; then OUT is True. OUT will become False when the
difference between IN1 and IN2 becomes greater than 7, since IN1 and IN2 are considered equal when they are within the
SENS value of 2.

92 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
HYST ANY_NUM The hysteresis value
SENS ANY_NUM The sensitivity value

Output
Name Data Type Description
OUT BOOL The result of the comparison

Instruction Guide GEI-100682AK 93


Public Information
Expand Integer (EXPAND)
Block Category: Boolean Operations
The Expand Integer (EXPAND) block transforms the unsigned integer input into its binary equivalent form and stores the
expanded information into 16 simple, Boolean outputs. For example, if the value of the input is 5, the output Booleans
contains the following values 0000 0000 0000 0101. The least significant output bit is pin OUT0 and the most significant
output bit is pin OUTF.

Note The Compress Boolean (COMPRESS) block performs the opposite operation of the EXPAND block.

EXPAND Block

Input
Name Data Type Description
IN UINT Value to expand

Outputs
Name Data Type Description
OUT0 BOOL Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUTF BOOL Contains the results of the expansion process (most significant binary digit)

94 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Expand Long Integer (EXPAND_UDI)
Block Category: Boolean Operations
The Expand Long Integer (EXPAND_UDI) block moves each bit of the input into 32 individual Boolean outputs. The least
significant input bit is placed in OUT0 and the most significant bit is placed in OUT31.

Note The Compress to Long Integer (COMPRESS_UDI) block performs the opposite operation of the EXPAND_UDI
block.

EXPAND_UDI Block

Instruction Guide GEI-100682AK 95


Public Information
Input
Name Data Type Description
IN Unsigned Long Integer Value to expand

Outputs
Name Data Type Description
OUT0 BOOL Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT31 BOOL Contains the results of the expansion process (most significant binary digit)

96 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Finite Impulse Response (FIR)
Block Category: Controls (Basic)
The Finite Impulse Response (FIR) block implements a filter in which each calculated output is a weighted sum of past and
current samples over a finite sample range.

FIR Block

The calculation equation is as follows:

Where:
t = Time sample (t=0 for the present time)
o(t) = Block output after this sweep
N = Number of filter taps
g = Gain for a particular tap
n = Tap number, n > 0
I = Input
If PRESET is True then all the filter states will be set to PVAL before the filter calculation is made.

Note The IN value affects the OUT value even when the PRESET pin is True since the filter calculation still occurs in the
preset mode.

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Instruction Guide GEI-100682AK 97


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN REAL† Current input
GAIN [ ] REAL Gain array, this array must be defined with at least N elements
PRESET BOOL Preset flag (Default: False)
PVAL REAL† Preset value
N Unsigned double integer Number of taps in the filter
†Value with status, if status option is enabled.

Output
Name Data Type Description
OUT REAL† Filter output
† Value with status, if status option is enabled.

State
Name Data Type Description
STATE REAL array State variable array

98 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Function Generator (FUNGEN)
Block Category: Math
The Function Generator (FUNGEN) block creates common variable functions for test and verification. The function and/or
any of its parameters may be dynamically changed to generate the wave forms, STEP, SQUARE, RAMP, TRIANGLE and
SINE. Only a subset of the pins are required to configure each function type.

Pin Usage Combination for Generating Respective Functions


Function MAX_VAL MIN_VAL PERIOD1 PERIOD2 A_RATE D_RATE
Step

Square

Sine

Ramp

Triangular

FUNGEN Block

Instruction Guide GEI-100682AK 99


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
Function to generate:

• Step (1) — drives the output to MAX_VAL in one sweep


• Square wave (2) — oscillates between MAX_VAL and MIN_VAL, holding MAX_
VAL for PERIOD1 and MIN_VAL for PERIOD2. The sequence always begins
with MAX_VAL
• Ramp (3) — ramps the output to MAX_VAL. If the output is less than MAX_VAL
the ascending ramp rate, A_RATE is used. If the output is greater than MAX_
FUNC FUNGEN_T VAL the descending ramp rate D_RATE is used.
• Triangle wave (4) — repetitively ramps from MAX_VAL to MIN_VAL at D_RATE
and back to MAX_VAL at A_RATE. At startup if the output is greater than MAX_
VAL the descending cycle will commence first. Otherwise the ascending cycle
will commence first.
• Sine wave (5) — generates a sinusoidal wave between the amplitudes of MAX_
VAL and MIN_VAL with a period of PERIOD1. The waveform commences at 0
degrees regardless of the initial output value.
(Default: Step)
Maximum value of the output (unless the initial value of the output is already greater
MAX_VAL REAL than MAX_VAL). For proper operation MAX_VAL should be greater than or equal to
MIN_VAL
Time period in seconds for the sine wave function, or for the MAX_VAL portion of the
PERIOD1 REAL
square wave function
Minimum value of the output. For proper operation MIN_VAL should be less than or
MIN_VAL REAL
equal to MAX_VAL
PERIOD2 REAL Time period in seconds for the MIN_VAL portion of the square wave function
A_RATE REAL Ascending ramp rate in units/second
D_RATE REAL Descending ramp rate in units/second

Output
Name Data Type Description
OUTPUT REAL Output of the function

100 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Greater Than, Equal To (GE)
Block Category: Comparison
The Greater Than, Equal To (GE) block compares the two input values (of any numeric data type) to determine if IN1 is
greater than or equal to IN2. The result of the comparison is the output, OUT. Hysteresis and sensitivity settings are provided
to prevent toggling around a boundary condition. Sensitivity refers to the tolerance band of the equality relationship. The
greater than or equal to relationship evaluates to True, when IN1 is greater than or equal to IN2 – SENS. The block output
will not become False until the greater than equality relationship exceeds the value of the hysteresis input, HYST.

GE Block

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Instruction Guide GEI-100682AK 101


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM Input to compare
IN2 ANY_NUM Input to compare against
HYST ANY_NUM Hysteresis value
SENS ANY_NUM Sensitivity value

Output
Name Data Type Description
OUT BOOL Result of the comparison

102 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Get From Array (GET)
Block Category: Array
The Get From Array (GET) block moves value N of an array into a variable, DEST, of the same data type. The data transfer
occurs each time the block performs while the ENABLE pin is True. If N exceeds the array size of SRC[ ], the block transfers
the last element in the array.

Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the SRC array and the DEST pin must match
the selected data type of the block. Refer to the section Change Data Type of Variant Block.

GET Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC[ ] ANY Source array
N UDINT Source array index (0 based, interpreted internally as unsigned)

Output
Name Data Type Description
DEST ANY Destination variable

Instruction Guide GEI-100682AK 103


Public Information
Greater Than (GT)
Block Category: Comparison
The Greater Than (GT) block compares the two input values (of any numeric data type) to determine if IN1 is greater than
IN2. The result of the comparison is output, OUT. Hysteresis is provided to prevent toggling around a boundary condition.
The greater than relationship evaluates to True, when IN1 is greater than IN2. The block output will not become False until
the greater than relationship exceeds the value of the hysteresis input, HYST.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

GT Block

Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
HYST ANY_NUM The hysteresis value

Output
Name Data Type Description
OUT BOOL The result of the comparison

104 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Infinite Impulse Response (IIR)
Block Category: Controls (Basic)
The Infinite Impulse Response (IIR) block filter may be configured to act as different filters, including low pass, high pass,
and notch filters. The filter is configured by selecting the values for the A and B pins that create the appropriate filter. The
coefficients are then used in the following equation to filter the input variable. To implement higher order filters, use a series
cascade of the biquad stages.

Where:
N = number of stages of the filter
Y = output of filter
X = input value
A, B = arrays of coefficient

IIR Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Instruction Guide GEI-100682AK 105


Public Information
Inputs
Name Data Type Description
ENA_FIL BOOL Enable filter or directly pass input to output
INPUT REAL† Input variable
A[ ] REAL Numerator coefficient array, size must be >= N*3
B[ ] REAL Denominator coefficient array, size must be >= N*2
N UINT Number of 2nd order stages to cascade
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUTPUT REAL† Filtered output
† Value with status, if status option is enabled.

State
Name Data Type Description
DELAY[ ] LREAL Delay state variables array, size must be >= N*2

106 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Integrator With Lead (INTWLEAD)
Block Category: Controls (Basic)
The Integrator With Lead (INTWLEAD) block computes the integral of IN using the radian frequency lead term as follows.

Output OUT is clamped between the upper and lower clamp inputs, HILIM and LOLIM. Output IN_MIN or IN_MAX
becomes True to indicate that input, IN, has reached the low or high limitation, respectively.
When PRESET is True, OUT is set to the initial value PR_VAL, also clamped between HILIM and LOLIM.

INTWLEAD Block

This block propagates quality status if the status operations are enabled.

Block status modifications: OUT status is propagated from either IN status or PR_VAL status, whichever is active. The status
of OUT is modified to include HIGH_LIMITED or LOW_LIMITED when applicable.
For example:

• If PRESET is False and IN status = NOT_LIMITED-GOODNC [128]


• Or If PRESET is True and PR_VAL status = NOT_LIMITED-GOODNC [128]
• And OUT = HILIM, then OUT status = HIGH_LIMITED-GOODNC [130]
• Or OUT = LOLIM, then OUT status = LOW_LIMITED-GOODNC [129]
• Or LOLIM < OUT < HILIM, then OUT status = NOT_LIMITED-GOODNC [128]
• If LD_FREQ < 0.0001, the block will use 0.001 for the calculation and OUT status = LOW_
LIMITED-SUBSTITUTE-UNCERTAIN [73].
Refer to the Status Monitoring (STATUS_MONITORING) block.

Instruction Guide GEI-100682AK 107


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
HILIM REAL Upper clamp
IN REAL† Value to be integrated
LD_FREQ REAL Lead frequency in radians/second
LOLIM REAL Lower clamp
PRESET BOOL Preset command (Default: False)
PR_VAL REAL† Preset value
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT REAL† Integrator Output
IN_MAX BOOL Output is clamped at HILIM
IN_MIN BOOL Output is clamped at LOLIM
† Value with status, if status option is enabled.

108 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Integrator, Selectable Algorithm (INTEG)
Block Category: Controls (Basic)
The Integrator, Selectable Algorithm (INTEG) block has an output that is the integral of the input over time, following either
the Euler or the Tustin algorithm. The input and output are in the same units. Input is multiplied by gain before integration,
and output is clamped between the limits after integration.
Tustin integration uses the average of present and previous input values as the input, otherwise, it is the same as the Euler
method. The integrations method is selected by the INTMETH enumeration, either EULER or TUSTIN.

Where:
in = input
out = output
G = gain
T = sample period
Output OUT is clamped between the upper and lower clamp inputs, HILIM and LOLIM. Output IN_MIN or IN_MAX
becomes True to indicate that input, IN, has reached the low or high limitation, respectively.
When PRESET is True, OUT is set to the initial value PR_VAL, also clamped between HILIM and LOLIM.

INTEG Block

This block propagates quality status if the status operations are enabled.

Block status modification: OUT status is propagated from either IN status or PR_VAL status, whichever is active. The status
of OUT is modified to include HIGH_LIMITED or LOW_LIMITED when applicable. For example:
If PRESET is False and IN status = NOT_LIMITED-GOODNC [128]
Or If
PRESET is True and PR_VAL status = NOT_LIMITED-GOODNC [128]
And
OUT = HILIM, then OUT status = HIGH_LIMITED-GOODNC [130]
Or
OUT = LOLIM, then OUT status = LOW_LIMITED-GOODNC [129]
Or
LOLIM < OUT < HILIM, then OUT status = NOT_LIMITED-GOODNC [128]

Refer to the Status Monitoring (STATUS_MONITORING) block.

Instruction Guide GEI-100682AK 109


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
IN REAL† Value to be integrated
GAIN REAL Integrator gain
HILIM REAL Maximum allowed output
LOLIM REAL Minimum allowed output
INTMETH ENUM (UINT) Integration method (EULER or TUSTIN)
PRESET BOOL Initialize command
PR_VAL REAL† Initialization value
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT REAL† Integrator Output
IN_MAX BOOL Output is clamped at HILIM
IN_MIN BOOL Output is clamped at LOLIM
† Value with status, if status option is enabled.

110 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Interpolator (INTERP)
Block Category: Controls (Basic)
The Interpolator (INTERP) block generates an output as a function of IN by linear interpolation. The argument table X[N] is
searched using IN as the key. OUT is calculated from the function table Y[N] using the search index from the argument table
and interpolating between the values:
OUT = Y[i] + ((Y[i+1] - Y[i]) x ((INPUT - X[i]) / (X[i+1] - X[i]))), where i is the index resulting from the binary search of the
argument table.
The array sizes of the variables attached to X[ ] and Y[ ] must be equal to or greater than the table size specified by N and the
table size must be greater than or equal to 2. If either of these conditions is not met, OUT will equal 0. OUT is clamped to
either the first or last element in the function table if IN is not within the range of the argument table elements. When IN is
within the limits of the argument table, the slope, M, is calculated as follows; otherwise, M is defined to be the slope of a line
between the nearest function table end point element and the element next to it:

INTERP Block

This block propagates quality status if the status operations are enabled.

Block status modification: If the values of OUT is out of the range of Y[ ] respectively, then the output status is limited (LOW_
LIMITED-GOODNC [129] or HIGH_ LIMITED-GOODNC [130]).

Instruction Guide GEI-100682AK 111


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN REAL† Input value
N UDINT Number of elements in argument and function tables (must be ≥ 2)
X[ ] REAL Argument table (values must be monotonically increasing)
Y[ ] REAL Function table
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT REAL† Interpolated output
M REAL Slope of output function
†Value with status, if status option is enabled.

112 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Interpolator DL (INTERP_DL)
Block Category: Controls (Basic)
The Interpolator DL (INTERP_DL) block estimates a missing functional value f(x,y) from four known functional values at
neighboring points f(X0,Y0), f(X0,Y1), f(X1,Y0), f(X1,Y1), provided X0 < x < X1 and Y0 < Y1 as follows:

Expansion checks are run to ensure that the declared size of the function array, FTBL, is equal to the size of the input array,
XTBL, times the size of the input array YTBL.

INTERP_DL Block

This block propagates quality status if the status operations are enabled.

Block status modification: If the values of X and Y are out of the range of XTBL and YTBL respectively, then the output status
is limited (LOW_ LIMITED-GOODNC [129] or HIGH_ LIMITED-GOODNC [130]).

Refer to the Status Monitoring (STATUS_MONITORING) block.

Instruction Guide GEI-100682AK 113


Public Information
Inputs
Name Data Type Description
X REAL† Input X
Y REAL† Input Y
XTBL REAL X table array
YTBL REAL Y table array
Function table array
FTBL[0] = f(XTBL[0], YTBL[0]), FTBL[1] = f(XTBL[0], YTBL[1]), FTBL[2] = f(XTBL[0], YTBL[2], …,
FTBL REAL
FTBL[nYTBL – 1] = f(XTBL[0], YTBL[nYTBL – 1], FTBL[nYTBL] = f(XTBL[1], YTBL[0], …,
where nYTBL = the number of elements in YTBL
FMIN REAL Minimum function table value
FMAX REAL Maximum function table value
† Value with status, if status option is enabled.

Output
Name Data Type Description
F REAL† Function output
† Value with status, if status option is enabled.

114 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
IO-Link Device Read (IO_LINK_DEVICE_READ)
Block Category: Communications

Note This block is only supported in Simplex controllers that support Embedded PPNG.

The IO-Link blocks, IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE, are used to Read and Write acyclic data
(parameters and identification data) to IO-Link devices. These blocks run in Mark VIe controllers and communicate with the
Embedded PROFINET Gateway (Embedded PPNG) module. The Embedded PPNG module communicates with the IO-Link
Masters (PROFINET devices). The IO-Link Master communicates with the IO-Link devices (sensors).

Note IO-Link devices are not PROFINET devices.

IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE Blocks

The following figure illustrates the basic communication path from the IO-Link blocks to the IO-Link sensor device.

IO-Link Block Communication

Instruction Guide GEI-100682AK 115


Public Information
The IO-Link blocks provide the following features:

• The blocks can Read and Write parameter data to the index and sub-indices of the IO-Link device parameter space.
• The blocks provide the means for users to save and back up IO-Link device parameters to the IO-Link Master. (These
parameters cannot be saved to ToolboxST.)
IO-Link devices have indexes and sub-indices from/to which parameters can be Read or Written. The IO-Link blocks are
designed to communicate with a specific IO-Link device index and sub-index.
When the REQUEST pin is transitioned from False to True, the IO-Link block initiates a Read or Write request, depending on
which block is being used. IO-Link Read/Write communication occurs sequentially for all devices connected to an IO-Link
Master. If the IO-Link Read/Write request is in progress with an IO-Link Master, another communication request will not
start until the communication already in progress has completed or timed out. However, communication to two different
IO-Link devices connected to two different IO-Link Masters can occur simultaneously.
When the block’s REQUEST pin is triggered, the output BUSY pin is immediately set to True. The BUSY pin resets to False
only when the IO-Link Read or Write communication has completed or timed out.
The internal pin, IO_LINK_COMM_STARTED, is set to True when the IO-Link block communication starts, and resets to
False when block communication has completed. When the IO-Link Read or Write communication has completed or timed
out, the DONE output pin is set to True.
If an IO-Link block does not complete its IO-Link transaction within one second after communication has started, the IO-Link
transaction is cancelled, an error indicator is displayed on the IO_LINK_STATUS pin, and the ERROR pin is set to True.

Note The inputs listed in the following table are shared by the IO_LINK_DEVICE_READ block and the IO_LINK_
DEVICE_WRITE block.

116 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
IO_LINK_DEVICE_READ / WRITE Block Inputs
Name Data Type Description
When set to True, the block is enabled (Default: True). The block must be enabled to
ENABLE BOOL send IO-Link Read or Write communication. If the ENABLE pin is False, all outputs
are reset.
Must be triggered from False to True for the block to start operation. Upon trigger,
REQUEST BOOL
parameter data is Read or Written one time.
PROFINET Device Number, as shown in the Embedded PPNG PROFINET device
DEVICE_NUM UINT
configuration.
Client Access Point that represents the PROFINET record index providing the tunnel
to the IO-Link system.
This value is dependent upon the specific IO-Link Master in use. Users should refer
CAP UINT
to the manufacturer’s documentation for the specific IO-Link Master for this value.
The following table, Example IO-Link Master Input Values, provides a list of valid
values for some commonly used IO-Link Masters.
Slot number in which IO-Link devices are configured. This number must match the
number in the Embedded PPNG PROFINET device configuration.
For some IO-Link Masters, this number may be fixed to 1.
SLOT UINT This value is dependent upon the specific IO-Link Master in use. Users should refer
to the manufacturer’s documentation for the specific IO-Link Master for this value.
The following table, Example IO-Link Master Input Values, provides a list of valid
values for some commonly used IO-Link Masters.
Sub-slot number in which IO-Link devices are configured. This number must match
the number in the Embedded PPNG PROFINET device configuration.
This number may be set to 1 for all IO-Link devices connected to an IO-Link Master,
depending on the IO-Link Master in use.
SUBSLOT UINT
This value is dependent upon the specific IO-Link Master in use. Users should refer
to the manufacturer’s documentation for the specific IO-Link Master for this value.
The following table, Example IO-Link Master Input Values, provides a list of valid
values for some commonly used IO-Link Masters.
IO-Link Master port number to which the IO-Link device is connected.
This value is dependent upon the specific IO-Link Master in use. Users should refer
PORT_NUM UINT to the manufacturer’s documentation for the specific IO-Link Master for this value.
The following table, Example IO-Link Master Input Values, provides a list of valid
values for some commonly used IO-Link Masters.
IO-Link Index of the IO-Link device the user wants parameter data Read from or
IO_LINK_INDEX UINT
Written to
IO-Link Sub-Index of the IO-Link device the user wants parameter data Read from or
IO_LINK _SUBINDEX UINT
Written to
Parameter used to exchange the Read/Write data. The valid parameters values are:
0 – No Swap
1 – Byte Swap (8-bit swap)
DATA_SWAP UINT
2 – Word Swap (16-bit swap)
4 – Dword swap (32-bit swap)
Any other value given for this pin will result in an error.

Instruction Guide GEI-100682AK 117


Public Information
Example IO-Link Master Input Values

IO-Link Master CAP Port Slot SubSlot


Same as IO-Link device
configured in ToolboxST
Phoenix Contact© 255 1, 2, 3, 4, …., n 1
Embedded PPNG
configuration

Same as IO-Link device


configured in ToolboxST
Belden Inc.© 255 1, 2, 3, 4, …., n 1
Embedded PPNG
configuration

Molex© Brad®† 255 0, 2, 4, 6, 8, …., n 1 1


Same as IO-Link device Same as IO-Link device
configured in ToolboxST configured in ToolboxST
IFM© 46080 1, 2, 3, 4, …., n
Embedded PPNG Embedded PPNG
configuration configuration
†Fora Brad IO-Link Master, the Slot number is fixed to 1 (per test results using Brad module: Molex part number
1120955119).

Input values are dependent upon the specific IO-Link Master in use. Users should refer to the manufacturer’s documentation
for the specific IO-Link Master for block input requirements.

IO_LINK_DEVICE_READ / WRITE Block Outputs


Name Data Type Description
DONE BOOL Done status for the block
Error status for the block. If this pin is True, the IO_LINK_STATUS pin shows the error
number.
ERROR BOOL
Refer to the IO_LINK _STATUS Block Specific Errors table for block specific error
numbers.
Busy status for the block. This pin transitions to True immediately after the block
BUSY BOOL REQUEST pin is triggered. It transitions to False when the IO-Link Read/Write
communication has completed, which means the DONE pin is set to True.
IO-Link block error status. If no error is present, this pin’s value is 0.
This pin shows block-specific errors that occur during validation of the input pins or
the Read/Write data, or communication errors. Additionally, this pin shows
IO_LINK _STATUS UINT PROFINET errors as it communicates with the IO-Link Master or IO-Link device.
Refer to the IO_LINK _STATUS Block Specific Errors table and the IO_LINK
_STATUS PROFINET Specific Errors table for a list of possible errors shown for this
pin.

118 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Specific IO_LINK_DEVICE_WRITE Block Inputs
Name Data Type Description
LEN UINT Length of data to be Written. (Written in number of bytes.)
Write data to be Written. This pin must be connected to an array variable and array
length needs to be less than or equal to 116. (Provided to the IO-Link devices are in
bytes.) The pin on the block is UINT array (2 bytes data array).
WR_DATA† UINT
To Write data to an IO-Link device Index that is not String data, use the DATA_SWAP
input to perform the proper swap on the Write data.
The WR_DATA pin data needs to be framed by combining 2 bytes of data.
† For String data: To Write to an IO-Link device Index that supports a String data type, the Write data does not need to be
swapped. Set the DATA_SWAP input value to 0 for a String data type. For example, to Write XY to an IO-Link device Index,
the first element of WR_DATA will be a combination of the ASCII value of X and Y in hexadecimal, then converting to decimal.
The ASCII of X is 0 x 58 and that of Y is 0 x 59. The resulting combination is 0 x 5859 and decimal is 22617. Therefore, the
first element of WR_DATA is 22617.

For Unsigned Integer (16-bit) data: To write to an IO-Link device Index that supports Unsigned Integer (16-bit) data type, the
Write data needs to be swapped by 8 bits. Set the DATA_SWAP input value to 1 for the Unsigned Integer (16-bit) data type.
For example, to Write 16-bit data (100) to an IO-Link device Index, this data needs to be 1 byte-swapped, as the data type
supported by the IO-Link device Index is Unsigned Integer. Therefore, the first element of WR_DATA will be 100 and the
DATA_SWAP input will be 1.

To Write 32-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 2.
To Write 64-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 4.

Specific IO_LINK_DEVICE_READ Block Outputs


Name Data Type Description
LEN UINT Length of data to be Read. This is the number of bytes Read from the device.
Data Read by the block. This pin must be connected to an array variable and array
length needs to be less than or equal to 116. (Data is Read from the IO-Link devices
RD_DATA† UINT in bytes.) The pin on the block is UINT array (2 bytes data array).
RD_DATA pin data is a 2-byte array of data. Each element of the array represents 2
bytes of data as it comes from the IO-Link device.
†For String data: To Read data from an IO-Link device Index that supports a String data type, the Read data does not need to
be swapped. Set the DATA_SWAP input value to 0 for a String data type. For example, if the data from the device is 0 x 58
and 0 x 59, the first element of the array is the combination of both bytes, 0 x 5859 and decimal is 22617. Therefore, the first
element of RD_DATA is 22617.

For Unsigned Integer (16-bit) data: To Read data from an IO-Link device Index that supports Unsigned Integer (16-bit) data
type, the Read data needs to be swapped by 8 bits. Set the DATA_SWAP input value to 1 for the Unsigned Integer (16-bit)
data type. For example, to Read 16-bit data (assume 100) from an IO-Link device Index, this data needs to be 1
byte-swapped, as the data type supported by the IO-Link device Index is Unsigned Integer. Set the DATA_SWAP input to 1
and after the request is triggered the first element of RD_DATA will be 100.

To Read 32-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 2.
To Read 64-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 4.

Instruction Guide GEI-100682AK 119


Public Information
IO_LINK _STATUS Block Specific Errors
Error Number
Description Possible Cause and Solution
(Decimal)
0 No error N/A
7000 IO-Link Write request timed out IO-Link device communication failure. Try again or replace the device.
7001 IO-Link Read request timed out IO-Link device communication failure. Try again or replace the device.
Communication failed between the controller and embedded PPNG
module. Wrong device number, slot number, or sub-slot number in
7002 SDI Communication error block Input.
If an online load occurred, the previous IO-Link transactions have been
canceled. Send the IO-Link request again.
The data read from the IO-Link device is more than 232 bytes. This is
7003 Read length error
not a supported device.
IO-Link transaction to device cancelled due to online load. Send the
7004 Cancelled due to online load
IO-Link request again after online load.
7005 Block Internal error Send the IO-Link request again.
7006 Wrong Data Swap input Check the DATA_SWAP input value. Valid values are 0, 1, 2, 4.
Only applies to IO_LINK_DEVICE_WRITE block
7007 Wrong Data Length input If the LEN = 0, or LEN input is great than the WR_DATA array length x
2. (The LEN input is Written in bytes.)
Only applies to IO_LINK_DEVICE_WRITE block.
After a Write request, a Read request is sent to check for Write status.
7008 Port Number mismatch In the Read response, the Port number should match. Send the IO-Link
request again. If the error persists, the IO-Link sensor device may have
an issue.
Only applies to IO_LINK_DEVICE_WRITE block
After a Write request, a Read request is sent to check for Write status.
7009 IO-LINK Index mismatch In the Read response, the IO-Link Index number should match. Send
the IO-Link request again. If the error persists, the IO-Link sensor
device may have an issue.
Only applies to IO_LINK_DEVICE_WRITE block
After a Write request, a Read request is sent to check for Write status.
7010 IO-LINK Sub-index mismatch In the Read response, the IO-Link Sub-Index number should match.
Send the IO-Link request again. If the error persists, the IO-Link sensor
device may have an issue.
Only applies to IO_LINK_DEVICE_READ block
After a Read request is completed, if the Read response length is
7011 Insufficient Read buffer
greater than the RD_DATA array size x 2, this error is given. (Response
read length is in bytes.) Increase the RD_DATA array length.
7012 Not supported IO-Link blocks are not supported in the Virtual controller.

120 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
IO_LINK _STATUS PROFINET Specific Errors
Error Number Error Number
Description Possible Cause and Solution
(Decimal) (Hexadecimal)
Read/Write faulty record (in The device does not support this IO-Link index. Refer
2050 08 02 Phoenix CMBC circuit to the manufacturer’s documentation for the specific
breaker) error.
The connected PROFINET device is not an IO-Link
17665 45 01 Write request rejected
Master.
Service has been refused by the device application
and no detailed information of the incident is available.
32768 80 00 Device application error Try again.
If the error persists, there may be an issue with the
IO-Link Master or the sensor device.
No IO-Link device connected
Verify that the IO-Link device is connected on the
32772 80 04 on the IO-Link channel (in
IO-Link port.
Brad IO-Link Master)
32775 80 07 Port not available Verify that the port input on the block is valid.
32785 80 11 Index not available Verify that the IO-Link Index input on the block is valid.
Verify that the IO-Link Sub-Index input on the block is
32786 80 12 Sub-Index not available
valid.
Parameter is inaccessible due to the current state of
Service temporarily the device application. Try again.
32800 80 20
unavailable If the error persists, there may be an issue with the
IO-Link Master or sensor device.
Write access on a Read-only parameter. Check for
Read/Write access on the IO-Link Index in the
32803 80 23 Access denied
manufacturer’s documentation for the specific device
in use.
Written parameter value is outside the permitted value
32816 80 30 Parameter value out of range
range.
Written parameter length is above the pre-defined
32819 80 33 Parameter length overrun
length.
Written parameter length is below the pre-defined
32820 80 34 Parameter length underrun
length.
Written command is not supported by the device
32821 80 35 Function not available
application.
Function temporarily Written command is not available due to the current
32822 80 36
unavailable state of the device application.
Written single parameter collides with other parameter
32832 80 40 Invalid parameter set
settings.
Parameter inconsistencies were found at the end of
32833 80 41 Inconsistent parameter set the block parameter transfer; device plausibility check
failed.
Read or Write service is refused due to temporarily
32898 80 82 Application not ready
unavailability.
No IO-Link device connected
Verify that the IO-Link device is connected on the
45056 B0 00 on the IO-Link channel (in
IO-Link port.
Phoenix IO-Link Master)

Instruction Guide GEI-100682AK 121


Public Information
IO_LINK _STATUS PROFINET Specific Errors (continued)
Error Number Error Number
Description Possible Cause and Solution
(Decimal) (Hexadecimal)
Invalid CAP given as block Input.
This value is dependent upon the specific IO-Link
45113 B0 39 Invalid CAP Master in use. Users should refer to the
manufacturer’s documentation for the specific IO-Link
Master for this value.
Invalid slot/sub-slot given as block Input. Verify that
the input value matches the value in the Embedded
Invalid slot/sub-slot (in Brad
45568 B2 00 PPNG configuration or refer to the manufacturer’s
IO-Link Master)
documentation for the specific IO-Link Master in use
for this value.
Invalid slot given as block Input. Verify that the input
value matches the value in the Embedded PPNG
45575 B2 07 Invalid slot configuration or refer to the manufacturer’s
documentation for the specific IO-Link Master in use
for this value.
Invalid sub-slot given as block Input. Verify that the
input value matches the value in the Embedded PPNG
45576 B2 08 Invalid sub-slot configuration or refer to the manufacturer’s
documentation for the specific IO-Link Master in use
for this value.
Subsequent Write requests are sent without Read
46336 B5 00 State conflict request. Send the request again. If the error persists,
reboot the IO-Link Master.
Invalid CAP given as block Input. Verify that the input
value matches the value in the Embedded PPNG
Invalid CAP (in Phoenix
46592 B6 00 configuration or refer to the manufacturer’s
IO-Link Master)
documentation for the specific IO-Link Master in use
for this value.
Invalid Port given as block Input. Verify that the input
value matches the value in the Embedded PPNG
47104 B8 00 Port not available configuration or refer to the manufacturer’s
documentation for the specific IO-Link Master in use
for this value.

122 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
IO-Link Device Backup and Restore
In IO-Link V1.1, the IO-Link Master and devices support the backup and restore feature (if configured). The IO-Link device
parameters can be backed up to the IO-Link Master and the device parameters will be restored when the device is replaced.
For more information, refer to the Mark VIe and Mark VIeS Control Systems, Volume II: System Guide for General-purpose
Applications (GEH-6721_Vol_II), the section PROFINET IO-Link Device Backup and Restore.
The IO_LINK_DEVICE_WRITE block is used to back up the IO-Link device parameters. The following table lists the inputs
the IO_LINK_DEVICE_WRITE block uses to perform a backup.

WR_DATA
Type IO_LINK_INDEX IO_LINK_SUBINDEX DATA_SWAP LEN
(First Element in Array)
Backup 2 0 0 1 5

Note The IO-Link blocks are not used to initiate the Restore operation.

IO-Link Block Performance Numbers


The completion of an IO-Link Read or Write request varies, depending on the number of IO-Link sensor devices connected
on an IO-Link Master. The average time observed for an IO-Link Read or Write request is provided in the following equation:
Maximum time to complete IO-Link Read and Write request (in milli seconds) = 450 ms + 2 controller frames
This performance data is gathered by varying the number of IO-Link devices connected on an IO-Link Master from 1 to 8.

Instruction Guide GEI-100682AK 123


Public Information
IO-Link Device Write (IO_LINK_DEVICE_WRITE)
Block Category: Communications

Note This block is only supported in Simplex controllers that support Embedded PPNG.

The IO-Link blocks, IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE, are used to Read and Write acyclic data
(parameters and identification data) to IO-Link devices. These blocks run in Mark VIe controllers and communicate with the
Embedded PROFINET Gateway (Embedded PPNG) module. The Embedded PPNG module communicates with the IO-Link
Masters (PROFINET devices). The IO-Link Master communicates with the IO-Link devices (sensors).

Note The functionality of this block is described in detail in the documentation for the IO-Link Device Read (IO_LINK_
DEVICE_READ) block.

IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE Blocks

124 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Lag Filter (LAG)
Block Category: Controls (Basic)
The Lag Filter (LAG) block filters the input variable with a first order lag filter. The lag time constant is expressed in seconds.
The transfer function of the filter is of the form 1/( 1 + Ts).

TC = 0
LAG Block

Note At time constants below the frame period, the LAG and LAG00 software blocks function differently. In the LAG
block, if the time constant is less than the frame period, the time constant value is internally set to the frame period prior to
calculating the output. In the LAG00 block, if the time constant is less than the frame period, the input is copied directly to
the output.

Response of Block to Sine Wave

Instruction Guide GEI-100682AK 125


Public Information
Response of Block to Square Wave

This block propagates quality status if the status operations are enabled.

Refer to the Status Monitoring (STATUS_MONITORING) block.

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
LAG_IN REAL† Variable to filter
TC REAL Filter time constant in seconds
† Value with status, if status option is enabled.

Output
Name Data Type Description
LAG_OUT REAL† Filtered variable
† Value with status, if status option is enabled.

126 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Latch (LATCH)
Block Category: Sequencing
The Latch (LATCH) block emulates an SR flip-flop in that it sets or resets OUT based on the current values of SET and
RESET, and the previous value of OUT.

LATCH Block

Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the LATCH block.

Truth Table
RDOM SET(t) RESET(t) OUT(t) OUT(t+1)
X 0 0 0 0
X 0 0 1 1
X 0 1 0 0
X 0 1 1 0
X 1 0 0 1
X 1 0 1 1
1 1 1 X 0
0 1 1 X 1
Where:
X = either state
t = current state
t+1 = next state

Inputs
Name Data Type Description
SET BOOL Set input
RESET BOOL Reset input (Default: False)
RDOM BOOL If True RESET dominates the latch, else SET dominates (Default: False)

Output
Name Data Type Description
OUT BOOL Output of the latch

State
Name Data Type Description
This is the status variable for storing the trigger status, a hidden pin. It can be viewed
STATUS BOOL or changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.

Instruction Guide GEI-100682AK 127


Public Information
Lead, Lag (LEAD_LAG)
Block Category: Controls (Basic)
The Lead, Lag (LEAD_LAG) block performs a (discrete) filter function that combines both Lead and Lag compensator
characteristics. The properties of the Lead compensator are typified by an output that, with an appropriate time constant (T1),
is proportional to the sum of the input signal (IN) and its derivative (slope). As the derivative action tends to uncover that part
of a signal that is not constant (time varying), the Lead compensator, with the appropriate time constant, behaves similarly to
a high pass filter (magnitude response) except low frequencies are passed with unity gain while high frequency components
of the input signal are amplified. The resultant phase shift for this type of compensator is typically positive, where the output
leads the input. The Lag portion of the algorithm acts as integrator, ramping the output toward the input at a rate defined by
the time constant, T2. Phase response for this compensator is typically characterized by a lagging phase shift, where the
output lags the input.
The manner in which the LEAD_LAG filter compensates the input signal's phase and magnitude response is contingent on the
values supplied for the two time constants (T1, T2). Proper block operation requires a T1 value that is two (minimum) to eight
(maximum) times the T2 value. The algorithm functions predominantly as a lead compensator, passing lower frequency
components of the input with variable gain, and higher frequency components with amplification equal to the ratio T1/T2. In
addition, the T2 constant should be assigned a value that is at least four times the sequencing scan interval.

LEAD_LAG Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING)block.

Inputs
Name Data Type Description
IN REAL† Analog input
T1 REAL† Lead tau
T2 REAL† Lag tau
†Value with status, if status option is enabled.

Output
Name Data Type Description
OUT REAL† Output value
† Value with status, if status option is enabled.

128 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Less Than (LT)
Block Category: Comparison
The Less Than (LT) block compares the two input values (of any numeric data type) to determine if IN1 is less than IN2. The
result of the comparison is the output, OUT.

LT Block

Hysteresis is provided to prevent toggling around a boundary condition. The less than relationship evaluates to True, when
IN1 is less than IN2. The block output will not become False until the less than relationship exceeds the value of the
hysteresis input, HYST.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Instruction Guide GEI-100682AK 129


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
HYST ANY_NUM The hysteresis value

Output
Name Data type Description
OUT BOOL The result of the comparison

130 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Less Than, Equal To (LE)
Block Category: Comparison
The Less Than, Equal To (LE) block compares the two input values (of any numeric data type) to determine if IN1 is less than
or equal to IN2. The result of the comparison is the output, OUT.

LE Block
Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity refers to the
tolerance band of the equality relationship. The less than or equal to relationship evaluates to True, when IN1 is less than or
equal to IN2 + SENS. The block output will not become False until the less than equality relationship exceeds the value of the
hysteresis input, HYST.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Instruction Guide GEI-100682AK 131


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM Input to compare
IN2 ANY_NUM Input to compare against
HYST ANY_NUM Hysteresis value
SENS ANY_NUM Sensitivity value

Output
Name Data Type Description
OUT BOOL Result of the comparison

132 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Limit Detect Manual (LD_MAN)
Block Category: Diagnostics
The Limit Detect Manual (LD_MAN) block evaluates the INPUT variable per a list of limit specifications and communicates
the results through five alarm state Boolean variables. If ENABLE is True, Boolean output HH_STAT will go True when IN
goes above HH_LIM by the percentage specified by HH_HYS. It will go False when IN goes below HH_LIM by this same
percentage. Operation of the H_STAT, L_STAT, and LL_STAT is similar. Output N_STAT (normal output) will be True if
neither High Limit nor Low Limit conditions are True.
Hysteresis percentage is always calculated based on full range of the input, MAX_VAL minus MIN_VAL.
The user is responsible for insuring that HH_LIM > H_LIM > L_LIM > LL_LIM.

LD_MAN Block

Instruction Guide GEI-100682AK 133


Public Information
LD_MAN Block Functional Diagram

134 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN Float Identifies the variable to evaluate
MAX_VAL Float Maximum value of the input variable
HH_LIM Float HIGH-HIGH limit value
HH_HYS Float HIGH-HIGH hysteresis (% of MAX_VAL-MIN_VAL)
H_LIM Float HIGH limit value
H_HYS Float HIGH hysteresis (% of MAX_VAL-MIN_VAL)
L_LIM Float LOW limit value
L_HYS Float LOW hysteresis (% of MAX_VAL-MIN_VAL)
LL_LIM Float LOW-LOW limit value
LL_HYS Float LOW-LOW hysteresis (% of MAX_VAL-MIN_VAL)

Outputs
Name Data Type Description
HH_STAT BOOL Indicates that the input variable is in the HIGH-HIGH limit
H_STAT BOOL Indicates that the input variable is in the HIGH limit
N_STAT BOOL Indicates that the input variable is not in any limit condition
L_STAT BOOL Indicates that the input variable is in the LOW limit
LL_STAT BOOL Indicates that the input variable is in the LOW-LOW limit

Instruction Guide GEI-100682AK 135


Public Information
Logic Builder (LOGIC_BUILDER)
Block Category: Permits and Overrides
The Logic Builder (LOGIC_BUILDER) block is a universal block that allows up to 32 inputs to be configured with the AND,
OR, and NOT blocks to create a PERMIT, OVERRIDE, FORCE, or TRACK type block. Unlike the normal PERMIT,
OVERRIDE, FORCE, or TRACK blocks that essentially function as either an AND or OR block, the LOGIC_BUILDER
block allows the user to create unique logic scenarios that can contain up to 32 individual inputs and up to six logic blocks in
series of depth using any combination of AND, OR, and NOT blocks.
The LOGIC_BUILDER block provides a simple, versatile, and effective solution to provide FORCE, OVERRIDE or
PERMIT applications for complex situations. Each of the 32 inputs has a corresponding attribute set by the programmer,
which, when changed, must be downloaded to the controller. The input attribute either permits or does not permit the
operator’s ability to enable or disable the associated input using the CIMPLICITY graphical interface. The LOGIC_
BUILDER block type, PERMIT, OVERRIDE, FORCE, or TRACK is controlled by an enumerated input, TYP, which is set
by the programmer. The enumeration selected for the TYP input determines the enumerations the block will output from the
OUT block output. The output enumerations will correspond to the type of block specified by the TYP input enumeration.
Each input has the capability of inheriting the description of a connected global variable or a global variable connected
through a NOT block. When a connection is made to one of the input pins, the description of the global variable is inherited
by default. If this description is undesirable, it must be disabled by setting the Inherit Description option to False in the input
variable properties. The description can be replaced with a desirable description by entering an appropriate description in the
description field of the input variable of the LOGIC_BUILDER block (replace LOGIC_BUILDER #1 with the desired
override description for the source connected to IN1). The description is not copied from the connected variable immediately;
the input’s description is set when the library or device containing the input is validated or built.

136 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
TYP Input Enumerations
Name Description
AU_PMT Auto Permit
CL_PMT Close Permit
OP_PMT Open Permit
INT_PMT Intermediate Permit
ON_PMT On Permit
OFF_PMT Off Permit
STR_PMT Start Permit
STP_PMT Stop Permit
HI_PMT High Permit
LO_PMT Low Permit
REV_PMT Reverse Permit
RDY1 Ready 1 Permit
RDY2 Ready 2 Permit
RDY3 Ready 3 Permit
RDY4 Ready 4 Permit
RDY5 Ready 5 Permit
SFC_TRANS_PMT SFC Transition Permit
MOD_PMT Modulate Permit
CMD_FRC Command Force
CL_FRC Close Force
OP_FRC Open Force
INT_FRC Intermediate Force
ON_FRC On Force
OFF_FRC Off Force
STR_FRC Start Force
STP_FRC Stop Force
HI_FRC High Force
LO_FRC Low Force
REV_FRC Reverse Force
CMD_OVR Command Override
CL_OVR Close Override
OP_OVR Open Override
INT_OVR Intermediate Override
TRP_OVR Trip Override
STP_OVR Stop Override
MN_REJ Manual Reject
CMD_TRK Command Track

Instruction Guide GEI-100682AK 137


Public Information
Permit Type Enumerations and Use
Enumeration When Used
AU_PMT Auto permit enumeration output is required
CL_PMT Close permit enumeration output is required
OP_PMT Open permit enumeration output is required
INT_PMT Intermediate permit enumeration output is required.
ON_PMT On permit enumeration output is required
OFF_PMT Off permit enumeration output is required
STR_PMT Start permit enumeration output is required
STP_PMT Stop permit enumeration output is required
HI_PMT High permit enumeration output is required
LO_PMT Low permit enumeration output is required
REV_PMT Reverse permit enumeration output is required
RDY1 Ready 1 permit enumeration output is required
RDY2 Ready 2 permit enumeration output is required
RDY3 Ready 3 permit enumeration output is required
RDY4 Ready 4 permit enumeration output is required
RDY5 Ready 5 permit enumeration output is required
SFC_TRANS_PMT Sequential function chart transition permit enumeration output is required
MOD_PMT Modulate permit enumeration output is required

Force Type Enumerations and Use


Enumeration When Used
CMD_OVR Command override enumeration output is required
CL_OVR Close override enumeration output is required
OP_OVR Open override enumeration output is required
INT_OVR Intermediate override enumeration output is required
TRP_OVR Trip override enumeration output is required
STP_OVR Stop override enumeration output is required
MN_REJ Manual Reject enumeration output is required

Track Type enumeration, CMD_TRK is used when a Command track enumeration output is required.

138 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Equation (EQN) Input
The equation input, EQN, is a string equation that is equivalent to the graphical AND, OR, and NOT blocks used to represent
the logic required to provide the correct block output (* = AND, + = OR, ~ = NOT, () are grouping characters). The string
equation can be entered directly into the input EQN, or it can be generated automatically from the graphical representation of
the logic created using AND, OR, and NOT blocks. If the equation is entered manually into the EQN input, the logic is
automatically configured correctly in the logic building template and visa versa.
Example: EQN input; (IN1+IN2)*(~(IN3))

Example EQN Input

Logic Building Template

Instruction Guide GEI-100682AK 139


Public Information
IN1, IN1TP, IN1TE, and IN1T (1-32) Inputs
Inputs IN1 through IN32 are manipulated by AND, OR, and NOT logic to create the desired output.
Input toggle permits, IN1TP through IN32TP , are set by the programmer and can only be changed in the controller by
performing a Build and Download of the modified code. If the toggle permit input for a corresponding input is True, the
operator is able to toggle the value of the associated logical input, IN1TE through IN32TE, using the CIMPLICITY graphical
interface.
Inputs IN1TE through IN32TE are toggle enable inputs that are controlled by the operator using the CIMPLICITY graphical
interface. The operator can toggle each permitted input from True to False, or False to True.
The toggle input values, IN1T through IN32T, track the values of IN1 through IN32, respectively, when toggle mode is not
enabled for its input. The toggle input value, IN1T through IN32T, is the actual value that is used in the AND, OR, and NOT
programmed logic. The toggle value, IN1T, for the IN1 input is defined as a combination of the toggle input permit, IN1TP
being equal to True, and the toggle enable input from the CIMPLICITY graphical interface, IN1TE being equal to True. This
toggle value concept is True for all 32 inputs, IN1 through IN32.
Output (OUT) Enumerations
The output, OUT, is an enumerated output. The enumerations for OUT are based on the block type dictated by the input
enumeration assigned to the input TYP, and will be a PERMIT, OVERRIDE, FORCE, or TRACK type enumerations. OUT
output enumerations are defined by type, either PERMIT, FORCE, OVERRIDE or TRACK.

OUT Permit Type output enumerations are as follows:

OUT Permit Type Output Enumerations


Name Description
NO_PERM-NO_BYPASS No Permit and no Permit is bypassed
PERM-NO_BYPASS Permit OK and no Permit is bypassed
NO_PERM-BYPASS No Permit and a Permit is bypassed
PERM-BYPASS Permit OK and a Permit is bypassed

NO_PERM — indicates all permits have not been met.


PERM — indicates all permits have been met.
NO-BYPASS — indicates the operator has not invoked a toggle of any of the associated logic driven inputs to the permit type
block.
BYPASS — indicates the operator has invoked a toggle of at least one of the associated logic driven inputs to the permit type
block.

OUT Force Type output enumerations are as follows:

OUT Force Type Output Enumerations


Name Description
NO_FORCE-NO_BLOCK No Force and no Force is blocked
FORCE-NO_BLOCK Force active and no Force is blocked
NO_FORCE-BLOCK No Force and a Force is blocked
FORCE-BLOCK Force active and a Force is blocked

NO_FORCE — indicates no force command is active.


FORCE — indicates a force command is active.
NO-BLOCK — indicates the operator has not invoked a toggle of any of the associated logic driven inputs to the force type
block.

140 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
BLOCK — indicates the operator has invoked a toggle of at least one of the associated logic driven inputs to the force type
block.

OUT Override Type output enumerations are as follows:

OUT Override Type Output Enumerations


Name Description
NO_OVR-NO_BLOCK No Override and no Override is blocked
OVR-NO_BLOCK Override active and no Override is blocked
NO_OVR-BLOCK No Override and an Override is blocked
OVR-BLOCK Override active and an Override is blocked

NO_OVR — indicates no override command is active.


OVR — indicates an override command is active.
NO-BLOCK — indicates the operator has not invoked a toggle of any of the associated logic driven inputs to the override
type block.
BLOCK — indicates the operator has invoked a toggle of at least one of the associated logic driven inputs to the override
type block.

OUT Track Command Type output enumerations are as follows:

OUT Track Command Type Output Enumerations


Name Description
NO_TRACK-NO_BLOCK No Track and no Track is blocked
TRACK-NO_BLOCK Track active and no Track is blocked
NO_TRACK-BLOCK No Track and a Track is blocked
TRACK-BLOCK Track active and a Track is blocked

NO_TRACK — indicates no track command is active.


TRACK — indicates a track command is active.
NO-BLOCK — indicates the operator has not invoked a toggle of any of the associated logic driven inputs to the track type
block.
BLOCK — indicates the operator has invoked a toggle of at least one of the associated logic driven inputs to the track type
block.

Outputs OUT_TGL and OUT_VAL


The output, OUT_TGL, indicates one or more of the inputs are in toggle-enabled mode. OUT_TGL is True when at least one
IN1TP and IN1TE through IN32TP and IN32TE pair is True. When OUT_TGL is True, the OUT enumeration contains
BYPASS or BLOCK based on the enumeration chosen for the block by the input TYP.
OUT_VAL, the Boolean output status, is driven by the logical output of the user-defined equation input, EQN. When OUT_
VAL is True, the OUT enumeration contains either PERM, OVR, FORCE or TRACK based on the enumeration chosen for
the block input TYP.

Instruction Guide GEI-100682AK 141


Public Information
ToolboxST Configuration
When a block is inserted into the ToolboxST application code, it generates a window prompting the user to enter the Device
Name and the Block Type that will be assigned to the TYP input. The block automatically creates the variables associated
with the block and provides the appropriate attributes for each variable (for example Type, Scope, variables that need to be on
EGD will be automatically placed on the $Default EGD page).

Note Each Device Name used in a controller must be unique.

LOGIC_BUILDER Window Example

Inputs
Name Description Type Array Initial Value Visibility Usage
EQN LOGIC EQUATION STRING 0 IN1 Always Const
TYP LOGIC TYPE UINT 0 {Type} Always Input
IN1 INPUT 1 BOOL 0 False Always Input
IN1T Input 1 toggle value BOOL 0 False Always State
IN1TE Input 1 toggle enable from HMI BOOL 0 False Always Input
IN1TP Input 1 toggle permitted BOOL 0 False Always Const
IN2 INPUT 2 BOOL 0 False Always Input
IN2T Input 2 toggle value BOOL 0 False Always State
IN2TE Input 2 toggle enable from HMI BOOL 0 False Always Input
IN2TP Input 2 toggle permitted BOOL 0 False Always Const
↓ ↓ ↓ ↓ ↓ ↓ ↓
↓ ↓ ↓ ↓ ↓ ↓ ↓
IN32 INPUT 32 BOOL 0 False Always Input
IN32T Input 32 toggle value BOOL 0 False Always State
IN32TE Input 32 toggle enable from HMI BOOL 0 False Always Input
IN32TP Input 32 toggle permitted BOOL 0 False Always Const

Outputs
Name Description Type Array Initial Value Visibility Usage
{Device}{Type} Test string for the equation BOOL 0 False Always Output
OUT Output enumeration UINT 0 NO_PERM -NO_BYPASS Always Output
OUT_VAL Boolean output status BOOL 0 False Always Output
OUT_TGL Inputs in toggle enabled mode BOOL 0 False Always Output

142 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Global Pins (Automatically Created for an Auto Permit Type Block)
EGD External
Global Pin Name Description Alarm Event
Page Access
00LOG_BLD1000AU_PMT Test string for the equation Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN1 Input 1 Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN1T Input 1 toggle value Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN1TE Input 1 toggle enable from HMI Not Alarmed *IN1TP $Default Read Only
00LOG_BLD1000AU_PMT.IN1TP Input 1 toggle permitted Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN2 Input 2 Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN2T Input 2 toggle value Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN2TE Input 2 toggle enable from HMI Not Alarmed *IN2TP $Default Read Only
00LOG_BLD1000AU_PMT.IN2TP Input 2 toggle permitted Not Alarmed False $Default Read Only
↓ ↓ ↓ ↓ ↓ ↓
↓ ↓ ↓ ↓ ↓ ↓
00LOG_BLD1000AU_PMT.IN32 Input 32 Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN32T Input 32 toggle value Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.IN32TE Input 32 toggle enable from HMI Not Alarmed *IN32TP $Default Read Only
00LOG_BLD1000AU_PMT.IN32TP Input 32 toggle permitted Not Alarmed False $Default Read Only
00LOG_BLD1000AU_PMT.OUT Output enumeration Not Alarmed False — Read Only
00LOG_BLD1000AU_PMT.OUT_VAL Boolean output status Not Alarmed False — Read Only
00LOG_BLD1000AU_PMT.OUT_TGL Inputs in toggle enabled mode Not Alarmed False — Read Only

Instruction Guide GEI-100682AK 143


Public Information
HMI Configuration (CIMPLICITY)
The following figure is an example of the CIMPLICITY graphical interface with a permit type block, with six permit enabled
inputs and input 2 is toggled.

Typical HMI Object for LOGIC_BUILDER with a Permit Type Block


The following figure is an example of the common usage of a LOGIC_BUILDER block. This example displays the LOGIC_
BUILDER block sharing the same name as the M_O_V block that it is controlling. The ToolboxST application requires that
all blocks have unique names. The LOGIC_BUILDER blocks avoid this by adding the block type to the block name. This
makes them unique, links them to the block they control in the HMI, and indicates their function.

144 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Connection and Naming

GEI-100682AK Instruction Guide 145


Public Information
Logic Builder State Change (LOGIC_BUILDER_SC)
Block Category: Permits and Overrides
The Logic Builder State Change (LOGIC_BUILDER_SC) block operation is identical to the LOGIC_BUILDER block with
an additional State Change feature.
The State Change feature performs a First In-First Out (FIFO) operation for all 32 inputs. It latches input values for the
current and previous frames when the output transitions to a Not Permitted, Forced, Override, or Track state. Indication is
provided that a State Change has occurred and acts as a reset dominant latch. Refer to the Mark VIe Controller DCS Block
Library (GEI-100679), the block First In-First Out (FIFO) for further details.
Each input has the capability of inheriting the description of a connected global variable or a global variable connected
through a NOT block. When a connection is made to one of the input pins, the description of the global variable is inherited
by default. If this description is undesirable, it must be disabled by setting the Inherit Description option to False in the input
variable properties. The description can be replaced with a desirable description by entering an appropriate description in the
description field of the input variable of the LOGIC_BUILDER_SC block (replace LOGIC_BUILDER_SC #1 with the
desired override description for the source connected to IN1). The description is not copied from the connected variable
immediately; the input’s description is set when the library or device containing the input is validated or built.
TYP Input Enumerations
Refer to the Logic Builder (LOGIC_BUILDER) block section TYP Input Enumerations.
EQN Input
Refer to the Logic Builder (LOGIC_BUILDER) block section Equation (EQN) Input.
State Change
The State Change feature adds the input pins SCA_ENABLE, RESET, and RESET_PB. The SCA_ENABLE pin must be
True for the State Change feature to operate. This would typically be connected to device I/O to prevent recording a State
Change while the equipment is not operating. For example, it may not be desired to record a process trip to a pump if the
pump was already off when the trip signal was sent.
The RESET pin is available for control logic to reset the SCA pin. While the RESET pin is held True, the SCA pin will
remain False. It might be desirable to set this input True for one frame when a sequence or system is initially started.
The RESET_PB pin is intended for use by the CIMPLICITY graphical interface. When the RESET_PB pin is set to True the
SCA pin is set to False, then RESET_PB is set to False by the LOGIC_BUILDER_SC block.
OUT Enumerations
Refer to the Logic Builder (LOGIC_BUILDER) block section Output (OUT) Enumerations.

146 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Outputs OUT_TGL and OUT_VAL
Refer to the Logic Builder (LOGIC_BUILDER) block section Outputs OUT_TGL and OUT_VAL.
State Change
The State Change feature adds the outputs pins SCA, SCA_CUR, and SCA_PRV. The SCA pin changes from False to True
when the OUT pin transitions to a Not Permitted, Forced, Override, or Track state. The SCA pin acts as a reset dominant
latch. The RESET and RESET_PB pins reset the SCA latch. The SCA_ENABLE pin prevents the SCA latch from being set,
but will not reset the SCA latch.
The SCA_CUR pin holds a 32-bit un-signed integer. The value of each bit of this integer represents the value of the
corresponding input, for the frame the OUT pin transitioned to a Not Permitted, Forced, Override, or Track state.
The SCA_PRV pin holds a 32-bit un-signed integer. The value of each bit of this integer represents the value of the
corresponding input, one frame before the OUT pin transitioned to a Not Permitted, Forced, Override, or Track state.

ToolboxST Configuration
Refer to the Logic Builder (LOGIC_BUILDER) block section Configuration.

Instruction Guide GEI-100682AK 147


Public Information
Logical AND (AND)
Block Category: Boolean Operations
The Logical AND (AND) block is an expandable block that performs a logical AND of up to 32 inputs.

AND Block

Note Annunciation of Loss of IONet for Mark VIe I/O Packs is a logic example using the AND block.

Truth Table
IN1 IN2 OUT
1 1 1
1 0 0
0 1 0
0 0 0
OUT will be 1 only if all inputs are 1. Otherwise, OUT will be 0.

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

148 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Logical NAND (NAND)
Block Category: Boolean Operations
The Logical NAND (NAND) block is an expandable block that performs a logical NAND of up to 32 inputs.

NAND Block

Truth Table
IN1 IN2 OUT
0 0 1
0 1 1
1 0 1
1 1 0
OUT will be 0 only if all inputs are 1. Otherwise, OUT will be 1.

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

Instruction Guide GEI-100682AK 149


Public Information
Logical NOR (NOR)
Block Category: Boolean Operations
The Logical NOR (NOR) block is an expandable block which performs a logical NOR of up to 32 inputs.

NOR Block

Truth Table
IN1 IN2 OUT
0 0 1
0 1 0
1 0 0
1 1 0

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

150 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Logical NOT (NOT)
Block Category: Boolean Operations
The Logical NOT (NOT) block performs a logical inversion of the input and provides the mutually exclusive pair as an
output.

NOT Block

Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the NOT block.

Input
Name Data Type Description
A BOOL Input value

Outputs
Name Data Type Description
OUT_A BOOL Non-inverted value of input A
NOT_A BOOL Inverted value of input A

Instruction Guide GEI-100682AK 151


Public Information
Logical OR (OR)
Block Category: Boolean Operations
The Logical OR (OR) block is an expandable block that performs a logical OR of up to 32 inputs.

OR Block

Truth Table
IN1 IN2 OUT
0 0 0
0 1 1
1 0 1
1 1 1
OUT will be 0 only if all inputs are 0. Otherwise, OUT will be 1.

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

152 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Logical XNOR (XNOR)
Block Category: Boolean Operations
The Logical XNOR (XNOR) block is an expandable block that performs a logical exclusive-NOR of up to 32 inputs.

XNOR Block

Truth Table
IN1 IN2 IN3 OUT
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
OUT will be 1 only if there is an even number of inputs that are 1 OR if all of the inputs are
0. Otherwise, OUT will be 0.

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

Instruction Guide GEI-100682AK 153


Public Information
Logical XOR (XOR)
Block Category: Boolean Operations
The Logical XOR (XOR) block is an expandable block that performs a logical exclusive-OR of up to 32 inputs.

XOR Block

Truth Table
IN1 IN2 IN3 OUT
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
OUT is 1 only if there is an odd number of inputs that are 1. Otherwise, OUT is 0.

Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input

Output
Name Data Type Description
OUT BOOL Output

154 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Median Selector with Enable (MEDIAN)
Block Category: Selection
The Median Selector with Enable (MEDIAN) block selects the median of three analog variables and outputs the result.
LDIFLMT is driven True if the difference between the maximum and the minimum values of the three variables is greater
than or equal to the analog variable DIFLMT.
Floating Point Exception Handling
If a NaN is present on an input pin, the MEDIAN block replaces it internally with the most positive or most negative
representable number based on its sign, for the purpose of the comparison.

MEDIAN Block

MEDIAN Block Expanded

Inputs
Name Data Type Description
INPUT1 REAL Input variable 1
INPUT2 REAL Input variable 2
INPUT3 REAL Input variable 3
DIFLMT REAL Maximum to minimum difference limit
LENABLE BOOL Block enable (Default: True)

Outputs
Name Data Type Description
MEDIAN REAL Median selected output value
LDIFLMT BOOL Maximum to minimum difference limit exceeded logical

Instruction Guide GEI-100682AK 155


Public Information
Minimum, Maximum (MIN_MAX)
Block Category: Selection
The Minimum, Maximum (MIN_MAX) block is an expandable block that determines the minimum or maximum value of up
to 32 inputs by choosing an enumerated function. If the value of the input pin FUNC is MAX, then the greatest value input is
passed to the output. If the value of FUNC is MIN, then the least value input is passed to the output.

Note Annunciation of Overtemp for Mark VIe I/O Packs is a logic example using the MIN_MAX block.

The status pin, STAT1 - STAT32, corresponding to the selected input is set to True and others are set to False. If more than
one input satisfies the function, the first input found in top/down order is passed. The default value for the FUNC input is
MIN.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

MIN_MAX Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
FUNC ENUM (INT) Selection function (either MIN or MAX) (Default: MIN)
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT ANY_NUM† Minimum or maximum value
STAT1 BOOL First flag. If True, the corresponding input is the minimum or maximum
↓ ↓ ↓
STATn BOOL N'th flag. If True, the corresponding input is the minimum or maximum
† Value with status, if status option is enabled.

156 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Configuring Matrix Blocks
The type of Matrix block and the controller’s processor type and frame rate determine the size of the array that can be
supported. Generally, faster processors with longer frame rates can support larger array inputs. A Matrix input and output uses
a column-oriented single dimension array. Both single and double precision data types are supported by the Matrix blocks.
The Matrix blocks have the following common inputs (where X indicates the Matrix):

• ROWS_X indicates the rows of matrix X


• COLS_X indicates the columns of matrix X

MADDSUB Block ToolboxST Configuration

➢ To configure a MADDSUB block


1. From the ToolboxST application, insert a new Mark VIe controller.
2. From the Tree View, double-click the new Mark VIe controller to open the Component Editor.
3. From the Software tab Tree View, right-click Programs and select Add Program.

4. Enter a name for the program and click OK.

Instruction Guide GEI-100682AK 157


Public Information
5. Right-click the new program (in this example, Prog1) and select Add Task.

6. Enter a task name and click OK.


7. Expand the program and select the task (in this example, T1) to display the Block Editor.

8. From the block category drop down menu, select Matrix to display the Matrix blocks. Select MADDSUB and drag and
drop to move the block into the Block Editor.

158 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
9. From the Block Editor, double-click the MADDSUB block to display the Edit Block Pin Connections dialog box.
10. Add two matrices (A and B), each having two rows and four columns where:

a. Enter a value of 2 to the immediate pins ROWS_A and ROWS_B.


b. Enter a value of 4 to the immediate pins COLS_A and COLS_B.

11. Create a local or global variable with an array size of 8 (equivalent to ROWS_A multiplied by COLS_A) and values of [1,
2, 3, 4, 5, 6, 7, 8] to attach to the input A, as follows:
a. From the Tree View, right-click Variables and select Add Variable from the drop down menu.

Note In the Tree View, the Variables item inside the Programs item contains global variables. The Variables item inside
the task item contains local variables. Local variables are only available for the specified task, whereas global variables
can be used with multiple tasks.

Instruction Guide GEI-100682AK 159


Public Information
b. Enter a name for the variable and click OK.

c. Change the variable Type to REAL.


d. Modify the Initial Value and select an Array Size of 8 and enter the values as 1, 2, 3, 4, 5, 6, 7, 8, then click OK.

160 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
12. Create another local or global variable with array size of 8 (equivalent to ROWS_B multiplied by COLS_B) and values of
10, 20, 30, 40, 50, 60, 70, 80 to attach to the input B, as shown in the following figure:

13. From the Tree View, select the task item to display the Block Editor.
14. From the Block Editor, double-click the MADDSUB block diagram to display the Edit Block Pin Connections dialog
box.
a. For Pin A, select Global Variables from the drop down menu.
b. Select Variable 1 and click OK.

For pin A, select Global Variables


from the drop down menu.

Select Variable 1, then click OK.

Instruction Guide GEI-100682AK 161


Public Information
The following table contains timing data, with the performance time taken for a given order of Matrix, that can be used to
configure the application. The controller's performance time is in microseconds (µs) and corresponds to the orders 1, 10, and
50. The timings when re-computed may not be exact, but should be approximately the same as listed.

Timing Data
Block Order† UCSA Time UCCA Time UCCC Time
1 1.04 0.94 0.25
MADDSUB 10 13.86 10.09 4.83
50 370 189 110
1 0.87 0.85 0.39
MDOTDIV 10 19.75 15.03 4.83
50 542 286 99.77
1 0.76 0.66 0.1
MFILL 10 7.74 5.79 1.62
50 175 135 31.9
1 1.03 0.76 0.39
MCONCAT 10 21.26 17.04 4.92
50 167.31 322 103
1 0.78 0.67 0.24
MMINMAX 10 7.68 4.42 1.27
50 167.81 83.51 27.36
1 0.71 0.46 0.29
MTRN 10 12.1 10.15 2.09
50 341 273 98.3
1 0.75 0.37 0.08
MDOTMUL 10 12.2 11.85 2.85
50 340 168 61.89
1 0.73 0.44 0.1
MSVCH 10 10.57 9.99 3.58
50 279 195 63.91
1 1.53 1.41 0.66
MSUBMATRIX 10 12.56 11.74 4.34
50 320 192 68.5
1 1.02 1.05 0.38
MFIND 10 24.7 18.86 7.51
50 735.01 425 132
1 8.73 8.68 2.6
MINV 10 109 474 268
50 3209 48851 30984
1 0.83 0.77 0.08
MMUL 10 43.11 71.59 34.57
50 4472 3624 1500
† Order refers to the number of Matrix rows and columns. For example, a Matrix with an order of 50 has both 50 columns and

50 rows.

162 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Addition Subtraction (MADDSUB)
Block Category: Matrix
The Matrix Addition Subtraction (MADDSUB) block computes the sum or difference of two equally sized matrices. In
Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for the MADDSUB block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix.
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix.
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A.
• An attempt to find the sum or difference of two matrices that differ in size. For performance, the input matrices A and B
must have the same number of elements and have the same number of rows and columns. The ROWS_A must equal the
ROWS_B likewise, the COLS_A must equal the COLS_B.

MADDSUB Block

Instruction Guide GEI-100682AK 163


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix
FUNC Constant UINT Choice of operation {0 for Addition, 1 for Subtraction}

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL Array Array holding entries of the output matrix

164 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Concatenation (MCONCAT)
Block Category: Matrix
The Matrix Concatenation (MCONCAT) block combines two smaller matrices and provides the following functions:

• Combines two smaller matrices into one large matrix by either stacking them on top of each other or setting them
side-by-side
• Merges one small matrix into another big matrix, and as a result, some content in the big matrix is replaced by the content
of the small matrix
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
Examples
This block provides the ability to stack two matrices either on top of each other or side-by-side, resulting in one larger matrix.
This block also provides merging of a given smaller matrix into the given bigger matrix resulting in a new matrix, which has
the same size of the bigger matrix.

Horizontal Concatenation

Vertical Stacking Concatenation


START_ROW = 1 and START_COL = 1

Merge

Instruction Guide GEI-100682AK 165


Public Information
The failure modes for this block include:

• An attempt to define the size (length) of either of the input arrays, A or B, as anything other than the product of the input
values for ROWS_A and COLS_A (or ROWS_B and COLS_B).
• An attempt to combine two input matrices that are not the appropriate size for concatenation (that the number of columns
is inconsistent for vertical stacking, the number of rows is inconsistent for horizontal stacking, and ROWS_A less than
ROWS_B or COLS_A less than COLS_B in case of Merge)
• An attempt to define the number of rows or columns in the input matrices as a non-positive number
• An attempt to attach a pin for the output array (matrix) that does not match the expected output size

MCONCAT Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
START_ROW UINT Start row in the matrix A for merge, it starts from 0 and used only for merge function
Start column in the matrix A for merge, it starts from 0 and used only for merge
START_COL UINT
function.
B[ ] REAL/LREAL array Array holding entries of the second input matrix
FUNC UINT Choice of operation {0 for horizontal, 1 for vertical, 2 for Merge}

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

166 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Dot Division (MDOTDIV)
Block Category: Matrix
The Matrix Dot Division (MDOTDIV) block computes the result of dot division of two equally sized matrix. Each element of
the input matrix A is divided by the corresponding element of the matrix B to compute the corresponding element in the
output matrix.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A

MDOTDIV Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

Instruction Guide GEI-100682AK 167


Public Information
Matrix Dot Multiplication (MDOTMUL)
Block Category: Matrix
The Matrix Dot Multiplication (MDOTMUL) block computes the result of dot multiply of two equally sized matrices. Each
element of the input matrix A is multiplied by the corresponding element of the matrix B to compute the corresponding
element in the output matrix.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A

MDOTMUL Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

168 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Fill (MFILL)
Block Category: Matrix
The Matrix Fill (MFILL) block generates a matrix of a specified size with entries populated in a defined pattern. The desired
entries are given a specified value and the remaining matrix entries are assigned to a pre-fill value. The patterns (of forms)
supported include: full, diagonal, upper triangular, lower triangular and miscellaneous.
lalIn Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries
are listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• An attempt to attach a pin for the output array (matrix) that does not match the expected output size defined by the
product of ROWS_A and COLS_A

MFILL Block
Examples
This block provides a number of fill patterns for the output matrix. They are each depicted briefly by the following examples:
FULL: ROWS_A = 2, COLS_A = 3, VALUE = 6, PREFILL = 0, FORM= FULL

Full Configuration

DIAG: ROWS_A = 4, COLS_A = 3, VALUE = 6, PREFILL = 0, FORM = DIAG

DIAG Configuration

Instruction Guide GEI-100682AK 169


Public Information
UPTRI: ROWS_A = 4, COLS_A = 3, VALUE = 6, PREFILL = 0.5, FORM = UPTRI

UPTRI Configuration
LOWTRI: ROWS_A = 4, COLS_A = 3, VALUE = 6, PREFILL = 0.5, FORM = LOWTRI

LOWTRI Configuration

MISC: ROWS_A = 4, COLS_A = 3, VALUE = 6, PREFILL = 0, FORM = MISC ROW_ST = 1, COL_ST = 1, ROW_END
=3, COL_END = 2

MISC configuration

Note The indices defining the starting and ending rows and columns for the fill are zero-based. (ROW_ST, COL_ST, ROW_
END, COL_END). These values are also standard integer inputs that can be changed online. If the fill indices are chosen such
that they exceed the actual size of the matrix, these inputs are accepted but only the appropriate entries in the output matrix
are populated.

170 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
VALUE REAL/LREAL Value to populate specified matrix entries
PREFILL REAL/LREAL Value to populate unspecified matrix entries
FORM UINT Pattern used in populating output matrix
ROW_ST UINT Starting row for fill when using misc option
COL_ST UINT Starting column for fill when using misc option
ROW_END UINT Ending row for fill when using misc option
COL_END UINT Ending column for fill when using misc option

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

Instruction Guide GEI-100682AK 171


Public Information
Matrix Find (MFIND)
Block Category: Matrix
The Matrix Find (MFIND) block reads in a matrix and output a list (1-dimensional array) of all elements that meet a
user-defined condition (elements that are greater than 5). Equality (as well as not equal) checking of floating point variables is
carried out based on a tolerance (TOL). This value defaults to 1e-3 when not otherwise specified on the pin. The comparison
functions are of six kinds: greater than or equal to, less than or equal to, less than, greater than, equal to, not equal to.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins that specify the size of the matrix are immediate pins that cannot
be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns


(COLS_A) in the desired input matrix.
• An attempt to attach a pin for the output array (matrix) that does not match the expected output size defined by the
product of ROWS_A and COLS_A

MFIND Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
FUNC Constant UINT Comparison function (GT=1, LT=2, GE=3, LE=4, EQ=5, NE=6)
TOL REAL/LREAL Tolerance variable used to define equality in EQ & NE (Default: 1e-3)
REF REAL/LREAL Reference value to which all matrix elements are compared
PREFILL REAL/LREAL Default value to which the output array is pre-filled

Outputs
Name Data Type Description
BROWNDX INT Array holding the row indices of all elements that meet the defined criteria
BCOLNDX INT Array holding the column indices of all elements that meet the defined criteria
B[ ] REAL/LREAL array Array holding the values of all elements that meet the defined criteria
COUNT UINT Total number of elements found

172 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Inverse (MINV)
Block Category: Matrix
The Matrix Inverse (MINV) block computes the inverse of the input matrix.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• The matrix is not invertible if the quotient of 1/(ad-bc) is undefined


• The output matrix should be set to all zeros

MINV Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
TOL† REAL/LREAL Tolerance value
† The TOL pin should always be equal to 0.0 except in the case when the DET output is almost zero, < 1E-08. Setting the TOL

pin to a small number, for example 1E-06, will cause the DET output to equal 0.0 and the ERROR output to equal True.

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
ERROR BOOL The matrix is not invertible (if not invertible ERROR = True)
DET REAL/LREAL Determinant of the matrix

Instruction Guide GEI-100682AK 173


Public Information
Matrix Minimum/Maximum Element Determination
(MMINMAX)
Block Category: Matrix
The Matrix Minimum/Maximum Element Determination (MMINMAX) block finds the location and value of the minimum or
maximum element in a given matrix.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The failure to properly specify and input matrix by defining an input array that has either more or less elements than
defined by the intended number of rows and columns in the matrix

MMINMAX Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
FUNC Constant UINT Choice of operation { 0 for Maximum,1 for Minimum }

Outputs
Name Data Type Description
ROW UINT Integer Zero-Based Row Index for Min/Max Element (1st instance)
COL UINT Integer Zero-Based Column Index for Min/Max Element (1st instance)
VALUE REAL/LREAL Floating point value of Min/Max element found

174 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Multiplication (MMUL)
Block Category: Matrix
The Matrix Multiplication (MMUL) block computes the product of two appropriately sized matrices.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define the size (length) of either of the input arrays, A or B, as anything other than the product of the input
values for ROWS_A and COLS_A, or ROWS_B and COLS_B
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_B
• An attempt to find the product of two matrices that are not the proper size for multiplication (the number of columns in A
matrix must equal the number of rows in B)
• An attempt to define the number of rows or columns in the desired input matrices as a non-positive number

MMUL Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

Instruction Guide GEI-100682AK 175


Public Information
Matrix Submatrix Selection (MSUBMATRIX)
Block Category: Matrix
The Matrix Submatrix Selection (MSUBMATRIX) block generates an output matrix based on user defined start, end, and
every nth column/row selection information for both the rows and columns of the input matrix. Refer to the section
Configuring Matrix Blocks for further details.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online.

Note The indices defining the column and row start and end locations.

Example

A= ROW_ST=0 ROW_INC=1 ROW_END=1


COL_ST =1 COL_INC=2 COL_END=3

Note ROW_ST, ROW_END, COL_ST, and COL_END are zero based.

The block outputs and matrix would be:

ROWS_B=2 COLS_B=2 B=

The failure modes for this block include:

• An attempt to define the number of rows, columns, row increment, and/or column increment for the desired input
matrices as a non-positive number
• An attempt to create an input array (A) that is not equal to the product of ROWS_A and COLS_A

MSUBMATRIX Block

176 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LReal array Array holding entries of the first input matrix
ROW_ST Constant UINT Index to start row sub-matrix selection
ROW_INC Constant UINT Index to increment between row start-stop selection
ROW_END Constant UINT Index to end row sub-matrix selection
COL_ST Constant UINT Index to start column sub-matrix selection
COL_INC Constant UINT Index to increment between column start-stop selection
COL_END Constant UINT Index to end column sub-matrix selection

Outputs
Name Data Type Description
ROWS_B UINT Number of rows in the output matrix
COLS_B UINT Number of columns in the output matrix
B[ ] REAL/LReal array Array holding entries of the output matrix

Instruction Guide GEI-100682AK 177


Public Information
Matrix Switch Block (MSVCH)
Block Category: Matrix
The MSVCH block selects output matrix from two equally sized input matrices based on input condition flag.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed row-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix (ROWS_
A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double entries
according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore cannot
be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
If B_FLAG is True, matrix C[ ] is equal to matrix A[ ], else c[ ] is equal to matrix B[ ].

MSVCH Block
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
Matrix Selection Flag.
B_FLAG BOOL
If B_FLAG is True, C is set to A. If B_FLAG is False, C is set to B
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix

Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix

178 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Matrix Transpose (MTRN)
Block Category: Matrix
The Matrix Transpose (MTRN) block computes the transpose of a given matrix.
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed row-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix (ROWS_
A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double entries
according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore cannot
be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
The failure modes for this block include:

• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The failure to properly specify an input array that has either more or less elements than defined by the intended number
of rows and columns in the matrix

MTRN Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix

Outputs
Name Data Type Description
ROWS_B UINT Number of rows in the output matrix
COLS_B UINT Number of columns in the output matrix
B[ ] REAL/LREAL array Array holding entries of the output matrix

Instruction Guide GEI-100682AK 179


Public Information
Modbus Master Read (MBUS_READ)
Block Category: Communications

Note This block is supported in all Mark VIe platforms and in all redundancy configurations.

The Modbus master blocks, MBUS_READ and MBUS_WRITE, are used to Read and Write data to Modbus slave devices.
Only TCP Modbus slaves are supported by the MBUS_READ and MBUS_WRITE blocks.

MBUS_READ and MBUS_WRITE Blocks


When the REQUEST pin transitions to True, the Modbus block initiates a Read or Write request, depending on which block is
being used. Modbus Read/Write communication occurs sequentially for all blocks configured to an individual Modbus slave.
If a Modbus block Read/Write request is in progress with a Modbus slave, another Modbus block request will not start until
the communication already in progress has completed or timed out. However, communication to two different Modbus slave
devices can occur simultaneously.
When the block’s REQUEST pin is triggered, the output BUSY pin is immediately set to True. The BUSY pin resets to False
only when the Modbus Read or Write communication has completed or timed out.
The COMM_STARTED output pin is set to True when communication to the Modbus slave requested by this block starts and
resets to False when block communication has completed. COMM_STARTED becoming True may be delayed from BUSY
becoming True in the event another Modbus block is already communicating with the Modbus slave.
When the Modbus Read or Write communication has completed or timed out, the DONE output pin is set to True.

180 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Note The inputs listed in the following table are shared by the MBUS_READ block and the MBUS_WRITE block.

MBUS_READ and MBUS_WRITE Common Block Inputs


Name Data Type Description
When set to True, the block is enabled (Default: True). The block must be enabled to
ENABLE BOOL start Modbus Read or Write communications. If the ENABLE pin is False, all outputs are
reset and all other inputs are ignored.
Must be toggled from False to True for the block to send a command to the Modbus
REQUEST BOOL
slave. Upon triggering, Modbus data is Read or Written one time.
This represents the connection identifier of the Modbus slave. This value is defined for
the Modbus slave in the Modbus master configuration. When not set properly, the block
CONN_ID UINT
does not function and times out. Refer to the ToolboxST User Guide for Mark Controls
Platform (GEH-6700), the section Modbus Master.
SLAVE_ID UINT The Modbus slave identifier. Usually set to 1 in case of TCP Modbus slaves.
The following are the supported Modbus function codes:
MBUS_READ block:
MODBUS_READ_COILS (1),
MODBUS_INPUT_DISCRETES (2),
MODBUS_READ_HOLDING_REGS (3),
MODBUS_READ_INPUT_REGISTERS (4),
FUNC_CODE UINT
MODBUS_READ_EXCEPTION_STATUS (7)
MBUS_WRITE block:
MODBUS_WRITE_COIL (5),
MODBUS_WRITE_SINGLE_REGISTER (6),
MODBUS_FORCE_MULTIPLE_COILS (15),
MODBUS_WRITE_MULTIPLE_HOLDING_REGS (16)
First coil/register value to read from/write to the Modbus slave coil/register page. The
FIRST_REG UINT
minimum coil/register value is 1. A value of 0 will result in an error.
NUM_REGS UINT Number of coils/registers to read from/write to the Modbus slave coil/register page
The time in milliseconds after which the block times out the communication and does
not consume the Modbus response even if the response comes after timeout. The
TIMEOUT UINT
timeout is calculated once the block is triggered by the REQUEST pin and after the
COMM_STARTED output transitions to True. (Default: 200 milliseconds)

Instruction Guide GEI-100682AK 181


Public Information
Note The outputs listed in the following table are shared by the MBUS_READ block and the MBUS_WRITE block.

MBUS_READ and MBUS_WRITE Common Block Outputs


Name Data Type Description
A value of True indicates that the block is currently processing a request to the Modbus
BUSY BOOL
slave device.
Start of communication flag for the block. This pin transitions to True, when
COMM_STARTED BOOL
communication to the slave starts.
DONE BOOL Done status for the block
Execution status for the block
0: Block disabled
1: Waiting for REQUEST trigger
STATUS UINT 2: Request queued, waiting to send (Blocked on communication from other blocks)
3: Request sent, waiting for response
4: Request completed successfully
5: Request completed with error
Error status for the block. These errors can come directly from the Modbus slave or
ERROR_CODE UINT generated from the block during block execution. Refer to the table Error Codes for a
description of values.
This is the amount of time elapsed between the COMM_STARTED output transitioning
EXEC_TIME UDINT
to True and the block completing execution (DONE pin becomes True)

Specific MBUS_WRITE Block Inputs


Name Data Type Description
Data to be written to the slave. Refer to the section Various Data Type Support for a
WR_DATA UINT array
description of writing data other than 16-bit unsigned values.

Specific MBUS_READ Block Outputs


Name Data Type Description
RD_LEN UINT Number of bytes read from the Modbus slave device
Data read from the Modbus slave device. Each element of the array represents 2 bytes
RD_DATA UINT array of data as it comes from the Modbus slave. Refer to the section Various Data Type
Support for a description of reading data other than 16-bit unsigned values.

182 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Various Data Type Support
RD_DATA output pin on MBUS_READ block
The Modbus data read from the Modbus slave is stored in the RD_DATA array. This array is a UINT array. If the data from
the slave is not of type UINT then array elements either need to be combined for larger sized types (like UDINT, DINT,
REAL, LREAL) or converted to signed 2-byte data (INT). Refer to the various COMBINE_* blocks and WD_TO_I convert
blocks.
Examples

Combining array elements into a REAL

Converting an array element to an INT

Instruction Guide GEI-100682AK 183


Public Information
WR_DATA input pin on MBUS_WRITE block
Data to be written to the Modbus slave is stored in an unsigned array, WR_DATA. If the data to be written to the slave is of
data types other than the UINT, then the write data needs to be split from larger sized data types (like UDINT, DINT, REAL,
LREAL) or to be converted from signed 2-byte data (INT). Refer to the various SPLIT_* blocks and I_TO_WD convert
blocks.
Examples

Splitting a REAL value into array elements

Converting a value from an INT

184 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Error Codes
Error Codes Generated by the Block
Error
Text Description
Number
0 No error No error
Block timed out while waiting for the Modbus command response. Refer to the table
7000 Timed out
Timeout Error Cases for various timeout cases.
7001 Invalid function code Invalid function code given to the block input pin FUNC_CODE
Invalid timeout value given to the block input pin TIMEOUT. Minimum value should be
7002 Wrong timeout value
200 milliseconds.
Applicable for MBUS_WRITE block. This error is generated if the calculated write length
(from function code and NumRegs) is greater than WR_DATA array length in bytes.
Function code Write length
MODBUS_WRITE_COIL (5) 2
NumRegs multiple of 8 Length =
Wrong calculated write MODBUS_FORCE_MULTIPLE_COILS (15)
7003 NumRegs / 8
length
NumRegs not multiple of 8 Length
MODBUS_FORCE_MULTIPLE_COILS (15)
= (NumRegs / 8) + 1
MODBUS_WRITE_SINGLE_REGISTER (6) NumRegs * 2
MODBUS_WRITE_MULTIPLE_HOLDING_ REGS NumRegs * 2
(16)
Applicable for MBUS_READ block. If the RD_DATA array length multiplied by 2 is less
7004 Insufficient read buffer
than the data read by the Modbus response.
7005 Invalid first register If the FIRST_REG input value is 0, then this error is generated by the block
1) If FUNC_CODE equal to MODBUS_READ_COILS or MODBUS_INPUT_
DISCRETES or MODBUS_FORCE_MULTIPLE_COILS, then NUM_REGS should not
be greater than 250 multiplied by 8.

2) If FUNC_CODE equal to MODBUS_READ_HOLDING_REGS or MODBUS_READ_


INPUT_REGISTERS or MODBUS_WRITE_MULTIPLE_HOLDING_REGS, then NUM_
Invalid number of REGS should not be greater than 125.
7006
registers
3) If FUNC_CODE is not equal to MODBUS_WRITE_COIL and is not equal to
MODBUS_WRITE_SINGLE_REGISTER and then NUM_REGS should not be equal to
0.

4) If FUNC_CODE is equal to MODBUS_WRITE_SINGLE_REGISTER and then NUM_


REGS should be equal to 1.
Applicable for MBUS_READ block. If the Modbus command response length is greater
7007 Invalid out data length
than 252, then this error is generated.
Block identifier rolled If the block’s unique identifier has been rolled back due to state exchange voting, then
7008
back this error is generated.
Controller in DATA_ In a redundant controller configuration, if any controller is in DATA_INITIALIZATION
7009
INITIALIZATION state state, then the block gives this error.
7010 Internal error Block internal error. The user has no control over it. The block will recover itself.

Instruction Guide GEI-100682AK 185


Public Information
Error codes by the Modbus slave: In this case the ERROR_CODE pin is updated with the error number.

Error Codes by the Modbus Slave


Error
Text Description
Number
1 Illegal Function The received function code cannot be processed
2 Illegal Data Address The data address specified in the request is not available
3 Illegal Data Value The value contained in the query data field is an invalid value
4 Slave Device Failure Unrecoverable error occurred while slave was attempting to perform requested action
Slave has accepted request and is processing it, but a long duration of time is required.
5 Acknowledge In this case, the read/write request size has to be reduced or the block TIMEOUT has to
be increased to complete the operation.
6 Slave Device Busy Slave is engaged in processing a long-duration command. Master should retry later.

Timeout error cases: Since this is timeout, the ERROR_CODE is updated with Timeout error (7000). The cases defined in
the table below are the various scenarios for timeout.
Timeout Error Cases
Case
Description
Number
1 Modbus slave not available to the UDH/CDH communicator
2 Writing to holes in Modbus register map
3 Writing to Mark VIeS Modbus slave
4 If number of Modbus blocks queued for a Modbus slave is more than 64
5 Writing to more than the number of Modbus command limit of the Modbus slave
6 The number of Modbus connections made by the Modbus slave is out of limit
7 Modbus response received from the slave is more than 260 bytes
8 If the Modbus master process is restarted, then the block might timeout during this period

MBUS_READ and MBUS_WRITE Block Performance


Modbus communications take about 3 frames to execute, from the time communications starts. For example, the COMM_
STARTED output becomes True until the communication is complete (the DONE pin is True). Times could be longer
depending on the speed of the slave.

186 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Modbus Master Write (MBUS_WRITE)
Block Category: Communications

Note This block is supported in all Mark VIe platforms and in all redundancy configurations.

The Modbus master block, MBUS_WRITE, is used to Write data to Modbus slave devices. Only TCP Modbus slaves are
supported by the MBUS_WRITE block.

Note The functionality of this block is described in detail in the documentation for the Modbus Master Read (MBUS_READ)
block.

MBUS_WRITE Block

Instruction Guide GEI-100682AK 187


Public Information
Mode Select (MODSEL)
Block Category: Selection
The Mode Select (MODSEL) block sets one of up to 8 logical outputs, MODE_0 to MODE_8, and clears the remaining
outputs based on a request from a logical input, MD0RQ to MD7RQ, corresponding to the mode number requested. The
mode remains set until another input logical is set. No two modes can be set at any one time. If two transition requests occur
at the same time and both transitions are allowed, the transition to the mode with the lowest number will occur. In other
words, the lower the mode number, higher the priority. Upon power up the block sets to MODE_0.

MODSEL Block Functional Diagram

MODSEL Block

188 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
MD0RQ BOOL Mode 0 request
↓ ↓ ↓
MD7RQ BOOL Mode 7 request

Outputs
Name Data Type Description
MODE_0 BOOL Mode 0 selected
↓ ↓ ↓
MODE_7 BOOL Mode 7 selected
Mode Word one indicates which mode is selected. This word is formatted
such that each bit presents a mode. With the least significant bit being
MODEW1 UINT
mode 0 and the most significant bit being mode 7. For example, if mode 5
is selected the word will be set equal to 32.
Mode Word two indicates which mode is selected. This word is formatted
MODEW2 UINT such that the magnitude of the word represents the mode number. For
example, if mode 5 is selected then the word will be set to 5.
Pin that contains state information to be preserved during an online
SCRATCH BOOL
download. (Default: True to save modes to Nonvolatile memory)

Instruction Guide GEI-100682AK 189


Public Information
Move (MOVE)
Block Category: Type Conversion
The Move (MOVE) block transfers the value of the input variable, SRC, into the output variable, DEST. The data transfer
occurs each time the block runs and the ENABLE pin is True. The analog variants of the block can be used to perform data
type conversions as well as memory move operations. The Boolean variant of MOVE is used to move only a logical state and
cannot convert the data type.
The MOVE blocks are useful for taking snapshots of data that are shared between tasks in separate modules. Moving the
variable to local copies guarantees that a high priority task cannot change the shared data while the low priority task is
processing it.

Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the MOVE block.

Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the DEST pin must match the selected data
type of the block. Refer to the section Change Data Type of Variant Block.

ENABLE

MOVE Block

This block propagates quality status if the status operations are enabled.

Block status modification: If SRC is value only, the status of DEST is NOT_LIMITED-GOODNC [128].

Refer to the Status Monitoring (STATUS_MONITORING) block.

Floating Point Exception Handling


The MOVE block does not allow a NaN to pass through it. If a NaN is encountered on an input pin, it is replaced at the output
with either the most positive or most negative number, based on the sign of the NaN.

Inputs
Name Data Type Description Interface Type
ENABLE BOOL Block enable (Default: True) Value only
Value with status or
SRC ANY† Source variable
Value only
† Value only or value with status, if status option is enabled and value only for Boolean block type.

Output
Name Data Type Description Interface Type
DEST ANY† Destination variable (data type enforced by the block type) Value with status
† Value only or value with status, if status option is enabled and value only for Boolean block type.

190 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Move Truncated (MOVE_DT)
Block Category: Type Conversion
The Move Truncated (MOVE_DT) block transfers the value of any variable into another long integer variable using
truncation rather than rounding in the conversion. The data transfer occurs each time the block runs and the ENABLE pin is
True. The analog variants of the block can be used to perform data type conversions as well as memory move operations.

MOVE_DT Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC Simple Source variable

Output
Name Data Type Description
DEST Long Integer Destination variable (data type enforced by the block used)

Instruction Guide GEI-100682AK 191


Public Information
Move Truncated (MOVE_IT)
Block Category: Type Conversion
The Move Truncated (MOVE_IT) block transfers the value of any variable into another integer variable using truncation
rather than rounding in the conversion. The data transfer occurs each time the block runs and the ENABLE pin is True. The
analog variants of the block can be used to perform data type conversions as well as memory move operations.

MOVE_IT Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC SIMPLE Source variable

Output
Name Data Type Description
DEST Long INT Destination variable (data type enforced by the block used)

192 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Mult (MULT)
Block Category: Math
The Mult (MULT) block is an expandable block that performs a multiplication of up to 32 inputs. The product of the
connected inputs is set as the output. If no inputs are connected the output is a constant 1.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

MULT Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Inputs
Name Data Type Description
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Product
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 193


Public Information
NaN Breaker (NAN_BREAKER)
Block Category: Diagnostics
The NaN Breaker (NAN_BREAKER) block passes all good input values to the output. If the input value is a NaN, it sets the
Boolean INP_IS_NAN to True and outputs the last good value. If there was no good last value, it outputs zero. This block
triggers a diagnostic message #356 if the input remains NaN for more than four consecutive frames.

Note This block supports the following block data types: Real and Long Real.

NaN_BREAKER Block

Note The diagnostic message is not displayed if the block is run in the Virtual Controller. The rest of the functionality is
supported.

Input
Name Data Type Description
INPUT REAL/LREAL Input signal to check for NaN

Outputs
Name Data Type Description
INP_IS_NAN BOOL True if input signal value is NaN
OUTPUT REAL/LREAL Equal to input if input is not NaN, otherwise it is last good value

State
Name Data Type Description
LGVALUE REAL/LREAL Last good input value (Default: 0)

194 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
NaN Check (NANCHECK)
Block Category: System
The NaN Check (NANCHECK) block is a test block used for diagnosis or detection of Not-A-Number (NaN) and infinity
values. The block receives a float or double as an input and counts the number of times a NaN or infinity value is detected.
Three output counters are provided to give a total number of Quiet NaNs, signaling NaNs, and Infinities detected in the input
variable.
The Enable and Reset inputs also serve as controls to the counting. If Enable is False, block counting is disabled. If Reset is
True, the counts are forced to zero. The block may be selected to one of the two types, REAL and LREAL.

NANCHECK Block

NANCHECK Block Expanded

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
RESET BOOL Block reset (Default: False); True resets the three counters
SRC REAL or LREAL Variable checked for NaNs

Outputs
Name Data Type Description
Q_NAN UDINT Number of Quiet NaNs detected after block reset
S_NAN UDINT Number of Signaling NaNs detected after block reset
INFIN UDINT Number of Infinities detected after block reset

Instruction Guide GEI-100682AK 195


Public Information
Negate (NEGATE)
Block Category: Math
The Negate (NEGATE) block multiplies the input by –1.

Note This is a variant block that supports any one of the following block data types: Integer, Double Integer, Real, Long
Real. The default data type is Real. Refer to the section Change Data Type of Variant Block.

NEGATE Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Input
Name Data Type Description
IN REAL, LREAL, INT, DINT† Input value
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT REAL, LREAL, INT, DINT† Negated input value
† Value with status, if status option is enabled.

196 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Not Equal (NE)
Block Category: Comparison
The Not Equal (NE) block compares the two input values (of any numeric data type) to determine if IN1 is not equal to IN2.
The result of the comparison is the output, OUT.

NE Block

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

Sensitivity refers to the tolerance band of the equality relationship. That is, IN1 is not equal to IN2 if it is numerically outside
the band defined by IN2 ± SENS.

Instruction Guide GEI-100682AK 197


Public Information
Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
SENS ANY_NUM The sensitivity value
HYST ANY_NUM The Hysteresis value

Output
Name Data Type Description
OUT BOOL The result of the comparison

198 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
On Off Delay (ON_OFF_DELAY)
Block Category: Timers and Counters
The On Off Delay (ON_OFF_DELAY) block behaves as a switch with a delayed response, whether being turned on or off.
The block passes a rising True value on the IN pin to the OUT pin if IN remains True for PU_DEL milliseconds. The block
passes a falling False value on the IN pin to the OUT pin if IN remains False for DO_DEL ms.

ON_OFF_DELAY Block Response

ON_OFF_DELAY Block

Inputs
Name Data Type Description
IN BOOL Boolean input signal
PU_DEL Unsigned double integer Pickup delay (ms)
DO_DEL Unsigned double integer Dropout delay (ms)

Output
Name Data Type Description
OUT BOOL Delayed filtered output

Instruction Guide GEI-100682AK 199


Public Information
Parity Check (PARITY_CHK)
Block Category: System
The Parity Check (PARITY_CHK) block checks for even or odd parity on input variable. It sets the ODD output to True if the
input long integer contains an odd number of logical 1 and sets the EVEN output to False.

PARITY_CHK Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
INPUT DINT Variable to check parity

Outputs
Name Data Type Description
ODD BOOL True if Odd Parity
EVEN BOOL True if Even Parity

200 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Prevote (PREVOTE)
Block Category: System
The Prevote (PREVOTE) block allows a user to transfer prevoted input values to blockware. The block prevotes any analog
variable into the block data type rounding any fractional value to the nearest integer (if block data type is INT) or into a
single/double precision floating point variable (if block data type is REAL). The boundary check and conversion is done
automatically.

Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, and Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.

PREVOTE Block

PREVOTE Block Expanded

Instruction Guide GEI-100682AK 201


Public Information
Prevote data is available from I/O Nets (R, S, Ta, Tb) marked with a 1 for the system configurations displayed in the
following table.

Mark VIe Prevote Buffer Usage


Redundancy Prevote Buffers
Controller Network I/O Pack R S ‘Ta Tb
Simplex Simplex Simplex 1 0 0 0
Simplex Simplex Dual Not supported
Simplex Simplex TMR Not supported
Simplex Dual Simplex Not supported
Simplex Dual Dual Not supported
Simplex Dual TMR Not supported
Simplex TMR Simplex † 1 0 0 0
Simplex TMR Dual †† 0 0 1 1
Simplex TMR TMR 1 1 1 0
Dual Simplex Simplex Not supported
Dual Simplex Dual Not supported
Dual Simplex TMR Not supported
Dual Dual Simplex † 1 0 0 0
Dual Dual Dual †† 0 0 1 1
Dual Dual TMR 1 1 1 1
Dual TMR Simplex Not supported
Dual TMR Dual Not supported
Dual TMR TMR Not supported
TMR Simplex Simplex Not supported
TMR Simplex Dual Not supported
TMR Simplex TMR Not supported
TMR Dual Simplex Not supported
TMR Dual Dual Not supported
TMR Dual TMR Not supported
TMR TMR Simplex † 1 0 0 0
TMR TMR Dual †† 0 0 1 1
TMR TMR TMR 1 1 1 0
† The I/O could be on any network.

†† The I/O is not limited to R and T. It could be R and T or S and T.

202 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Input
Name Data Type Description
VAR ANY Source variable

Outputs
Name Data Type Description
RHLT BOOL R prevote variable health
SHLT BOOL S prevote variable health
TAHLT BOOL TA prevote variable health
TBHLT BOOL TB prevote variable health
R ANY R prevote destination variable
S ANY S prevote destination variable
TA ANY TA prevote destination variable
TB ANY TB prevote destination variable

Instruction Guide GEI-100682AK 203


Public Information
Proportional Integral Derivative Control (PID)
Block Category: Controls (Basic)
The Proportional Integral Derivative Control (PID) block performs proportional, integral and derivative control on the set
point, measured value feedback, and a derivative source. It provides a smooth transition between operating modes using an
internal lockon sequence.
The LOCKON[ ] array may contain up to 32 elements, each of which must be initialized with one of three modes indicating a
lockon function: LOCKON (O), LOCKON (1), or LOCKON (2)

Note If the integral gain is set to zero (0), do not attempt to use LOCKON mode (0).

The MODE pin selects a process mode (external to the _PID block) that requires the block to perform one of the three types
of lockon functions. Using the MODE as the index into LOCKON[ ] array accomplishes the binding. When the block detects
a mode change it performs the corresponding lockon function during that sweep. Clamp MODE to within the size of the
LOCKON array.
If LOCKON[MODE] = NO_LOCKON, or If LOCKON[MODE] is undefined:

• Calculate PID correction


• Route correction variable to OUT (F = 0)
• Ignore any mode changes
If LOCKON[MODE] = LOCKON and the mode changes:

• Set all derivative states equal to DSRC


• Set integral state with OUT(t-1) - (A + B + OFFSET)
• Update state variable for (KI * (CTL_VAR -SETPT))
Calculate PID correction: Route correction variable to OUT (F = 0)
IF LOCKON[MODE] = PASSTHRU:

• Set all integral and derivative states to zero


• Route SETP to OUT (F = 1)
• Ignore any mode changes
• ERROR = 0

204 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
The integration is calculated using a bilinear transformation for the trapezoidal rule:

• 1/s = (T/2) x (Z+1)/(Z-1)


• y(t) = (T/2) x [x(t) + x(t-1)] + y(t-1)
If OUT is in one of the clamps the integrator state is not allowed to wind up. The derivative is calculated using the three-point
formula:

• s = (3Z^^2 - 4Z + 1) / (Z^^2 x 2T)


• y'(t) = [3y(t) - 4y(t-1) + y(t-2)] / 2T

PID Block Functional Diagram

Instruction Guide GEI-100682AK 205


Public Information
PID Block

Inputs
Name Data Type Description
CTL_VAR REAL Controlled variable (primary feedback)
SETPT REAL Setpoint (primary reference)
KP REAL Proportional gain
D_ACT BOOL Direct acting switch. (Default: False) If False then KP' = -KP, else KP' = KP.
KI REAL Integral gain
KD REAL Derivative gain
DSRC REAL Derivative source
OFFSET REAL Offset modifier
LOCKON [32] UINT Lockon control array (32 elements maximum) of lockon codes corresponding to each mode
MODE UINT Operating mode, used as an index into the LOCKON[ ] array
MAXOUT REAL Maximum output clamp limit
MINOUT REAL Minimum output clamp limit

Outputs
Name Data Type Description
ERROR REAL Error; if mode is PASSTHRU then ERROR is 0, otherwise ERROR is CTL_VAR - SETPT
OUT REAL PID Output Correction
LALM BOOL Set to True if OUT is ≤ MINOUT, else set to False
HALM BOOL Set to True if OUT is ≥ MAXOUT, else set to False
MSTATE UINT Mode state - stores the previous operating mode (no user input required)
KIPROP1 LREAL Double precision KI x prop (t-1) (no user input required)
INTEG1 LREAL Double precision INTEG (t-1) (no user input required)
S_DSRC1 LREAL Double precision DSRC (t-1) (no user input required)
S_DSRC2 LREAL Double precision DSRC (t-2) (no user input required)
S_OUT1 LREAL Double precision OUT (t-1) (no user input required)

206 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Pulse (PULSE)
Block Category: Sequencing
The Pulse (PULSE) block generates a Boolean one-shot of the specified width (WIDTH in milliseconds) at the output pin on
the rising edge of the trigger. Once the pulse is initiated, it persists until it times out regardless of the value of the trigger. The
previous state of the trigger is stored with each performance sweep so the falling edge of the next trigger may be seen prior to
the end of the pulse. A specified pulse width of 0 results in a one sweep pulse. The pulse width is always a multiple of the
frame performance period set in the ToolboxST application. For accurate performance of the block, set WIDTH as a multiple
of the frame performance period.

PULSE Block

Inputs
Name Data Type Description
TRIG BOOL Triggers a new pulse on its rising edge
WIDTH UDINT Period of the pulse in milliseconds. (Default: 0) (1 sweep)

Output
Name Data Type Description
OUT BOOL Pulse output

State
Name Data Type Description
CWIDTH UDINT Elapsed time since the pulse began in milliseconds
This is the state pin for storing the trigger status of the block, a hidden pin,
It can be viewed or changed by right-clicking the block and selecting Edit
ISTRIGGERED BOOL
Block Pins. Writing to this variable is not recommended, but can be used to
preset block states.

Instruction Guide GEI-100682AK 207


Public Information
Pulse Extended (PULSE_EXT)
Block Category: Sequencing
The Pulse Extended (PULSE_EXT) block generates a Boolean pulse at OUT of the specified duration, WIDTH (ms). If TRIG
transitions from False to True, then OUT transitions to True and remains True until the time specified by WIDTH has elapsed
since the last rising edge of TRIG. A specified pulse width of 0 will result in a one sweep pulse. The pulse width is always a
multiple of the frame performance period set in the ToolboxST application. For accurate performance of the block, set
WIDTH as a multiple of the frame performance period.

PULSE_EXT Block Functional Diagram

PULSE_EXT Block

Inputs
Name Data Type Description
TRIG BOOL Triggers pulse timer on its rising edge
WIDTH Unsigned double integer Pulse width in milliseconds

Output
Name Data Type Description
OUT BOOL Pulse output

State
Name Data Type Description
CWIDTH Unsigned double integer Elapsed time since rising edge of TRIG in milliseconds

208 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Pushbutton (P_B)
Block Category: System
The Pushbutton (P_B) block is normally used to accept Boolean commands from the Human-machine Interface (HMI). When
the input is False, the output is False. When the input is True, the output becomes True and after a duration specified by
WIDTH, the block sets IN and OUT to False. WIDTH defaults to 1000 ms.

P_B Block Functional Diagram

P_B Block

Inputs
Name Data Type Description
IN BOOL Push-button input
WIDTH Unsigned double integer Push-button pulse width (ms)

Output
Name Data Type Description
OUT BOOL Push-button output

Instruction Guide GEI-100682AK 209


Public Information
Put Into Array (PUT)
Block Category: Array
The Put Into Array (PUT) block moves a value from a variable into an array element of the same data type. A block exists for
each of the analog data types and is identified by its suffix. The data transfer occurs each time the block performs and the
ENABLE pin is True. The array index N is interpreted as an unsigned long integer. If N is out of range, the block transfers
into the last element of the array.

Note This block is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.

PUT Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC ANY Source variable
N UDINT Destination array index (0 based, interpreted internally as unsigned)

Output
Name Data Type Description
DEST[ ] ANY Destination array

210 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Rate Limiter (RATELIM)
Block Category: Controls (Basic)
The Rate Limiter (RATELIM) block behaves as a rate limiter. OUT equals IN if the rate of change of the input, RATE_IN,
does not exceed RATE_INC or RATE_DEC. The rate of change of OUT is limited when RATE_IN exceeds RATE_INC or
RATE_DEC. In this case, RATE_LIM is True. When HOLD is set to True, OUT maintains current value. When PASS is set
to True, OUT equals IN (no rate limiting). PASS takes precedence over HOLD. When PRESET is set to True, OUT equals
PR_VAL (no rate limiting). PRESET takes precedence over PASS and HOLD. RATE_IN is calculated for all cases.

RATELIM Block Functional Diagram

RATELIM Block

Instruction Guide GEI-100682AK 211


Public Information
This block propagates quality status if the status operations are enabled.
Block status modifications:

• RATE_IN status is propagated from IN status.


• OUT and RATE_OUT status are propagated from either IN status or PR_VAL status, whichever is active. The statuses of
OUT and RATE_OUT are modified to include HIGH_LIMITED or LOW_LIMITED when applicable. For example:
IF PRESET is False and IN status = NOT_LIMITED-GOODNC [128]
And
RATE_IN > RATE_INC, then OUT status = HIGH_LIMITED-GOODNC [130]
Or
ABS(RATE_IN) > ABS(RATE_DEC), then OUT status = LOW_LIMITED-GOODNC [129]
Or
RATE_IN < RATE_INC AND ABS (RATE_IN) < ABS(RATE_DEC),
then OUT status = NOT_LIMITED-GOODNC [128]

Refer to the section Types of Status Blocks.

Inputs
Name Data Type Description
IN REAL† Input variable
RATE_INC REAL Rate of increase limit (units/sec)
RATE_DEC REAL Absolute rate of decrease limit (units/sec)
PR_VAL REAL† Preset value
PRESET BOOL Initializes output to preset value
PASS BOOL Passes input to output without limiting
HOLD BOOL Holds output to current value when True
†Value with Status, if status option is enabled.

Outputs
Name Data Type Description
RATE_OUT REAL† Rate of change after limit (units/sec)
RATE_IN REAL† Rate of change before limit (units/sec)
OUT REAL† Rate limited output
RATE_LIM BOOL Output rate limiting occurring
† Value with Status, if status option is enabled.

212 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Rate Monitor (RATEMON)
Block Category: Controls (Basic)
The Rate Monitor (RATEMON) block monitors the rate of change of IN and sets a flag when a specified rate is exceeded. The
RATE variable on the output is calculated based on the change in units per seconds of the input variable IN. OUT is simply a
pass through variable which contains the same value as the input, IN. When RATE is greater than 0 and RATE exceeds
RATE_INC, then RATE_INC_HI is True. When RATE is less than 0 and absolute value of RATE exceeds RATE_DEC, then
RATE_DEC_HI is True.
Additionally, this block uses hysteresis, HYST, which is applied to RATE_INC and RATE_DEC.
Example with IN = Sine function (RATE = Cosine function) :
RATE_INC = 0.6
RATE_DEC = 0.4
HYST = 0.2

RATEMON Block Functional Diagram

RATEMON Block

Instruction Guide GEI-100682AK 213


Public Information
This block propagates quality status if the status operations are enabled.
Refer to the Status Monitoring (STATUS_MONITORING) block.

Inputs
Name Data Type Description
IN REAL† Input variable
RATE_INC REAL Absolute rate of change increase setpoint (units/sec)
RATE_DEC REAL Absolute rate of change decrease setpoint (units/sec)
HYST REAL Hysteresis
† Value with Status, if status option is enabled.

Outputs
Name Data Type Description
RATE REAL† Rate of change of input (units/sec)
OUT REAL† Pass through output
RATE_INC_HI BOOL Increase rate of change HIGH flag
RATE_DEC_HI BOOL Decrease rate of change LOW flag
† Value with Status, if status option is enabled.

214 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Relay Ladder Logic (RUNG)
Block Category: Boolean Operations
The Relay Ladder Logic (RUNG) block solves a Boolean equation of up to 16 inputs. The equation is specified as a character
string or can it be configured through the Relay Ladder Logic editor in the ToolboxST application. The equation may consist
of up to 128 elements, or combinations of operators and operands. For example, the equation A + B contains two operands
and one operator for a total of three elements.

RUNG Block Functional Diagram

RUNG Block

Note Annunciation of Loss of IONet for Mark VIe I/O Packs, Annunciation of TMR Controller Heartbeat Status Not OK,
and Selection of Setpoint based on Boolean Logic are logic examples using the RUNG block.

Supported Operators
Operation Operator
Parenthesis ()
NOT ~
OR +
AND *

Inputs
Name Data Type Description
EQN Constant String Boolean equation
A BOOL Required Boolean input used in equation
↓ ↓ ↓
P BOOL Boolean input used in the equation

Output
Name Data Type Description
OUT BOOL The result of the equation

Instruction Guide GEI-100682AK 215


Public Information
Rotary Switch (ROTARY_SW)
Block Category: Boolean Operations
The Rotary Switch (ROTARY_SW) block uses the value of an unsigned integer input, IN, to select one of N Boolean outputs.
This is a rubber block that provides up to 32 outputs. The selected output is driven True while all other outputs are driven
False. An input value of 1 for IN selects the first output, OUT1, and an input value of N selects the last output, OUT(N). If
the integer input contains a value that is not within the range of 1 to N then all outputs are driven False.

ROTARY_SW Block

Input
Name Data Type Description
IN UINT Selects which Boolean output will be True

Outputs
Name Data Type Description
OUT1 BOOL Contains the results of the selection process
↓ ↓ ↓
OUT32 BOOL Contains the results of the selection process

216 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Round (ROUND)
Block Category: Math
The Round (ROUND) block rounds an input value to the nearest rational number. The input PREC specifies the precision that
the number will be rounded. The result is sent to the output OUT.
For example, if :
IN = 2.3
PREC = 0
OUT = 2.00000000

IN = 2.55
PREC = 1
OUT = 2.60000000

IN = 5.007
PREC = 2
OUT = 5.01000000

IN = -14.5
PREC = 0
OUT = -15
IN = 14.5
PREC = 0
OUT = 15

ROUND Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Inputs
Name Data Type Description
IN REAL† Input variable
PREC UINT Input rounding precision
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT REAL† Rounded output
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 217


Public Information
Select (SELECT)
Block Category: Selection
The Select (SELECT) block is an expandable block that moves one of the 32 inputs in a Mark VIe control system, one of the
8 inputs in a Mark VIeS Safety control system, or the CASC into the output, based on the prioritized evaluation of the
selection pins. Working in ascending order from SEL1 the first True value encountered causes the corresponding input to be
moved to the output. If none of the selection pins are True then the CASC is moved to the output.

Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.

SELECT Block

Note Selection of Setpoint based on Boolean Logic is a logic example using the SELECT block.

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Floating Point Exception Handling


If a NaN (Not a Number) is encountered on an input pin it is replaced at the output by either the most positive or negative
representable number, based on the sign of the NaN.

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
CASC ANY† Default (cascade) selection
IN1 ANY† First input variable
SEL1 BOOL First selection input
↓ ↓ ↓
INn ANY† N'th input variable
SELn BOOL N'th selection input
† Value with Status (Value only for Boolean block type), if status option is enabled.

Output
Name Data Type Description
OUT ANY† Selected output
† Value with Status (Value only for Boolean block type), if status option is enabled.

218 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Selector (SELECTOR)
Block Category: Selection
The Selector (SELECTOR) block is an expandable block that moves up to 16 inputs, INAxx and INBxx, depending on the
Boolean inputs SELA and SELB into OUTxx. This is based on the prioritized evaluation of the selection pins.
If SELA is True then OUTxx = INAxx
If SELB is True then OUTxx = INBxx
When both SELA and SELB are True, SELA takes the priority.
When both SELA and SELB are False, OUTxx= CASC.

Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is BOOL. Refer to the section Change Data
Type of Variant Block.

SELECTOR Block

This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.

Instruction Guide GEI-100682AK 219


Public Information
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
CASC ANY† Cascade input
SELA BOOL When True Select Input Set A
SELB BOOL When True select Input Set B
INA1 ANY† Input 1 Set A
INB1 ANY† Input 1 Set B
INA2 ANY† Input 2 Set A
INB2 ANY† Input 2 Set B
↓ ↓ ↓
INA16 ANY† Input 16 Set A
INB16 ANY† Input 16 Set B
† Value with Status (Value only for Boolean block type), if status option is enabled.

Outputs
Name Data Type Description
OUT1 ANY† Output 1
OUT2 ANY† Output 2
↓ ↓ ↓
Out16 ANY† Output 16
† Value with Status (Value only for Boolean block type), if status option is enabled.

220 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Sequence Branch Block - TMR (SBB)
Block Category: Sequencing
The Sequence Branch Block - TMR (SBB) is a rubber block that supports up to eight branches. The Branch block is used to
create up to eight branches from a single Sequence Step Block (SSB) step. The block can be configured to activate all
branches, or just one. The Sequence Merge Block (SMB ) block is used to bring the branches back into the main line of a
sequence.
When the SBB (Branch) block is configured to perform all branches (BR_ALL is True), then all SSB's that are attached to the
NEXTx[ ] outputs will be started when the upstream SSB (the SSB connected to the START[2] pin of the SBB block)
transitions. This allows a sequence to perform multiple branches in parallel. The branch inputs 1 through 8 (BRANCHx) are
ignored when the SBB block is configured to branch all.
When the SBB block is configured to perform selective branching, then only one branch will be selected when the upstream
SSB transitions. The first branch input (BRANCHx) to go high determines which branch is selected. If more than one branch
input is high at the same time, then the lower numbered branch is selected. Only one branch is ever selected when the branch
type (BR_ALL) is False. Normally, the ACTIVE and ON outputs of the SBB block will only be on for a few scans of the
task.

Note Do not connect more then one sequence block to one NEXTx output of the SBB branch block. If a branch is enabled
by setting the BRANCHx input to True, but there is nothing connected to the corresponding NEXTx output, then the sequence
will freeze when the SBB branch block becomes active.

SBB Block

Instruction Guide GEI-100682AK 221


Public Information
Inputs
Name Data Type Description
START[2] BOOL Connection pin – from the NEXT pin of an SSB block
BR_ALL BOOL If True branch all. If False selective branch
RESET BOOL Reset the Branch block
BRANCH1 BOOL Transition condition for branch 1
↓ ↓ ↓
BRANCH8 BOOL Transition condition for branch 8

Outputs
Name Data Type Description
ACTIVE BOOL If True the branch is active
ON BOOL If True the branch is active and transitioning
GSTAT[7] BOOL Global input and output connection to SMGR block
NEXT1[2] BOOL Next output for branch 1
↓ ↓ ↓
NEXT8[2] BOOL Next output for branch 8

222 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Sequence Manager Block - TMR (SMGR)
Block Category: Sequencing
The Sequence Manager Block - TMR (SMGR) block collects global status information from all of the Sequential Step blocks
(SSBs) in a sequence and distributes global inputs to each of these blocks. The block must be in the same task as all the SSB's
in the sequence, and it must be at the beginning or the end of the task for the status outputs to show accurate sequence
information. Each SSB (and SMB and SBB block) in a sequence should have the same variable attached to their GSTAT
output pin.
The SMGR block is used to show the status of a whole sequence. If any SSB in the sequence is active, then the ACTIVE
output of the SMGR will be True. The same applies to the ON and FAULT outputs. Note that for sequences which have
multiple branches that can run at the same time, all three outputs may be True (one branch running, and another faulted). The
four Boolean inputs are used as global inputs for every Sequence block attached to the GSTAT variable. For instance, when
the RESET input goes high, all SSB's (and SBB and SMB blocks) in the sequence will reset, just as if their own reset inputs
had been set to True.
Each Bit of GSTAT[ ] represents the following global input/output as follows:
GSTAT[0] : Global On output
GSTAT[1] : Global Active output
GSTAT[2] : Global Fault output
GSTAT[3] : Global Reset' input
GSTAT[4] : Global Hold input
GSTAT[5] : Global SSMODE input
GSTAT[6] : Global SSTRIG input

SMGR Block

Instruction Guide GEI-100682AK 223


Public Information
Inputs
Name Data Type Description
START[2] BOOL Use this input to re-start the sequence from another SSB
RESET BOOL Global reset input to all SFBs
HOLD BOOL Global hold input to all SFBs
SSMODE BOOL Global single-step mode
SSTRIG BOOL Global single-step trigger (edge sensitive)
START1ST BOOL Use this input to start the sequence for the first time
END[2] BOOL Use this input to end the sequence from another SSB
GSTAT[7] BOOL Global input and output connection on the sequence manager

Outputs
Name Data Type Description
ACTIVE BOOL Sequence is active status output
ON BOOL ON status output
NEXT[2] BOOL Output to connect to the START[2] of the next SSB
FAULT BOOL Sequence is faulted status output

224 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Sequence Merge Block - TMR (SMB)
Block Category: Sequencing
The Sequence Merge Block - TMR (SMB) block is used to merge up to eight branches into a single Sequence Step Block
(SSB) step. The block can be configured to merge all branches or just one. The Branch block is used to create the branches.
When the SMB block is configured to perform a selective merge (MR_ALL is False), then the first branch (an SSB connected
to a MERGEx[2] input) to request a transition will cause the MERGE block to start the SSB attached to the OUT pin. A
selective merge is normally used to merge branches which are controlled by a 'selective' branch block. The DONEFB input is
ignored when a selective merge is being performed.
Setting the MR_ALL to True configures the SMB block to merge all branches. Under this configuration, the SMB block waits
until all defined branches (MERGEx[2] inputs) have requested a transition before it starts the SSB attached to the NEXT[2]
pin. The first branch (MERGEx[2] input) to request a transition will start a timer in the SMB block. If all branches do not
merge within the time specified by the MTIME input, then the SMB block will fault. Note that if MTIME is set to -1, then the
SMB block will never timeout. The RESET input will clear the SMB block.
For the merge all configuration, the DONEFB input must be True before any SFB attached to the STARTx[2] inputs will
attempt for transition. For selective merging, the DONEFB input is ignored. The ACTIVE pin indicates that the MERGE
block is in the process of accepting a hand-off (s) from the previous SSB(s) and transitioning to the next SSB. This output will
go high as soon as the SMB block detects a request to transition through it's MERGEx[2] pin and will stay high until the
SSB's tied to the NEXT[2] pin has accepted the transition. The ON output will follow the ACTIVE output, but will not come
on until all the start requests have been accepted. It will go out as soon as the merge block starts a transition through the
NEXT[2] output.
Each Bit of GSTAT[ ] represents the following global input/output
GSTAT[0] : Global 'On' output
GSTAT[1] : Global 'Active' output
GSTAT[2] : Global 'Fault' output
GSTAT[3] : Global 'Reset' input
GSTAT[4] : Global 'Hold' input
GSTAT[5] : Global 'SSMODE' input
GSTAT[6] : Global 'SSTRIG' input

SMB Block

Instruction Guide GEI-100682AK 225


Public Information
Inputs
Name Data Type Description
DONEFB BOOL Transition condition for merge all
MR_ALL BOOL If True merge all. If False selective merge
MTIME UDINT Merge time input in milliseconds
RESET BOOL If True reset the merge block (from any state)
HOLD BOOL Places SMB into hold mode
SSMODE BOOL Single step mode (semi automatic mode)
SSTRIG BOOL Single step trigger (edge sensitive)
MERGE1[2] BOOL Start input for merge 1
↓ ↓ ↓
MERGE8[2] BOOL Start input for merge 8

Outputs
Name Data Type Description
NEXT[2] BOOL Next output to the start input of an SSB
ACTIVE BOOL If True the merge is active
ON BOOL If True the merge is active and transitioning
FAULT BOOL If True a fault has occurred
RTIME UDINT Remaining feedback time in seconds

States
Name Data Type Description
CTIME UDINT Current merge time in milliseconds
GSTAT[7] BOOL Global input and output connection to SMGR block

226 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Sequence Step Block - TMR (SSB)
Block Category: Sequencing
The Sequence Step Block - TMR (SSB) block creates a step in an automatic sequence. A sequence consists of a number of
SSB blocks wired together with branch (SBB) and merge (SMB) blocks. The active or on outputs are used to indicate that a
step is active.
Each SSB represents a step in a sequence. The SSB's are tied together to form a sequence by wiring the NEXT[ ] output pin of
the present block to the START [ ] input pin of the next block. The DONEFB input is used to transition the SSB to the next
step. The ACTIVE output of the SSB indicates when the step is active while the ON output indicates active with a successful
transition from the previous step. The ACTIVE or ON outputs are used to trigger the actions that are required for a future
step.
The first step of a sequence is started by using the STRT1ST Boolean output of the Sequence Manager block (SMGR) with
the Sequence managers NEXT[2] pin connected to the (SSB) START[2] pin. Some inputs can be considered to be global to
the auto-sequence. Specific pins of an SSB can be made global by assigning the same variable to like pins of each SSB in the
auto-sequence, and the same variable can be connected to the GSTAT[ ] pin of each SSB.
When using the GSTAT[1] no variable assignments are necessary for the inputs that are controlled by the SMGR block. The
inputs which are global are: HOLD, RESET, SSMODE, and SSTRIG. The HOLD input of an SSB is used to stop the
FBTIME so that a timeout condition will not occur.
An important feature of the SSB is single step mode (SSMODE) , which is implemented by using the SSMODE and SSTRIG
inputs. These inputs are global and so can be set through the SMGR for whole sequence. When SSMODE input is True, then
the SSB waits for the SSTRIG input before it sets its ON output. While waiting for the SSTRIG, the active output Boolean
(ACTIVE) will be True. Even if the DONEFB is True, the step will not transition to the next step unless the SSTRIG is False.
The SSTRIG must go high, then low.

Note The SSMODE can be used to implement a semi-auto mode for a sequence.

The PASSTHR input controls how the SSB behaves if the DONEFB is True when the SSB is started. If PASSTHRU is True,
then only the ACTIVE output becomes True while the SSB transitions to the next step. If PASSTHR is False, then both the
ACTIVE and the ON outputs become True while the SSB transitions to the next step. The only way the SSB can fault is if the
DONEFB does not come True within the time specified in the FBTIME input (a value of zero or less means that the SSB will
never time out). If the SSB times out before the DONEFB becomes True, the FAULT output will go high. If the DONEFB
becomes True, the fault will clear automatically and the sequence will continue.

Instruction Guide GEI-100682AK 227


Public Information
Each Bit of GSTAT[ ] represents the following global input/output:
GSTAT[0] : Global 'On' output
GSTAT[1] : Global 'Active' output
GSTAT[2] : Global 'Fault' output
GSTAT[3] : Global 'Reset' input
GSTAT[4] : Global 'Hold' input
GSTAT[5] : Global 'SSMODE' input
GSTAT[6] : Global 'SSTRIG' input

SSB Block

Inputs
Name Data Type Description
START[2] BOOL Starts the SSB. Connect from NEXT output of another step
DONEFB BOOL Done feedback input. Causes a transition to the next step
FBTIME UDINT Feedback input time in milliseconds
FORCEFB BOOL Forces the done feedback to True
HOLD BOOL Global hold input to all the SFBs
SSMODE BOOL Single step mode (semi automatic mode)
SSTRIG BOOL Single step trigger (edge sensitive)
RESET BOOL Resets the SSB from any state
PASSTHR Constant BOOL When started just go to the next step if the done feedback is True

228 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Outputs
Name Data Type Description
ACTIVE BOOL Indicates the SSB is active
ON BOOL Indicates the SSB is active and on
NEXT[2] BOOL Pin to connect to next SSB, SBB, or SMB block
FAULT BOOL Fault status output
RTIME UDINT Remaining feedback time in seconds

States
Name Data Type Description
CTIME UDINT Current feedback time in milliseconds
GSTAT[7] BOOL Global input and output connection to SMGR block

Instruction Guide GEI-100682AK 229


Public Information
Set Array (SETARRY)
Block Category: Array
The Set Array (SETARRY) block fills the destination array with the value set at the input.

Note This block is a variant block that supports any one the following block data types: BOOL, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.

SETARRY Block

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
SET ANY Set value

Output
Name Data Type Description
DEST[ ] ANY Destination array

230 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Square Root (SQRT)
Block Category: Math
The Square Root (SQRT) block performs the square root function on the absolute value of the input.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

SQRT Block

This block propagates quality status if the status operations are enabled.

Block Status Modification: If the input is negative, the output will be the square root of the absolute value of the input and the
output status will be NOT_LIMITED- CONFIGURATION_ERROR-BAD [4].

Refer to the Status Monitoring (STATUS_MONITORING) block.

Input
Name Data Type Description
IN ANY_NUM† Input value
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Square root of the input value
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 231


Public Information
Status Combine (STATUS_COMBINE)
Block Category: System
The Status Combine (STATUS_COMBINE) block applies the value of IN_S as the quality status for the input IN. The output
of the block is the value of IN with status. IN can either be value only or value with status. If IN is value with status, then the
status of IN is replaced by the value of IN_S. The valid values for the IN_S are listed in the following table. Using an invalid
value for IN_S results as the status of OUT being NOT_ LIMITED – BAD [0].

Note This block is a variant block, which supports any one of the following block data types: Integer, Double Integer, Real,
Long Real, Unsigned Integer, and Unsigned Double Integer. The data type of the OUT pin must match the selected block data
type. Status functionality is always enabled for this block. Refer to the section Change Data Type of Variant Block.

STATUS_COMBINE Block

This block propagates status. Refer to the Status Monitoring (STATUS_MONITORING) block.

232 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Valid Values for IN_S (Bad Status Region)
BAD STATUS REGION Integer
NOT_LIMITED-BAD 0
LOW_LIMITED-BAD 1
HIGH_LIMITED-BAD 2
CONSTANT-BAD 3
NOT_LIMITED-CONFIGURATION_ERROR-BAD 4
LOW_LIMITED-CONFIGURATION_ERROR-BAD 5
HIGH_LIMITED-CONFIGURATION_ERROR-BAD 6
CONSTANT-CONFIGURATION_ERROR-BAD 7
NOT_LIMITED-NOT_CONNECTED-BAD 8
LOW_LIMITED-NOT_CONNECTED-BAD 9
HIGH_LIMITED-NOT_CONNECTED-BAD 10
CONSTANT-NOT_CONNECTED-BAD 11
NOT_LIMITED-DEVICE_FAILURE-BAD 12
LOW_LIMITED-DEVICE_FAILURE-BAD 13
HIGH_LIMITED-DEVICE_FAILURE-BAD 14
CONSTANT-DEVICE_FAILURE-BAD 15
NOT_LIMITED-SENSOR_FAILURE-BAD 16
LOW_LIMITED-SENSOR_FAILURE-BAD 17
HIGH_LIMITED-SENSOR_FAILURE-BAD 18
CONSTANT-SENSOR_FAILURE-BAD 19
NOT_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 20
LOW_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 21
HIGH_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 22
CONSTANT-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 23
NOT_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 24
LOW_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 25
HIGH_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 26
CONSTANT-NO_COMM_WITH_NO_USABLE_VALUE-BAD 27
NOT_LIMITED-OUT_OF_SERVICE-BAD 28
LOW_LIMITED-OUT_OF_SERVICE-BAD 29
HIGH_LIMITED-OUT_OF_SERVICE-BAD 30
CONSTANT-OUT_OF_SERVICE-BAD 31

Instruction Guide GEI-100682AK 233


Public Information
Valid Values for IN_S (Uncertain Status Region)
UNCERTAIN STATUS REGION Integer
NOT_LIMITED-UNCERTAIN 64
LOW_LIMITED-UNCERTAIN 65
HIGH_LIMITED-UNCERTAIN 66
CONSTANT-UNCERTAIN 67
NOT_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 68
LOW_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 69
HIGH_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 70
CONSTANT-LAST_USABLE_VALUE-UNCERTAIN 71
NOT_LIMITED-SUBSTITUTE-UNCERTAIN 72
LOW_LIMITED-SUBSTITUTE-UNCERTAIN 73
HIGH_LIMITED-SUBSTITUTE-UNCERTAIN 74
CONSTANT-SUBSTITUTE-UNCERTAIN 75
NOT_LIMITED-INITIAL_VALUE-UNCERTAIN 76
LOW_LIMITED-INITIAL_VALUE-UNCERTAIN 77
HIGH_LIMITED-INITIAL_VALUE-UNCERTAIN 78
CONSTANT-INITIAL_VALUE-UNCERTAIN 79
NOT_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 80
LOW_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 81
HIGH_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 82
CONSTANT-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 83
NOT_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 84
LOW_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 85
HIGH_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 86
CONSTANT-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 87
NOT_LIMITED-SUBNORMAL-UNCERTAIN 88
LOW_LIMITED-SUBNORMAL-UNCERTAIN 89
HIGH_LIMITED-SUBNORMAL-UNCERTAIN 90
CONSTANT-SUBNORMAL-UNCERTAIN 91

234 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Valid Values for IN_S (Good Non Cascade Status Region)
GOOD NON CASCADE STATUS REGION Integer
NOT_LIMITED-GOODNC 128
LOW_LIMITED-GOODNC 129
HIGH_LIMITED-GOODNC 130
CONSTANT-GOODNC 131
NOT_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 132
LOW_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 133
HIGH_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 134
CONSTANT-ACTIVE_BLOCK_ALARM-GOODNC 135
NOT_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 136
LOW_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 137
HIGH_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 138
CONSTANT-ACTIVE_ADVISORY_ALARM-GOODNC 139
NOT_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 140
LOW_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 141
HIGH_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 142
CONSTANT-ACTIVE_CRITICAL_ALARM-GOODNC 143
NOT_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 144
LOW_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 145
HIGH_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 146
CONSTANT-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 147
NOT_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 148
LOW_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 149
HIGH_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 150
CONSTANT-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 151
NOT_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 152
LOW_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 153
HIGH_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 154
CONSTANT-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 155

Instruction Guide GEI-100682AK 235


Public Information
Valid Values for IN_S (Good Cascade Status Region)
GOOD CASCADE STATUS REGION Integer
NOT_LIMITED-GOODC 192
LOW_LIMITED-GOODC 193
HIGH_LIMITED-GOODC 194
CONSTANT-GOODC 195
NOT_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 196
LOW_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 197
HIGH_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 198
CONSTANT-INITIALIZATION_ACKNOWLEDGE-GOODC 199
NOT_LIMITED-INITIALIZATION_REQUEST-GOODC 200
LOW_LIMITED-INITIALIZATION_REQUEST-GOODC 201
HIGH_LIMITED-INITIALIZATION_REQUEST-GOODC 202
CONSTANT-INITIALIZATION_REQUEST-GOODC 203
NOT_LIMITED-NOT_INVITED-GOODC 204
LOW_LIMITED-NOT_INVITED-GOODC 205
HIGH_LIMITED-NOT_INVITED-GOODC 206
CONSTANT-NOT_INVITED-GOODC 207
NOT_LIMITED-NOT_SELECTED-GOODC 208
LOW_LIMITED-NOT_SELECTED-GOODC 209
HIGH_LIMITED-NOT_SELECTED-GOODC 210
CONSTANT-NOT_SELECTED-GOODC 211
NOT_LIMITED-LOCAL_OVERRIDE-GOODC 216
LOW_LIMITED-LOCAL_OVERRIDE-GOODC 217
HIGH_LIMITED-LOCAL_OVERRIDE-GOODC 218
CONSTANT-LOCAL_OVERRIDE-GOODC 219
NOT_LIMITED-FAULT_STATE_ACTIVE-GOODC 220
LOW_LIMITED-FAULT_STATE_ACTIVE-GOODC 221
HIGH_LIMITED-FAULT_STATE_ACTIVE-GOODC 222
CONSTANT-FAULT_STATE_ACTIVE-GOODC 223
NOT_LIMITED-INITIATE_FAULT_STATE-GOODC 224
LOW_LIMITED-INITIATE_FAULT_STATE-GOODC 225
HIGH_LIMITED-INITIATE_FAULT_STATE-GOODC 226
CONSTANT-INITIATE_FAULT_STATE-GOODC 227

Inputs
Name Data Type Description Default
IN_S UINT Input status 128
IN ANY_NUM Input value 0

Output
Name Data Type Description Default
OUT ANY_NUM Output value with status N/A

236 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Status Monitoring
This section describes the use of blocks that can support status operations. Software blocks are interconnected by variables
assigned to pins. Blocks that support status operations will have some pins for which there is a status in addition to a value.
Function blocks monitor status inputs for three reasons:
1. To propagate input status to output status based on priority
2. To perform block actions or calculations based on input status
3. To alter output status based on block limitations or functions

Status Block Types


The following are three divisions within the value with status function blocks, which determine how they react to status:

• Single Input/Single Output blocks (such as ABS) take a single input and produce a single output.
• Selection blocks (such as SELECT, MIN_MAX) produce one output from a selection of multiple inputs. The output
status is propagated based on the selected input variable.
• Relational blocks (such as ADD, MULT, SUB) use multiple inputs to produce an output.
These blocks change status based on equation boundary conditions or when the output value exceeds the data type range as
specified for that specific block. The standard status is represented as: (Limit_Status)-(Sub_Status)-(Status_Region) (for
example, NOT_LIMITED-DEVICE_FAILURE-BAD).

Note The priority of the output status calculation is listed in the table Output Status Calculation Hierarchy.

Instruction Guide GEI-100682AK 237


Public Information
Status_Region
There are four status regions: BAD, UNCERTAIN, GOOD(CASCADE), and GOOD(NON-CASCADE). The propagation
priority of the regions, and the quality of the parameter value are:
1. BAD (0 ≤ Enumeration ≤ 31): The value is not useful.
2. GOOD(C) (192 ≤ Enumeration ≤ 227): The value quality is good, and may be part of a cascade structure.
3. UNCERTAIN (64 ≤ Enumeration ≤ 91): The value quality is less than normal, but the value may still be useful.
4. GOOD(NC) (128 ≤ Enumeration ≤ 155): The value quality is good, and the block does not support a cascade path.

Note For a complete list of status regions, refer to the section Status Tables.

The output status region is based on the inputs. It cannot be improved, but can be degraded based on the propagation priority.
For example, a block with three inputs and one output has input variables in the status regions of BAD, UNCERTAIN, and
GOOD(NC). The output would reflect the input with the lowest propagation priority and therefore have an output status of
BAD. This applies for all three function block divisions for input variables used in the calculation of the output.

Note Additional information on cascade structures is available from the FOUNDATION FieldbusTM organization.

Sub_Status
There are many different sub statuses (such as DEVICE_FAILURE and SUBSTITUTE), which are used to provide more
specific information. The sub-status is propagated to the output based on the following rules:
1. For Relational blocks, sub-status is not propagated when two or more measurements are combined. The resulting
sub-status will be designated as non-specific.
2. For Single Input/Single Output and Selection blocks:

• BAD Region - Only Device Failure (Status Enumeration Values: 12 – 15) or Sensor Failure (Status Enumeration
Values: 16 – 19) BAD quality Sub-Status are propagated. All others are propagated as non-specific (Status
Enumeration Values: 0 – 3)
• UNCERTAIN Region - No Sub-status Propagated, all are propagated as non-specific (Status Enumeration Values: 64
– 67)
• GOOD(NC) Region - No Sub-status Propagated, all are propagated as non-specific (Status Enumeration Values: 128
– 131)
• GOOD(C) Region - All Sub-status Propagated (Status Enumeration Values: 192 – 227)

Limit_Status
There are four limits used in statuses: NOT-LIMITED, LOW-LIMITED, HIGH-LIMITED, and CONSTANT. The limit status
propagation is based on these rules:
1. For Relational blocks, the limit status is never propagated. The limit status is only created by a block if needed.
2. For Single Input/Single Output and Selection blocks, the status limit is propagated. A block altered status will
overwrite an input limit status.

Status Input Verification


• Any status block that receives a signal from a non-status block/variable treats that input status as the system default of
NOT_LIMITED-GOODNC (128).
• Any status block that receives an input status that is not in the valid range is treated as a status of NOT_LIMITED-BAD
(0).

238 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Status Tables
Output Status Calculation Hierarchy
Condition Hierarchy Output Status
The related inputs are determined by the status block type:
Any Related Input Value = NaN
1 +NaN = HIGH_LIMITED-BAD [2]
(Not a Number)
-NaN = LOW_LIMITED-BAD [1]
Follows propagation priority outlined above with BAD region taking first
Status_Region Propagation 2
priority and GOOD(NC) region taking last priority
Block modified status-detailed in block specific help file. Exceeding data
Block Status Modification type changes Limit_Status:
3
such as Exceeded Data Type HIGH_LIMITED for data type exceeded high or
LOW_LIMITED for data type exceeded low
Sub_Status and Limit_Status
4 These are only propagated for Single I/O and Selection blocks
Propagation

Data Type Ranges


The calculated output value for a block cannot exceed the range limits for the respective data type. If this occurs, the output
value is replaced by the maximum or minimum value for the data type. For example, if the output value for an INT data type
is computed as 100,000, the actual output value will be limited to 32,767 and the status is determined as listed in the table
Output Status Calculation Hierarchy.

Type Minimum Value Maximum Value


INT -32768 32767
DINT -2147483648 2147483647
UINT 0 65535
UDINT 0 4294967295
REAL -3.4E+38 3.4E+38
LREAL -1.7E+308 1.7E+308
BOOLEAN False True

Instruction Guide GEI-100682AK 239


Public Information
Bad Status Region
Bad Status Region Integer
NOT_LIMITED-BAD 0
LOW_LIMITED-BAD 1
HIGH_LIMITED-BAD 2
CONSTANT-BAD 3
NOT_LIMITED-CONFIGURATION_ERROR-BAD 4
LOW_LIMITED-CONFIGURATION_ERROR-BAD 5
HIGH_LIMITED-CONFIGURATION_ERROR-BAD 6
CONSTANT-CONFIGURATION_ERROR-BAD 7
NOT_LIMITED-NOT_CONNECTED-BAD 8
LOW_LIMITED-NOT_CONNECTED-BAD 9
HIGH_LIMITED-NOT_CONNECTED-BAD 10
CONSTANT-NOT_CONNECTED-BAD 11
NOT_LIMITED-DEVICE_FAILURE-BAD 12
LOW_LIMITED-DEVICE_FAILURE-BAD 13
HIGH_LIMITED-DEVICE_FAILURE-BAD 14
CONSTANT-DEVICE_FAILURE-BAD 15
NOT_LIMITED-SENSOR_FAILURE-BAD 16
LOW_LIMITED-SENSOR_FAILURE-BAD 17
HIGH_LIMITED-SENSOR_FAILURE-BAD 18
CONSTANT-SENSOR_FAILURE-BAD 19
NOT_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 20
LOW_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 21
HIGH_LIMITED-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 22
CONSTANT-NO_COMM_WITH_LAST_USABLE_VALUE-BAD 23
NOT_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 24
LOW_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 25
HIGH_LIMITED-NO_COMM_WITH_NO_USABLE_VALUE-BAD 26
CONSTANT-NO_COMM_WITH_NO_USABLE_VALUE-BAD 27
NOT_LIMITED-OUT_OF_SERVICE-BAD 28
LOW_LIMITED-OUT_OF_SERVICE-BAD 29
HIGH_LIMITED-OUT_OF_SERVICE-BAD 30
CONSTANT-OUT_OF_SERVICE-BAD 31

240 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Uncertain Status Region
Uncertain Status Region Integer
NOT_LIMITED-UNCERTAIN 64
LOW_LIMITED-UNCERTAIN 65
HIGH_LIMITED-UNCERTAIN 66
CONSTANT-UNCERTAIN 67
NOT_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 68
LOW_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 69
HIGH_LIMITED-LAST_USABLE_VALUE-UNCERTAIN 70
CONSTANT-LAST_USABLE_VALUE-UNCERTAIN 71
NOT_LIMITED-SUBSTITUTE-UNCERTAIN 72
LOW_LIMITED-SUBSTITUTE-UNCERTAIN 73
HIGH_LIMITED-SUBSTITUTE-UNCERTAIN 74
CONSTANT-SUBSTITUTE-UNCERTAIN 75
NOT_LIMITED-INITIAL_VALUE-UNCERTAIN 76
LOW_LIMITED-INITIAL_VALUE-UNCERTAIN 77
HIGH_LIMITED-INITIAL_VALUE-UNCERTAIN 78
CONSTANT-INITIAL_VALUE-UNCERTAIN 79
NOT_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 80
LOW_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 81
HIGH_LIMITED-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 82
CONSTANT-SENSOR_CONVERSION_NOT_ACCURATE-UNCERTAIN 83
NOT_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 84
LOW_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 85
HIGH_LIMITED-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 86
CONSTANT-ENGINEERING_UNIT_RANGE_VIOLATION-UNCERTAIN 87
NOT_LIMITED-SUBNORMAL-UNCERTAIN 88
LOW_LIMITED-SUBNORMAL-UNCERTAIN 89
HIGH_LIMITED-SUBNORMAL-UNCERTAIN 90
CONSTANT-SUBNORMAL-UNCERTAIN 91

Instruction Guide GEI-100682AK 241


Public Information
Good Non Cascade Status Region
Good Non Cascade Status Region Integer
NOT_LIMITED-GOODNC 128
LOW_LIMITED-GOODNC 129
HIGH_LIMITED-GOODNC 130
CONSTANT-GOODNC 131
NOT_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 132
LOW_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 133
HIGH_LIMITED-ACTIVE_BLOCK_ALARM-GOODNC 134
CONSTANT-ACTIVE_BLOCK_ALARM-GOODNC 135
NOT_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 136
LOW_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 137
HIGH_LIMITED-ACTIVE_ADVISORY_ALARM-GOODNC 138
CONSTANT-ACTIVE_ADVISORY_ALARM-GOODNC 139
NOT_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 140
LOW_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 141
HIGH_LIMITED-ACTIVE_CRITICAL_ALARM-GOODNC 142
CONSTANT-ACTIVE_CRITICAL_ALARM-GOODNC 143
NOT_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 144
LOW_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 145
HIGH_LIMITED-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 146
CONSTANT-UNACKNOWLEDGED_BLOCK_ALARM-GOODNC 147
NOT_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 148
LOW_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 149
HIGH_LIMITED-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 150
CONSTANT-UNACKNOWLEDGED_ADVISORY_ALARM-GOODNC 151
NOT_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 152
LOW_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 153
HIGH_LIMITED-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 154
CONSTANT-UNACKNOWLEDGED_CRITICAL_ALARM-GOODNC 155

242 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Good Cascade Status Region
Good Cascade Status Region Integer
NOT_LIMITED-GOODC 192
LOW_LIMITED-GOODC 193
HIGH_LIMITED-GOODC 194
CONSTANT-GOODC 195
NOT_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 196
LOW_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 197
HIGH_LIMITED-INITIALIZATION_ACKNOWLEDGE-GOODC 198
CONSTANT-INITIALIZATION_ACKNOWLEDGE-GOODC 199
NOT_LIMITED-INITIALIZATION_REQUEST-GOODC 200
LOW_LIMITED-INITIALIZATION_REQUEST-GOODC 201
HIGH_LIMITED-INITIALIZATION_REQUEST-GOODC 202
CONSTANT-INITIALIZATION_REQUEST-GOODC 203
NOT_LIMITED-NOT_INVITED-GOODC 204
LOW_LIMITED-NOT_INVITED-GOODC 205
HIGH_LIMITED-NOT_INVITED-GOODC 206
CONSTANT-NOT_INVITED-GOODC 207
NOT_LIMITED-NOT_SELECTED-GOODC 208
LOW_LIMITED-NOT_SELECTED-GOODC 209
HIGH_LIMITED-NOT_SELECTED-GOODC 210
CONSTANT-NOT_SELECTED-GOODC 211
NOT_LIMITED-LOCAL_OVERRIDE-GOODC 216
LOW_LIMITED-LOCAL_OVERRIDE-GOODC 217
HIGH_LIMITED-LOCAL_OVERRIDE-GOODC 218
CONSTANT-LOCAL_OVERRIDE-GOODC 219
NOT_LIMITED-FAULT_STATE_ACTIVE-GOODC 220
LOW_LIMITED-FAULT_STATE_ACTIVE-GOODC 221
HIGH_LIMITED-FAULT_STATE_ACTIVE-GOODC 222
CONSTANT-FAULT_STATE_ACTIVE-GOODC 223
NOT_LIMITED-INITIATE_FAULT_STATE-GOODC 224
LOW_LIMITED-INITIATE_FAULT_STATE-GOODC 225
HIGH_LIMITED-INITIATE_FAULT_STATE-GOODC 226
CONSTANT-INITIATE_FAULT_STATE-GOODC 227

Instruction Guide GEI-100682AK 243


Public Information
Status Split (STATUS_SPLIT)
Block Category: System
The Status Split (STATUS_SPLIT) block is used to split the value and status for an input with interface type (value with
status). The value at IN is transferred to VALUE and the status of IN is transferred to STATUS.
If IN is value only then STATUS will be NOT_LIMITED-GOODNC –[128]
The status region is indicated by the outputs BAD, POOR, GOOD.
If STATUS < 32, then BAD = True
If 63 < STATUS < 92, then POOR = True
If 127 < STATUS < 156 or if 191 < STATUS < 228, then GOOD = True

Note This block is a variant block that supports any one of the following block data types: Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the VALUE pin must match the selected data type of
the block. Status functionality is always enabled for this block. Refer to the section Change Data Type of Variant Block.

STATUS_SPLIT Block

This block propagates status. Refer to the section Status Monitoring (STATUS_MONITORING).

If IN is value only, the Status output is NOT_LIMITED_GOODNC[128].

Input
Name Data Type Description Default
IN ANY† Input value 0
† Value with status

Outputs
Name Data Type Description Default
VALUE ANY Output value N/A
STATUS UINT Output status N/A
GOOD BOOL Status in GOOD region N/A
BAD BOOL Status in BAD region N/A
POOR BOOL Status in UNCERTAIN region N/A

244 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Steer (STEER)
Block Category: Selection
The Steer (STEER) block is an expandable block up to 32 inputs that moves the input, IN, to one of the 32 outputs, OUTn, or
to the cascade pin, CASC. Working in ascending order from SEL1 to SELn, the first True value encountered causes the input
to be moved to the corresponding output. All other outputs are set to zero or False for Booleans. If none of the selection pins
are True then IN is moved to the cascade output, CASC.
Example: If SEL2 is True, then input IN is moved to output OUT2.
If any of the selection pins, SEL, or the clearance pin, CLR, are True, the ACT pin is set to True.
If CLR is True, then all of the outputs and the cascade pin are set to zero. By tying ACT pin to CLR pin of another STEER
block, multiple STEER blocks may be cascaded with the highest priority selections placed on the first blocks in the string.

Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.

STEER Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
CLR BOOL If True, all outputs and CASC are cleared (Default: False)
IN ANY† Input variable
SEL1 BOOL First selection input
↓ ↓ ↓
SELn BOOL N'th selection input
†Value with Status (Value only for Boolean block type), if status option is enabled.

Outputs
Name Data Type Description
ACT BOOL Block is active; a selection has been made by the block or CLR is True
CASC ANY† Default selection
OUT1 ANY† First output variable
↓ ↓ ↓
OUTn ANY† N'th output variable
† Value with Status (Value only for Boolean block type), if status option is enabled.

Instruction Guide GEI-100682AK 245


Public Information
Subtract (SUB)
Block Category: Math
The Subtract (SUB) block performs an algebraic subtraction: OUT = IN1 – IN2.

Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.

SUB Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
IN1 ANY_NUM† Input 1
IN2 ANY_NUM† Input 2
†Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY_NUM† Result of the substraction
† Value with status, if status option is enabled.

246 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Switch (SWITCH)
Block Category: Selection
The Switch (SWITCH) block is used to switch the output between two inputs, F and T, with a rate limiter. When SEL is True,
the output tracks input T, and if SEL is False, the output tracks input F. The output is rate limited when the selection SEL
remains constant and T or F change, as well as when SEL changes to select the other input. The output equals the selected
input if the rate of change of the selected input does not exceed A_RATE or D_RATE. The rate of change of OUT is limited
when the selected input exceeds A_RATE or D_RATE. The rate limits do not apply to Booleans. When A_RATE and/or D_
RATE equal 0, the output is set equal to the selected input.

Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.

SWITCH Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
F ANY† (Default: 0)
T ANY† Input variable (Default: 0)
SEL BOOL Selection input (Default: 0)
A_RATE REAL Ascending transfer rate (engineering_units/sec) (Default: 0)
D_RATE REAL Descending transfer rate (engineering_units/sec) (Default: 0)
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT ANY† Selected value
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 247


Public Information
System Outputs (SYS_OUTPUTS)
Block Category: System
The System Outputs (SYS_OUTPUTS) block provides a command interface between the application code and the I/O
subsystem (that is, I/O packs). The command input Booleans are synchronously transmitted to every I/O pack. The commands
are interpreted as level values by the I/O packs and so should not be kept in the True state, but rather pulsed for a few frames
and then reset.

Only one instance of this block is allowed per controller.

Attention

SYS_OUTPUTS Block

SYS_OUTPUTS Block Expanded

Inputs
Name Data Type Description
Application Reset: Directs all I/O packs to reset any latched conditions resulting from
MRESET BOOL
previous trips.
Reset Suicide: Directs all I/O packs to unsuicide any closed loop regulators. Suiciding
RSTSUIC BOOL a regulator forces it into a safe state. Closed loop operation may not be re-started
without lifting the suicide.
Reset Diagnostics: Directs all I/O packs and the controller to clear from the queue all
RSTDIAG BOOL
diagnostics in the normal state.
RSTSYS BOOL Reset System Limits: Directs all I/O packs to clear all latched system limit logicals.

248 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Task Scan (SCAN)
Block Category: System
The Task Scan (SCAN) block returns the most recent task scan period, and the scheduled scan period. Both the outputs are in
seconds. The TSK_TIM value may not be always equal to SCAN_RT, if higher priority tasks preempt this task.

Note The TSK_TIM and the SCAN_RT pins both hold the same value (scheduled task scan time) in the Virtual Controller.
The actual task scan time is not measured.

SCAN Block

Outputs
Name Data Type Description
TSK_TIM REAL Actual task scan time
SCAN_RT REAL Scheduled task scan time

Instruction Guide GEI-100682AK 249


Public Information
Temperature Status (TEMP_STATUS)
Block Category: System
The Temperature Status (TEMP_STATUS) block is a temperature-sensing block for the Mark VIe controllers. All
temperatures are in degrees C. The outputs from this block are dependent on controller platform. TEMP_STATUS is not
supported in the virtual controller, where all the outputs default to a value of zero and ALARM defaults to False. TEMP_
STATUS does not generate any diagnostic alarms.

TEMP_STATUS Block Functional Diagram

250 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
TEMP_STATUS Inputs
Input Pin Data Type Platform Functionality
ID of the controller being monitored/controlled; 1 for R, 2 for S, and
Unsigned
ID All 3 for T controller. 0 for Local means the block monitors/controls the
Short Integer
controller executing the block (backward compatibility).
UCPA, UCSA, UCSB,
N/A
UCSC, UCSD
OTPROT BOOL When True, forces the controller to reboot into a low power failure
UCCA, UCCC mode (in which the application will not run) when a temperature
alarm condition is detected.
UCPA, UCSA, UCSB,
N/A
THLD REAL UCSC, UCSD
UCCA, UCCC Setpoint for declaring the alarm. Ignored unless USR_ENA is True.
UCPA, UCSA, UCSB,
N/A
UCSC, UCSD
HYST REAL
Hysteresis value to be considered for clearing the alarm. Ignored
UCCA, UCCC
unless USR_ENA is True.
UCPA, UCSA, UCSB,
N/A
USR_ENA BOOL UCSC, UCSD
UCCA, UCCC Used to enable user supplied temperature limits

Instruction Guide GEI-100682AK 251


Public Information
TEMP_STATUS Outputs
Output Pin Data Type Platform Functionality
UCPA, UCSA, UCSB,
Remains False, is N/A
UCSC, UCSD
Is False if CPU_TEMP is within limits

If USR_ENA is False, then ALARM is True if CPU_TEMP is greater


ALARM BOOL than or equal to DEF_THLD.
UCCA, UCCC If USR_ENA is True, then ALARM is True if CPU_TEMP is greater
than or equal to THLD.

If ALARM is True and if OTPROT is True, then the controller


reboots to a lower power state
UCPA, UCSA, UCSB,
N/A, has a value of 0
CPU_TEMP REAL UCSC, UCSD
UCCA, UCCC Provides the CPU temperature in °C
UCSC N/A, has a value of 0
BRD_TEMP REAL UCPA, UCSA, UCSB Processor board hot spot temperature in °C
UCCA, UCCC Motherboard temperature in °C
UCSC Temperature value of sensor on Carrier Board in °C
UCPA N/A, has a value of 0
TEMP1 REAL
UCSA, UCSB Processor board ambient temperature in °C
UCCA, UCCC Temperature value of sensor #1 near resistor on EPMC in °C
UCPA, UCSA, UCSB,
N/A, has a value of 0
TEMP2 REAL UCSC, UCSD
UCCA, UCCC Temperature value of sensor #2 at bottom of EPMC in °C
UCPA, UCSA, UCSB,
N/A
DELTA REAL UCSC, UCSD
UCCA, UCCC TEMP1 - TEMP2 in °C
UCPA, UCSA, UCSB,
Not used
UCSC, UCSD
DEF_THLD REAL
90 °C (194 °F) is the default value of CPU temperature limit for
UCCA, UCCC
alarm, °C. Used when USR_ENA is False.
UCPA, UCSA, UCSB,
Not used
UCSC, UCSD
DEF_HYST REAL
5 °C (9 °F) is the default value of CPU temperature hysteresis.
UCCA, UCCC
Used to determine alarm reset value when USR_ENA is False.

252 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Notes on Legacy Controller Functionality
With UCCA and UCCC controllers, the CPU_TEMP pin outputs the CPU core temperature. The BRD_TEMP pin outputs the
motherboard temperature. two temperature sensors are embedded in the processor card as well, TEMP1 and TEMP2. One
sensor is placed near a resistor so that it is constantly warmed above the ambient temperature. The other is placed away from
any heat-producing elements. When the fan is on, the airflow provides cooling around both sensors and a relatively constant
temperature difference, DELTA, measures the difference between the two. When the fan is off the warmed sensor experiences
a much larger rise in temperature than does the ambient sensor. All three variables, TEMP1, TEMP2, and DELTA are output
for diagnostic purposes and backward compatibility, but they no longer contribute to the alarm logic.
With UCCA and UCCC controllers, the TEMP_STATUS block uses a default temperature, DEF_THLD, to determine an
upper temperature alarm limit. This limit can be replaced with a user configurable limit, THLD, if the user enables Boolean
input USR_ENA. Once in ALARM, the Boolean condition will not reset until the CPU temperature falls below the upper
temperature alarm limit less a hysteresis value. This hysteresis value defaults to a supplied value DEF_HYST, unless the
Boolean input USR_ENA overrides this value with the input HYST. Default temperature limits are determined by GE for the
particular platform. Current EPMC values are: DEF_THLD = 90, DEF_HYST = 5 °C. The user is given another Boolean
input pin, OTPROT, to control action when an alarm condition is detected. If an alarm condition latches when OTPROT is
True, the controller automatically reboots into a low power failure mode. The application will not run in this mode, but tool
connectivity is maintained. After a subsequent reboot, the application will run again.

Instruction Guide GEI-100682AK 253


Public Information
Time Monitor (TIME_MON)
Block Category: System
The Time Monitor (TIME_MON) block uses Coordinated Universal Time (UTC) and outputs local time and a FLAG which
pulses to True for one second when the local time reaches the setpoint time. UTC is elapsed time in seconds in Greenwich,
England, since January 1, 1970, 00:00:00. T_DIF, in hours, is equal to the standard local time plus or minus UTC Time
depending on location; standard local time is the local time without the Daylight Savings Time adjustment, if Daylight
Savings Time is being observed. As an example, if UTC time is 16:00:00 and standard local time is 12:30:00, then T_DIF is –
3.5 or if standard local time is 17:00:00, T_DIF is 1. If Daylight Savings Time is to be observed, DLST should be set to True.
The Setpoint Function, SP_Fn, determines the FLAG occurrence. For example, if the function, SP_Fn, is selected for a
monthly-basis occurrence, the block will use the day setpoint, DAY_SP, the hour setpoint, HR_SP, the minute setpoint, MIN_
SP and the second setpoint, SEC_SP, and will ignore the year setpoint, YR_SP, and the month setpoint, MON_SP. When the
local time, which is the standard local time, adjusted for Daylight Savings Time, if applicable, matches these input setpoints,
the output FLAG will pulse to True for one second. A One_Time occurrence requires all six setpoints. All setpoints are local
time.

TIME_MON Block

TIME_MON Block Expanded

254 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Input Setpoint Function (SP_F) Enumerations
Function Enumeration
One time occurrence One_Time
Yearly-basis occurrence Yearly
Monthly-basis occurrence Daily-basis occurrence Monthly
Daily-basis occurrence Daily
Hourly-basis occurrence Hourly
Minute-basis occurrence Minute

Inputs
Name Data Type Description Interface Type
DLST BOOL Observe Daylight Savings Time Value only
T_DIF INT Local/UTC time difference in hours Value only
SP_Fn ENUM(UNIT) Enumerated function to select FLAG occurrence Value only
YR_SP UINT Year setpoint Value only
MON_SP UINT Month setpoint Value only
DAY_SP UINT Day setpoint Value only
HR_SP UINT Hour setpoint, based on 24 hour clock (9:00 pm = 21) Value only
MIN_SP UINT Minute setpoint Value only
SEC_SP UINT Second setpoint Value only
DST_B_MON ENUM(UNIT) Daylight Savings Time Begin Month Value only
DST_B_DAY ENUM(UNIT) Daylight Savings Time Begin Day Value only
DST_B_HR ENUM(UNIT) Daylight Savings Time Begin Hour Value only
DST_B_MIN ENUM(UNIT) Daylight Savings Time Begin Minute Value only
DST_E_MON ENUM(UNIT) Daylight Savings Time End Month Value only
DST_E_DAY ENUM(UNIT) Daylight Savings Time End Day Value only
DST_E_HR ENUM(UNIT) Daylight Savings Time End Hour Value only
DST_E_MIN ENUM(UNIT) Daylight Savings Time End Minute Value only

Outputs
Name Data Type Description Interface Type
FLAG BOOL Indicates that the set time has been reached Value only
YR UINT Year in Local Time Value only
MON UINT Month in Local Time Value only
DAY UINT Day in Local Time Value only
HR UINT Hour in Local Time Value only
MIN UINT Minute in Local Time Value only
SEC UINT Second in Local Time Value only
UTCTIME UDINT UTC seconds Value only
LOCKED BOOL True if time is synchronized with an NTP Time Master Value only

Instruction Guide GEI-100682AK 255


Public Information
Timer (TIMER)
Block Category: Legacy, Timers and Counters

Note This block is not recommended for use in any new controller applications (ControlST V05.02 or later). Refer to the
section Legacy Category Blocks.

The Timer (TIMER) block accumulates incremental time into CURTIME while RUN is True. When CURTIME is equal to
MAXTIME, AT_TIME transitions to True. If RUN is False then timing is suspended but the value in CURTIME remains. If
RESET is True then CURTIME is set to zero and counting is suspended. The AUTO_RS flag can reset the timer after it
reaches MAXTIME. In this mode, AT_TIME will be True for one scan and the CURTIME will be set to the residual count so
that no time is lost.
The time period taken by the output pin AT_TIME to transition is always a multiple of the frame performance period set in
the ToolboxST application. For accurate performance of the block, set MAXTIME as a multiple of the frame performance
period.
The maximum value of CURTIME in the TIMER block is 4294967295ms (0xFFFFFFFF).

Note The AUTO_RS input pin will provide timing intervals equal to MAXTIME, except for the first timing interval which
will be MAXTIME minus one execution period.
If the user wraps the AT_TIME output pin back to the RESET input pin, the timing interval will be equal to MAXTIME plus
one execution period, except for the first timing interval which will be MAXTIME minus one execution period.
On the TIMER block, the AT_TIME output pin should never be connected directly to the RESET input pin, a MOVE block
should be inserted between the pins. If the AT_TIME output pin is connected directly to the RESET input pin, the AT_TIME
output pin will never go true.

TIMER Block

TIMER Example with MOVE

Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the TIMER block.

256 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
MAXTIME UDINT Maximum time value in milliseconds
RESET BOOL Zeros the timer
AUTO_RS BOOL Automatically zeros the timer when AT_TIME is set. Maintains residual count.
RUN BOOL Enables the timer

Outputs
Name Data Type Description
AT_TIME BOOL Indicates the timer has reached the maximum time value
CURTIME UDINT Current time value in milliseconds

State
Name Data Type Description
This is the last current time value in milliseconds, a hidden pin. It can be viewed or
LAST_CURTIME UDINT changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.

Instruction Guide GEI-100682AK 257


Public Information
Timer Version 2 (TIMER_V2)
Block Category: Timers and Counters
The Timer Version 2 (TIMER_V2) block accumulates incremental time into CURTIME while RUN is True. When
CURTIME is equal to MAXTIME, AT_TIME transitions to True. If RUN is False then timing is suspended but the value in
CURTIME remains. If RESET is True then CURTIME is set to zero and counting is suspended. The AUTO_RS flag can reset
the timer after it reaches MAXTIME. In this mode, AT_TIME will be True for one scan and the CURTIME will be set to the
residual count so that no time is lost.
The time period taken by the output pin AT_TIME to transition is always a multiple of the frame performance period set in
the ToolboxST application. For accurate performance of the block, set MAXTIME as a multiple of the frame performance
period.
The maximum value of CURTIME in the TIMER_V2 block is 4294967295ms (0xFFFFFFFF).

Note The AUTO_RS input pin will provide timing intervals equal to MAXTIME, except for the first timing interval which
will be MAXTIME minus one execution period.
If the user wraps the AT_TIME output pin back to the RESET input pin, the timing interval will be equal to MAXTIME plus
one execution period, except for the first timing interval which will be MAXTIME minus one execution period.

TIMER_V2 Block

TIMER_V2 Example with AT_TIME output to RESET input

258 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Inputs
Name Data Type Description
MAXTIME UDINT Maximum time value in milliseconds
RESET BOOL Zeros the timer
AUTO_RS BOOL Automatically zeros the timer when AT_TIME is set. Maintains the residual count.
RUN BOOL Enables the timer

Outputs
Name Data Type Description
AT_TIME = True indicates that the timer has reached the maximum time value. In
Timer Version 2, AT_TIME can be used as a signal for the RESET pin as was the
AT_TIME BOOL
case in many existing Mark VI controller applications. This logic results in a loss of
residual time, whereas the use of AUTO_RS results in no loss of residual time.
CURTIME UDINT Current time value in milliseconds

State
Name Data Type Description
This is the last current time value in milliseconds, a hidden pin. It can be viewed or
LAST_CURTIME UDINT changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.

Instruction Guide GEI-100682AK 259


Public Information
Totalizer (TOTALIZER)
Block Category: Timers and Counters
The Totalizer (TOTALIZER) block is a rubber block that can handle up to 128 sets of pins. The TOTALIZER block uses a
special area of the NVRAM to maintain critical application code counter values. The Totalizer block has 128 totalizers
(counters) that accumulate rising edges of the INCx pin in the TOTALx variable. When a rising edge of INCx is detected, 1 is
added to the value stored in TOTALx. When TOTALx reaches it's maximum value (2^31-1), then, on the next rising edge of
INCx, ROLLx transitions to True and TOTALx is set to 0 until the next rising edge of INCx. TOTALx is never negative.

Only one instance of this block is allowed per controller in the application code.

Attention

Note Totalizer values are set in the ToolboxST application. For instructions, refer to the ToolboxST User Guide for Mark
Controls Platform (GEH-6700 or GEH-6703), the section Totalizers.

TOTALIZER Block

Inputs
Name Data Type Description
INC1 BOOL Specified totalizer increments on the rising edge of this pin
↓ ↓ ↓
INC128 BOOL Specified totalizer increments on the rising edge of this pin

Outputs
Name Data Type Description
TOTAL1 UDINT Output value of the totalizer for use by other application code
↓ ↓ ↓
TOTAL128 UDINT Output value of the totalizer for use by other application code
Set True if the totalizer value has overflowed. The pin stays True until INCx
ROLL1 BOOL
increments again.
↓ ↓ ↓
Set True if the totalizer value has overflowed. The pin stays True until INCx
ROLL128 BOOL
increments again.

260 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Transfer Function (TRNFUN)
Block Category: Controls (Basic)
The Transfer Function (TRNFUN) block provides a digital implementation of the following transfer function:

This equation can approximate a phase lead, phase lag, simple lag, phase lead/lag, or a bridged-T (Notch) compensator
depending upon the choice of the appropriate coefficients. The block can also be used to create Butterworth, Chebyshev, and
such, second order filters, and can be cascaded to form higher order filters.
The nature of the transfer function may be altered online by changing the values of the equation coefficients. The block
calculates whether the new coefficients result in an unstable function (one or more poles lie outside the unit circle). If found to
be unstable the block does not switch to the new function but maintains the old coefficients. The switching lockout may be
defeated by using the DLOCK pin but CI_ERR will still be set True if the stability check fails.
The stability check is intended to protect the user against transfer functions that are grossly unstable. It cannot replace sound
engineering judgement. Limitations in the stability check may cause erroneous results when the coefficients specify a
marginally stable transfer function. There is no guarantee about the stability of the loop in which it is placed.
The evaluation of coefficients normally occurs in the background and the coherent set is transferred to the foreground.
Therefore the change from one set of coefficients to another may require over 500 milliseconds to occur. If ENA_DYN is set
to True this calculation is performed in the foreground, but the block incurs an performance time penalty as a result. If
foreground coefficient evaluation is chosen the block is preset with the unity gain function at initialization time. The first
evaluation occurs at the first foreground performance and if found to be unstable, the unity gain function remains in effect.
The TRNFUN (REAL) form should be used to implement second order and simpler functions. The TRNFUN (long) form
should be used when cascading blocks to create higher order forms because it maintains the resolution of a double floating
point number between the blocks. A data type conversion block, such as MOVE (REAL) is required to convert the output of
the final block back to a single precision floating point number for use with most other blocks. The transformation from the
continuous domain (s) into the discrete domain (z) is accomplished by bilinear transformation. This method produces accurate
results for frequencies of interest that are less than 0.3/T (w < 0.3/T). For tasks executing at 32 milliseconds this is about 10
radians, or 1.5 Hz. For tasks executing at 2 milliseconds this is about 150 radians, or 24 Hz.

Note This is a variant block that supports any one the following block data types: REAL or Long Real. The default data type
is REAL. Refer to the section Change Data Type of Variant Block.

TRNFUN Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Block status modifications: If B0, B1, B2 = 0, then the output status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD
[4].

Instruction Guide GEI-100682AK 261


Public Information
Inputs
Name Data Type Description
ENA_FUN BOOL If True the function is enabled, else the input value is moved to the output
If True the coefficients are re-evaluated in the foreground each sweep. Otherwise this
ENA_DYN BOOL
calculation is performed in the background.
If True an error found by the stability checker does NOT prevent the block from
accepting the new coefficients. Normally coefficients that result in unstable transfer
DLOCK BOOL functions are rejected. Note: If this pin is set AFTER discovering that a specified
function is deemed unstable, the coefficients must be altered again to cause the block
to recalculate and then accept the new values.
IN REAL/LREAL† Input value
A2 REAL Second order numerator coefficient
A1 REAL First order numerator coefficient
A0 REAL Zero order numerator coefficient
B2 REAL Second order denominator coefficient
B1 REAL First order denominator coefficient
B0 REAL Zero order denominator coefficient
If True and ENA_FUN is True calculate the state variables so as to drive the output to
PRESET BOOL
the input value.
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT REAL/REAL† Output value
CI_ERR BOOL If True, indicates that the specified transfer function is unstable
† Value with status, if status option is enabled.

262 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Transport Delay (TRAN_DLY)
Block Category: Controls (Basic)

Note This block is not recommended for use in any new controller applications (ControlST V05.02 or later). Refer to the
section Legacy Category Blocks.

The Transport Delay (TRAN_DLY) block collects input samples each scan and stores them in an array. OLD is the second
oldest value stored in the array and OUT is the Nth value stored prior to the inclusion of the current input value. The delay
time for OUT is equal to the scan rate multiplied by the least of N_DELAY, the array size of LIST[ ], or the array size of
SLIST[ ]. The delay time for OLD is equal to the scan rate times the number of elements of LIST[ ]. The array size of the
variable connected to the LIST[ ] pin should be greater than or equal to the value of N_DELAY. The SLIST pin is an array pin
similar to the LIST pin, but is only present on the status version of the block.

TRAN_DLY Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
IN REAL† Next value to be entered into the list
N_DELAY Unsigned double integer Size of the array that defines the LIST variable
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OLD REAL† Second oldest value stored in LIST array
OUT REAL† Newest or Nth stored value in the list as specified by N_DELAY
† Value with status, if status option is enabled.

State
Name Data Type Description
LIST[ ] REAL(array) Storage array for the delay list
SLIST[ ] UINT(array) Storage array for the delay list status

Instruction Guide GEI-100682AK 263


Public Information
Transport Delay Version 2 (TRAN_DLY_V2)
Block Category: Controls (Basic)
The Transport Delay Version 2 (TRAN_DLY_V2) block collects input samples each scan and stores them in an array. OLD is
the oldest value stored in the array and OUT is the Nth value stored prior to the inclusion of the current input value. The delay
time for OUT is equal to the scan rate times the least of N_DELAY or the array size of LIST[ ]. The delay time for OLD is
equal to the scan rate times the number of elements of LIST[ ]. The array size of the variable connected to the LIST[ ] pin
should be greater than or equal to the value of N_DELAY. The SLIST pin is an array pin similar to the LIST pin, but is only
present on the status version of the block.

TRAN_DLY_V2 Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
IN REAL† Next value to be entered into the list
N_DELAY Unsigned double integer Size of the array that defines the LIST variable
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OLD REAL† Oldest value stored in LIST array
OUT REAL† Newest or Nth stored value in the list as specified by N_DELAY
† Value with status, if status option is enabled.

State
Name Data Type Description
LIST[ ] REAL(array) Storage array for the delay list

264 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Unit Delay (UNIT_DELAY)
Block Category: Controls (Basic)
The Unit Delay (UNIT_DELAY) block performs a one-frame delayed copy of the input, IN, to the output, OUT. The time
period of the delay depends upon the Frame period with which the block is being performed.

Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.

UNIT_DELAY Block

This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).

Inputs
Name Data Type Description
INPUT ANY† Input value to be delayed
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUTPUT ANY† Delayed value
STATE ANY† Current value of the input (for feedback)
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AK 265


Public Information
User Scheduled Block Heartbeat (USB_HB)
Block Category: System
This block outputs the current value of the USB heartbeat counter. The block has zero inputs and one output.
The USB_HB block outputs the free-running counter value of the task in which it is scheduled. This indicates that the task is
running as expected, which can be made available outside the task by attaching a global variable. The information is also
available as a local task variable _Heartbeat, which is a convenient indication from within the ToolboxST application.

Note The task heartbeat is anti-voted, so it can be used to detect a stalled task in a particular controller.

USB_HB Block

Note The USB heartbeat counter should not be connected to an I/O module output. This generates an output disagreement
diagnostic alarm. The DEVICE_HB block should be used instead to connect to an I/O module output.

Output
Name Data Type Description
Out UINT Controller heartbeat variable

266 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
UTC Time (UTC_TIME)
Block Category: System
The UTC Time (UTC_TIME) block outputs UTC seconds which is a LONG REAL data type. When the LOCKED boolean is
True, UTCTIME is synchronized with the NTP server. And if the LOCKED is False, then UTCTIME will display the Mark
VIe system time.
The output is seconds lapsed since 1 January 1970 00:00:00.

UTC_TIME Block

Outputs
Name Data Type Description
UTCTIME LREAL Outputs UTC seconds
LOCKED BOOL True if local time is synchronized with an NTP Time Master

Instruction Guide GEI-100682AK 267


Public Information
Variable Alarm Status (VAR_ALARM_STATUS)
Block Category: System
The Variable Alarm Status (VAR_ALARM_STATUS) block provides access to alarm status information for the attached
variable. This block provides two Boolean statuses of alarm states: ACK and IN_ALM_Q. The ACK status indicates whether
the given variable (if it is an alarm variable) has been acknowledged. The IN_ALM_Q status indicates whether the input
variable is currently in the Alarm subsystem Alarm Queue. Refer to the Mark VIe and Mark VIeS Control Systems Volume III:
System Guide for GE Industrial Applications (GEH-6721_Vol_III), the section Alarm States for more information on the
alarm subsystem, alarm variables, and the alarm queue.

Note If a variable that is not an alarm is attached to this block, the output statuses will return False.

VAR_ALARM_STATUS Block

Inputs
Name Data Type Description
VAR ANY Variable for which alarm statuses are to be examined

Outputs
Name Data Type Description
ACK BOOL Alarm Acknowledge status for the input variable VAR
IN_ALM_Q BOOL In-Alarm Queue status for the input variable VAR

268 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Variable Health (VAR_HEALTH)
Block Category: System
The Variable Health (VAR_HEALTH) block receives from 1 to 32 variable signals as input points to this block. For each
configured input, this block provides two sets of corresponding output pins that provide both the health status (HEALTHnn,
UNCERTnn, and BADnn) and link status (LINKOKnn, LINK_UNCERTnn, and LINK_BADnn) of the corresponding input.
In most applications that monitor variable health, the application should monitor the BADnn signal to determine whether a
given variable is healthy or not.
The available 32 input pins can be assigned to any of the following variables:

• Regular variable directly from an I/O board input signal


• Variable from an external network, such as a variable assigned to a Unit Data Highway (UDH) EGD page
• Regular variable directly from an I/O board output signal (not usually required)
• Regular variable directly from an EtherCAT input signal
When a variable VARnn is believed to be working properly, the corresponding output pins HEALTHnn and LINKOKnn are
both set to True and UNCERTnn, BADnn, LINK_UNCERTnn, and LINK_BADnn are set to False. This happens when all
tests defined for its source are completed successfully. This includes both variable signal connectivity, as well as any
Healthy/Unhealthy determinations made by the specific I/O pack.
The HEALTHnn output provides an indication of the health of the corresponding variable VARnn. For example, if the
Ethernet cable is unplugged from a simplex Analog Input I/O pack, this causes a connectivity failure resulting in HEALTHnn
being set to False to indicate an Unhealthy signal and UNCERTnn to become True for the configured number of base health
delay periods, after which BADnn becomes True. An I/O pack can set HEALTHnn to False for other conditions, such as if an
input configured as a 4-20 mA Analog Input has its input current out of range. If the I/O pack sets HEALTHnn to False,
BADnn becomes True immediately rather than delaying for the configured number of base health delay periods.
Inputs transition from Unhealthy to Healthy on the first frame they are received as Healthy from an I/O module or
external/UDH/CDH source.

Note For input health information to be viewable in a live data display, for example in Live View, Trender, or the blockware
editor, the input must be connected to either a VAR_HEALTH or AI block.

If LINKOKnn is True, the controller has successfully received the EGD data packet from the I/O pack or other source. If
LINKOKnn is False, the EGD data packet has not been received and HEALTHnn will always be False. Immediately after not
receiving the EGD data packet, LINKOKnn will become False and LINK_UNCERTnn will become True for the configured
number of base health delay periods (or 3 periods for external/UDH/CDH inputs), after which time LINK_BADnn will
become True and LINK_UNCERTnn will become False.
Each VARnn input on the VAR_HEALTH block has separate LINKOKnn, LINK_UNCERTnn, and LINK_BADnn output
pins, even though other inputs may share the same link. The LINKOKnn,, LINK_UNCERTnn, and LINK_BADnn outputs
apply to all of the data from a particular device and may be used as an indication of electronic hardware health (for example,
I/O pack health).

Instruction Guide GEI-100682AK 269


Public Information
The HEALTHnn output for each variable provides the instantaneous status of the variable input. A Healthy value on the
HEALTHnn output implies a Healthy input pin. All Ethernet communication links have a bit error rate, so occasional loss of a
single EGD packet on an Ethernet network is considered normal and is expected. To prevent the HEALTHnn output from an
I/O pack from going False after a single period loss of communication, the base health delay can be configured using the
ToolboxST application. When an I/O network EGD packet is missed, HEALTHnn will become False and UNCERTnn will
become True for the configured period determined by the base health delay. If the I/O network EGD packet continues to be
missed, UNCERTnn will remain True until the base health delay has completed, after which time UNCERTnn becomes False
and BADnn becomes True. All external/UDH/CDH signal inputs operate the same as described above for a base health delay
of 3 periods.
Refer to the section Output Health Status Details for detailed timing.

Note Refer to the table Output Pin States for I/O Pack Inputs.

Note A period refers to the time between consecutive transmissions of the variable. For most variables from I/O packs, the
period corresponds to the frame rate, although certain I/O packs such as PSCA do not always transmit at frame rate. For
variables that derive their health from the health of a received EGD page from another controller, the period depends on the
frame rate of the transmitting source and the associated page period multiplier. From the ToolboxST application, select the
EGD tab to view Period information.

Output Health Status Details


I/O Pack Inputs
For I/O pack variable sources, Bad status could be caused by a communication failure with the I/O pack or by the I/O pack's
determination that the signal is bad based on conditions specific to the I/O pack input (Out of range, and so forth).
The HEALTHnn output status becomes True during the first period in which the controller receives a healthy indication from
the source I/O pack. When the I/O pack determines that the signal is bad, the VAR_HEALTH output status goes Bad during
the first period. For communication failure, VAR_HEALTH outputs act as follows:

• For an I/O network with simplex redundancy, HEALTHnn goes False after the loss of the single input data packet.
• For an I/O network with dual redundancy, HEALTHnn goes False after the loss of both input data packets.
• For an I/O network with TMR redundancy, HEALTHnn goes False after the loss of the second input data packet.

Single Network I/O Pack Input Response to Loss of Input


When an I/O network input on an I/O pack is no longer received, the input is set to Uncertain and the value holds the previous
Healthy input state value for the configured base health delay number of periods. After the base health delay, the value is set
to the default value and the status is set to Bad.
Responses to Loss of Input (Base Health Delay = 3)

Loss of Input
FRAME 1 2 3 4 5
Health Uncertain Bad
Values Hold last Default

270 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Dual Network I/O Pack Input Response to Loss of Input
When both I/O network inputs on an I/O pack are no longer received, the input is set to Uncertain and the value holds the
previous Healthy input state for the configured base health delay number of periods. After the base health delay, the input
value is set to the default value and the status is set to Unhealthy. If only one I/O network input goes Bad, the input value
remains Healthy.

Responses to Loss of Input (Base Health Delay = 3)


Loss of 1st Input Loss of 2nd Input
FRAME 1 2 3 4 5 FRAME 1 2 3 4 5
Health Healthy Health Uncertain Bad
Values 2nd input Values Hold last Default

TMR Network I/O Pack Input Response to Loss of Input


The input value is always calculated from the voted value of the three I/O network inputs. Thus, if more than one network
input goes Unhealthy, the input value is set to the default value and the status is voted to Bad. If only one network input goes
Unhealthy, the input value remains Healthy. The base health delay does not apply to TMR I/O pack inputs.

Responses to Loss of Input


Loss of 1st Input Loss of 2nd Input
FRAME 1 2 3 4 5 FRAME 1 2 3 4 5
Health Healthy Health Uncertain Bad
Values Voted Values Voted Default (from vote)

Note If the VAR_HEALTH block has an anti-voted variable connected as an input, the corresponding VAR_HEALTH
output behaves the same as if the system has simplex redundancy, regardless of the actual redundancy of the system.

Instruction Guide GEI-100682AK 271


Public Information
External Network Inputs
For external network/EGD page sources, including variables received over the UDH or Control Data Highway (CDH)
using EGD pages, HEALTHnn goes False and UNCERTnn becomes True immediately after missing an input packet. After
three periods of missing packets UNCERTnn becomes False and BADnn becomes True. Since EGD pages can be configured
to run at different rates, the health of the variable is verified once each period as configured for that EGD exchange. Each time
an EGD exchange is received, the associated input variables in that exchange are set to Healthy status and a timeout timer for
that exchange is set to four. This timeout timer is then decremented each time the configured time interval occurs. If the
timeout timer reaches zero, all input variables in that exchange are set with an Unhealthy status and the counter remains at
zero until the EGD exchange is successfully received again.

Note UDH and CDH health is not affected by the base health delay configuration. It always becomes BAD on the fourth
period.

In a redundant controller set, inputs from external UDH/CDH sources are not voted and are received independently by each
controller. However, state variables of blocks that use these inputs will be voted. A redundant controller that has lost UDH
connectivity can be provided with the corresponding Designated Controller input signal values and status by the Fault
Tolerant EGD feature.

External Network/EGD Page Response to Loss of Input


When an EGD page is no longer received, the input is set to Uncertain and the previous Healthy input state is held. After three
periods of missed packets, the input is set to Unhealthy.

Responses to Loss of Input


Loss of Input
PERIOD 1 2 3 4 5
Health Uncertain Bad
Values Hold last Hold last

272 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Output Pin States for I/O Pack Inputs
I/O Pack, Output Pins
I/O Network LINK LINK Description
HEALTHnn UNCERTnn BADnn LINKOKnn
Redundancy _UNCERTnn _BADnn
Input is Bad and the
IONet EGD Exchange
0 0 1 0 0 1 has not been received
after the configured
health delay period
Input was set to Bad by
the I/O pack and the
IONet EGD Exchange
0 0 1 0 1 0 has not been received
within the configured
base health delay
period
Input is set to Bad by
Simplex I/O pack, the I/O pack and the
0 0 1 1 0 0
Simplex IONet IONet EGD Exchange is
being received
Input has not been
received within the
configured base health
delay period and the
0 1 0 0 1 0 IONet EGD Exchange
has not been received
within the configured
base health delay
period
Input is Healthy and the
1 0 0 1 0 0 IONet EGD exchange is
being received

Instruction Guide GEI-100682AK 273


Public Information
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, Output Pins
I/O Network LINK LINK Description
HEALTHnn UNCERTnn BADnn LINKOKnn
Redundancy _UNCERTnn _BADnn
Input is Bad and none of
the IONet EGD
Exchanges have been
0 0 1 0 0 1
received after the
configured health delay
period
Input was set to Bad by
the I/O pack and the
IONet EGD Exchange
0 0 1 0 1 0 has not been received
within the configured
base health delay
period
Input is set to Bad by
Simplex I/O pack, the I/O pack and at least
Dual IONet 0 0 1 1 0 0 one IONet EGD
Exchange is being
received
Input has not been
received within the
configured health delay
period and none of the
0 1 0 0 1 0
IONet EGD Exchanges
have been received
within the configured
health delay period
Input is Healthy and at
least one IONet EGD
1 0 0 1 0 0
exchange is being
received
Simplex I/O pack, Configuration not
N/A N/A N/A N/A N/A N/A
TMR IONet allowed
Dual I/O pack, Configuration not
N/A N/A N/A N/A N/A N/A
Simplex IONet allowed

274 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, Output Pins
I/O Network LINK LINK Description
HEALTHnn UNCERTnn BADnn LINKOKnn
Redundancy _UNCERTnn _BADnn
Input is Bad and none of
the IONet EGD
Exchanges have been
0 0 1 0 0 1
received after the
configured health delay
period
Input was set Bad by
the I/O pack and the
IONet EGD Exchange
0 0 1 0 1 0 has not been received
within the configured
base health delay
period
Input is set to Bad by
Dual I/O pack, the I/O pack and at least
Dual IONet 0 0 1 1 0 0 one IONet EGD
Exchange is being
received
Input has not been
received within the
configured health delay
period and none of the
0 1 0 0 1 0
IONet EGD Exchanges
have been received
within the configured
health delay period
Input is Healthy and at
least one IONet EGD
1 0 0 1 0 0
exchange is being
received
Dual I/O Pack, Configuration not
N/A N/A N/A N/A N/A N/A
TMR IONet allowed
TMR I/O pack, Configuration not
N/A N/A N/A N/A N/A N/A
Simplex IONet allowed

Instruction Guide GEI-100682AK 275


Public Information
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, Output Pins
I/O Network LINK LINK Description
HEALTHnn UNCERTnn BADnn LINKOKnn
Redundancy _UNCERTnn _BADnn
Input is Bad and either
none or only one of the
IONet EGD Exchanges
0 0 1 0 0 1
has been received after
the configured health
delay period
Input was set to Bad by
the I/O pack and the
IONet EGD Exchange
0 0 1 0 1 0 has not been received
within the configured
base health delay
period
Input is set to Bad by
the I/O pack and at least
TMR I/O pack,
0 0 1 1 0 0 two IONet EGD
Dual IONet
Exchanges are being
received
Input has not been
received within the
configured health delay
period and either none
0 1 0 0 1 0 or only one of the IONet
EGD Exchanges has
been received within the
configured health delay
period
Input is Healthy and at
least two IONet EGD
1 0 0 1 0 0
exchanges are being
received

276 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, Output Pins
I/O Network LINK LINK Description
HEALTHnn UNCERTnn BADnn LINKOKnn
Redundancy _UNCERTnn _BADnn
Input is Bad and either
none or only one of the
IONet EGD Exchanges
0 0 1 0 0 1
has been received after
the configured health
delay period
Input was set to Bad by
the I/O pack and the
IONet EGD Exchange
0 0 1 0 1 0 has not been received
within the configured
base health delay
period
Input is set to Bad by
the I/O pack and at least
TMR I/O pack,
0 0 1 1 0 0 two IONet EGD
TMR IONet
Exchanges are being
received
Input has not been
received within the
configured health delay
period and either none
0 1 0 0 1 0 or only one of the IONet
EGD Exchanges has
been received within the
configured health delay
period
Input is Healthy and at
least two IONet EGD
1 0 0 1 0 0
exchanges are being
received

Instruction Guide GEI-100682AK 277


Public Information
Inputs
Name Data Type Description
VAR1 Simple Input variable to know the health status
↓ ↓ ↓
VAR32 Simple Input variable to know the health status

Outputs
Name Data Type Description
HEALTH1 BOOL Is input 1 Healthy
↓ ↓ ↓
HEALTH32 BOOL Is input 32 Healthy
LINKOK1 BOOL Link OK for EGD variable 1
↓ ↓ ↓
LINKOK32 BOOL Link OK for EGD variable 32
UNCERT1 BOOL Is input 1 Uncertain
↓ ↓ ↓
UNCERT32 BOOL Is input 32 Uncertain
BAD1 BOOL Is input 1 bad
↓ ↓ ↓
BAD32 BOOL Is input 32 bad
LINK_UNCERT1 BOOL Is EGD link 1 Uncertain
↓ ↓ ↓
LINK_UNCERT32 BOOL Is EGD link 32 Uncertain
LINK_BAD1 BOOL Is EGD link 1 bad
↓ ↓ ↓
LINK_BAD32 BOOL Is EGD link 32 bad

278 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Variable Simulation (VARSIM)
Block Category: System
When enabled, the Variable Simulation (VARSIM) block writes the input values into the output variables and sets the
simulation flag in the variables quality field. When disabled the block removes the simulation flag from the variables quality.
The block is rubber block that may service up to 32 variables. For any Boolean variables, the block uses the pick-up
(PU-DLY) delay pin to specify how long to delay moving a transition from 0 to 1 from an input pin to the output variable. For
any Boolean variables, the block also uses the drop out (DO-DLY) delay pin to specify how long to delay moving a transition
from 1 to 0 from an input pin to the output variable.

VARSIM Block

Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
PU_DLY UINT Pickup Delay - milliseconds to delay a 0 to 1 Boolean transition
DO_DLY UINT Dropout Delay - milliseconds to delay a 1 to 0 Boolean transition
IN1 ANY The unscaled value to be written to the corresponding variable point
↓ ↓ ↓
IN32 ANY The unscaled value to be written to the corresponding variable point

Outputs
Name Data Type Description
OUT1 ANY A variable identifying the variable point to write
↓ ↓ ↓
OUT32 ANY A variable identifying the variable point to write

Instruction Guide GEI-100682AK 279


Public Information
Logic Examples
Annunciation of Temperature Threshold for Mark VIe I/O Packs
The following sample control logic uses MIN_MAX and COMPARE blocks to annunciate a temperature threshold alarm if any
Mark VIe I/O pack is operating at a temperature higher than the specified threshold value. In this example, the IOPackTmpr
signal is in degrees F. The I/O packs have an internal pack electronics temperature sensor that maps to an output signal, which
is used in this logic after creating a connected variable.

Connected variable
PAIC Variable

Panel.Pack_TerminalBoardLocation_Temperature_Pack Connector

Connected Variable Naming Convention


This logic uses groups of I/O packs (based on redundancy) that are located within one expansion panel. It finds the maximum
temperature for each group and compares it to the maximum set temperature. If any single I/O pack exceeds this threshold,
then the alarm Boolean variable is True.

Note There is a standard diagnostic alarm generated from the I/O pack to annunciate operating temperature is out of range.

This alarm could be used as a warning for when the cabinet is getting too hot. This process alarm (typically set at a more
restrictive range than when the diagnostic alarm from the I/O pack is annunciated) does not indicate any immediate danger to
the I/O pack electronics.

Note This example process alarm is typically set at a more restrictive range than the I/O pack diagnostic alarm.

3
Max temp for all simplex

7
Max of the 8
max temp Compare
to temp
threshold

4, 5, 6
Max temp for all TMR

Simplified Logic Explanation

280 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
The Min _Max blocks are arrangements of I /O packs with simplex packs (SMX) At the (7) ordered Min _Max, it finds the Max of the
occurring first in order of operation (3), followed by the R , S, and T packs. Max, and sends that temperature OUT .

Lastly, the Compare block is set for GE (greater


       than or equal to ), and it determines if IN 1 (the I/O

 Each group of packs is sending the pack max temp ) is greater than the overtemp
maximum temperature OUT , and these annunciation threshold , which is the IN 2
are tied to input pins . constant. If True, it sets the output Boolean to
True.

 



Detailed Explanation of Logic

GEI-100682AK Instruction Guide 281


Public Information
Annunciation of Loss of IONet for Mark VIe I/O Packs
The following sample control logic uses AND and RUNG blocks to annunciate an alarm if any Mark VIe I/O pack located in
the expansion panel loses IONet communication. The I/O packs have an internal LINK_OK output variable for the detection
of an Ethernet signal, which is used in this logic after creating a connected variable.

PPDA Variable Connected Variable

Panel.LogicCheckingRelayPack _Location_PackLogic

Connected Variable Naming Convention

This logic uses groups of I/O packs (based on redundancy) that are located within one expansion panel. If all links in each
group of input pins per AND block are okay, the AND block sends a True output.

3
Is link Ok for all simplex?

7
Is link okay for 8
all I /O packs? If False
set alarm
to True

4, 5, 6

Is link Ok for all TMR?

Simplified IONet Logic Explanation

282 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
The AND blocks are arrangements of I/O packs with simplex packs (SMX) At the (7) ordered AND block , it sends True if all input
occurring first in order of operation (3), followed by the R, S, and T packs. pins are True or False if any one or more are False .

Each group of I /O packs is Lastly, the RUNG is set for ~A (if not True).
sending True if all links are Therefore, if the input pin is not True then
Ok or False if any one or the output is True (alarm is annunciated).
Simplex
more links are not Ok .
I/O
packs

TMR I/O
packs

Detailed Explanation of IONet Logic

GEI-100682AK Instruction Guide 283


Public Information
Annunciation of TMR Controller Heartbeat Status Not OK
The following sample control logic uses the MOVE, CALC, COMPARE, NOT, TIMER, LATCH, and RUNG blocks to
annunciate an alarm if the Mark VIe controller (R, S, or T) Heartbeat status remains not okay for 200 ms. This logic is used to
verify the heartbeat is still running (this frame and last frame heartbeats are not the same value), and EGD communication is
still being produced by the controller. The controller heartbeat increments each frame in most instances. However, there are
normal times when this heartbeat might not increment for a few frames. That is why there is a 200 ms TIMER delay before an
issue is announced. The following figure displays a simplified explanation of this logic.

CALC MOVE

ControllerStateHeartbeat Difference between Store this frame’s


last frame and this HB for use in the
frame heartbeat (HB) next frame CALC.

COMPARE TIMER
Is there a Has it been
Controller difference 200 ms since Yes
Yes No
R, S, or T between last there was no
HB is OK frame and difference in
this frame? heart beats?

No Controller
R, S, or T
HB is Not
OK.
RUNG

Yes 
 No
Annunciate Alarm




Simplified Logic Explanation


Each individual controller (R, S, or T) in the set sends its own individual ControllerStateHeartbeat by EGD. The goal of this
logic is to detect a problem with EGD communications within the redundant controllers. Since this communication between
controllers in the redundant set is not a critical control function (whereas the communication from an I/O pack to the
controller set could be critical), it is acceptable for individual EGD packets to be dropped or delayed. That is why it is
necessary to use the TIMER block in this alarm logic. Refer to the following figure.

Note The ControllerStateHeartbeat intrinsic was developed so the ToolboxST application could drive the status screens for
R, S, and T controllers. From the ToolboxST Component Editor Software tab, press F1 for more information on the
ControllerStateHeartbeat intrinsic variable.

284 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
From the Component Editor, EGD, Configuration tab, this intrinsic variable
can be viewed (datatype is UDINT ). This is only the R controller.

(126) CALC finds the difference between this frame and


(125) MOVE takes the global variable last frame heart beat . The initial value of A is zero.
value (SRC) and moves it to the value of Input A is from the output of (128) MOVE.
the local variable (DEST ).
(128) MOVE takes this frames heart beat value (SRC) and moves
it to the value of the new local variable (DEST). This variable is A TIMER block is used because it is acceptable for
used in the previous (126) CALC block. individual IONet packets to be dropped or delayed.

Takes the opposite of the


Boolean input (if True then False) If the (SET) input If input A is not True
If (RUN) input pin is pin is True (heart
(129) COMPARE sends True (OUT) (False) then OUT is
True, TIMER starts. beat issue) True, which means
Boolean if this frame and last frame heart and the L 86MR1 the R controller heart
beat values are the same (the difference If (RESET ) input pin master reset is
CSHB_RD is equal to zero). beat is OK.
is True, then TIMER False at the
resets to zero. (RESET ) input
If the heartbeat is not pin, and the
incrementing for 200 ms (OUT) is currently
(MAXTIME) input pin, then False, then the
TIMER sends a True (OUT) is set to
Boolean out (AT_TIME). True.
The same type of previous logic repeats
for the S and T controllers , then ...

If (A) is not True, then (OUT) is True.


R, S, and T controller If all are True, then (OUT) is True. If any one Therefore If any controller heartbeat is not
heartbeat is okay inputs or more are False then (OUT) is False. okay, then the alarm is annunciated .
Detailed Logic Explanation

GEI-100682AK Instruction Guide 285


Public Information
Selection of Setpoint based on Boolean Logic
The following sample control logic uses the RUNG and SELECT blocks as part of the algorithm for determining the
appropriate schedule type. The three blocks displayed in the following figure are a small part of the overall scheduling task,
which involves a total of 55 blocks. The three RUNG Boolean equations represent the three possible schedules based on the
True or False condition of the input pin variable. The SELECT block sets its output value to the IN# (a REAL variable type)
based on which of the schedules is True (SEL#).

93) If A, B, and C are all True and D is False


then OUT is True, if not OUT is False.

94) If A, B, and C are all True and D is False


then OUT is True, if not OUT is False. 96 ) If SEL1 is True then OUT = IN1. Else if
SEL2 is True then OUT = IN 2. Else if SEL3
is True then OUT = IN 3. Else OUT = CASC.

95) Else if A is True (variable used in previous


two RUNG input pin Ds ) then OUT is True.

286 GEI-100682AK GEI-100682 Mark VIe Controller Standard Block Library


Public Information
Public Information

You might also like