Вы находитесь на странице: 1из 273

GEI-100682AB

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 – This document is 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: Jan 2018


Issued: Sept 2005

© 2005 – 2018 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

For public disclosure


Document Updates
Revision Location Description
Updated for consistency and clarification as to what information applied to I/O
AB Variable Health (VAR_HEALTH)
packs or EGD

AA 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 INTERP_DL A better description of the FTBL input array

Updated to include the UCPA platform, and clarification on hardware sensors that
Temperature Status (TEMP_STATUS)
are only in the UCCx platform

Legacy Category Blocks New section


X
Timer Version 2 New section

Timer Changed to LEGACY category and added example with MOVE

Throughout Updated description of the LEGACY category

2 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Contents
Introduction......................................................................................................................................................7
Changing Data Type of a 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 Empty (ARRAY_EMPTY) ....................................................................................................................... 37
Array Fill (ARRAY_FILL) ................................................................................................................................ 38
Array Find Element (ARRAY_FIND) ................................................................................................................. 39
Array Minimum/Maximum Element Determination (ARRAY_MINMAX) ................................................................. 40
Array Relay Ladder Logic (ARRAY_RUNG) ....................................................................................................... 41
Array Sum (ARRAY_SUM) .............................................................................................................................. 42
Average Input (AVRG) ..................................................................................................................................... 43
Bit Counter (BIT_CNTR).................................................................................................................................. 44
Boolean Alarm (BOOLEAN_ALARM) ............................................................................................................... 45
Bubble Sort (BSORT)....................................................................................................................................... 48
Calculator (CALC) .......................................................................................................................................... 49
Capture Data (CAPTURE) ................................................................................................................................ 51
Theory of Operation...................................................................................................................................... 54
Configuration .............................................................................................................................................. 55
Enabling Collections ..................................................................................................................................... 55
Triggering Issues.......................................................................................................................................... 55
Buffer Control Details ................................................................................................................................... 56
Time Stamping ............................................................................................................................................ 56
Capture Status ............................................................................................................................................. 57
Redundancy Issues ....................................................................................................................................... 57
Memory Use ............................................................................................................................................... 58
Change Detection (CHG_DET) .......................................................................................................................... 59
Clamp (CLAMP) ............................................................................................................................................. 60
Code Timer (CODETIMER) .............................................................................................................................. 62
Comment (_COMMENT) ................................................................................................................................. 64
Comment Block Functionality (_COMMENT_BF) ................................................................................................ 64
Comment No Break (_COMMENT_NB) ............................................................................................................. 65
Compare (COMPARE) ..................................................................................................................................... 66
Compress Boolean (COMPRESS)....................................................................................................................... 71
Compress to Long Integer (COMPRESS_UDI) ..................................................................................................... 72
Controller Monitor (CTRLR_MON).................................................................................................................... 73
Count Down (CTD) ......................................................................................................................................... 79
Count Up (CTU).............................................................................................................................................. 80
Decode (IN_DECODE) .................................................................................................................................... 81
Derivative (DERIVATIVE)................................................................................................................................ 82
Device Heartbeat (DEVICE_HB) ....................................................................................................................... 83

Instruction Guide GEI-100682AB 3


For public disclosure
Divide (DIV) .................................................................................................................................................. 84
Equal (EQ) ..................................................................................................................................................... 85
Expand Integer (EXPAND)................................................................................................................................ 87
Expand Long Integer (EXPAND_UDI) ................................................................................................................ 88
Finite Impulse Response (FIR) ........................................................................................................................... 90
Function Generator (FUNGEN).......................................................................................................................... 92
Greater Than, Equal To (GE) ............................................................................................................................. 94
Get From Array (GET) ..................................................................................................................................... 96
Greater Than (GT) ........................................................................................................................................... 97
Infinite Impulse Response (IIR).......................................................................................................................... 99
Integrator With Lead (INTWLEAD)...................................................................................................................101
Integrator, Selectable Algorithm (INTEG) ...........................................................................................................103
Interpolator (INTERP) .....................................................................................................................................105
Interpolator DL (INTERP_DL) .........................................................................................................................107
Lag Filter (LAG) ............................................................................................................................................109
Latch (LATCH) ..............................................................................................................................................111
Lead, Lag (LEAD_LAG) .................................................................................................................................112
Less Than (LT)...............................................................................................................................................114
Less Than, Equal To (LE).................................................................................................................................116
Limit Detect Manual (LD_MAN) ......................................................................................................................118
Logic Builder (LOGIC_BUILDER) ...................................................................................................................121
Logic Builder State Change (LOGIC_BUILDER_SC) ...........................................................................................132
Logical AND (AND).......................................................................................................................................134
Logical NAND (NAND) ..................................................................................................................................135
Logical NOR (NOR) .......................................................................................................................................136
Logical NOT (NOT)........................................................................................................................................137
Logical OR (OR) ............................................................................................................................................138
Logical XNOR (XNOR) ..................................................................................................................................139
Logical XOR (XOR) .......................................................................................................................................140
Median Selector with Enable (MEDIAN) ............................................................................................................141
Minimum, Maximum (MIN_MAX) ...................................................................................................................142
Configuring Matrix Blocks ...............................................................................................................................143
Matrix Addition Subtraction (MADDSUB)..........................................................................................................149
Matrix Concatenation (MCONCAT)...................................................................................................................151
Matrix Dot Division (MDOTDIV) .....................................................................................................................154
Matrix Dot Multiplication (MDOTMUL) ............................................................................................................156
Matrix Fill (MFILL)........................................................................................................................................158
Matrix Find (MFIND) .....................................................................................................................................161
Matrix Inverse (MINV)....................................................................................................................................163
Matrix Minimum/Maximum Element Determination (MMINMAX) .........................................................................164
Matrix Multiplication (MMUL) .........................................................................................................................166
Matrix Submatrix Selection (MSUBMATRIX) .....................................................................................................168
Matrix Switch Block (MSVCH) ........................................................................................................................170
Matrix Transpose (MTRN) ...............................................................................................................................172
Mode Select (MODSEL)..................................................................................................................................173
Move (MOVE)...............................................................................................................................................175

4 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Move Truncated (MOVE_DT) ..........................................................................................................................176
Move Truncated (MOVE_IT)............................................................................................................................177
Mult (MULT).................................................................................................................................................178
NaN Breaker (NAN_BREAKER) ......................................................................................................................179
NaN Check (NANCHECK) ..............................................................................................................................180
Negate (NEGATE)..........................................................................................................................................181
Not Equal (NE) ..............................................................................................................................................182
On Off Delay (ON_OFF_DELAY).....................................................................................................................184
Parity Check (PARITY_CHK) ..........................................................................................................................185
Prevote (PREVOTE) .......................................................................................................................................186
Proportional Integral Derivative Control (PID) .....................................................................................................189
Pulse (PULSE)...............................................................................................................................................193
Pulse Extended (PULSE_EXT) .........................................................................................................................194
Pushbutton (P_B) ...........................................................................................................................................195
Put Into Array (PUT).......................................................................................................................................196
Rate Limiter (RATELIM) .................................................................................................................................197
Rate Monitor (RATEMON) ..............................................................................................................................199
Relay Ladder Logic (RUNG) ............................................................................................................................201
Rotary Switch (ROTARY_SW) .........................................................................................................................202
Round (ROUND) ...........................................................................................................................................203
Select (SELECT) ............................................................................................................................................204
Selector (SELECTOR).....................................................................................................................................205
Sequence Branch Block - TMR (SBB) ................................................................................................................207
Sequence Manager Block - TMR (SMGR)...........................................................................................................209
Sequence Merge Block - TMR (SMB) ................................................................................................................211
Sequence Step Block - TMR (SSB) ....................................................................................................................213
Set Array (SETARRY).....................................................................................................................................216
Square Root (SQRT) .......................................................................................................................................217
Status Combine (STATUS_COMBINE) ..............................................................................................................218
Status Monitoring ...........................................................................................................................................223
Status Block Types ......................................................................................................................................223
Status_Region.............................................................................................................................................224
Sub_Status .................................................................................................................................................224
Limit_Status...............................................................................................................................................224
Status Input Verification ...............................................................................................................................224
Status Tables ..............................................................................................................................................225
Status Split (STATUS_SPLIT) ..........................................................................................................................230
Steer (STEER) ...............................................................................................................................................231
Subtract (SUB)...............................................................................................................................................232
Switch (SWITCH) ..........................................................................................................................................233
System Outputs (SYS_OUTPUTS) ....................................................................................................................234
Task Scan (SCAN)..........................................................................................................................................235
Temperature Status (TEMP_STATUS) ................................................................................................................236
Time Monitor (TIME_MON) ............................................................................................................................239
Timer (TIMER)..............................................................................................................................................242
Timer Version 2 (TIMER_V2)...........................................................................................................................244
Totalizer (TOTALIZER) ..................................................................................................................................246
Transfer Function (TRNFUN) ...........................................................................................................................248

Instruction Guide GEI-100682AB 5


For public disclosure
Transport Delay (TRAN_DLY) .........................................................................................................................250
Transport Delay Version 2 (TRAN_DLY_V2) ......................................................................................................251
Unit Delay (UNIT_DELAY) .............................................................................................................................252
User Scheduled Block Heartbeat (USB_HB) ........................................................................................................253
UTC Time (UTC_TIME) .................................................................................................................................254
Variable Alarm Status (VAR_ALARM_STATUS) ................................................................................................255
Variable Health (VAR_HEALTH) ......................................................................................................................256
Variable Simulation (VARSIM) .........................................................................................................................266
Logic Examples..............................................................................................................................................267
Annunciation of Temperature Threshold for Mark VIe I/O Packs..........................................................................267
Annunciation of Loss of IONet for Mark VIe I/O Packs......................................................................................269
Annunciation of TMR Controller Heartbeat Status Not OK .................................................................................271

6 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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
Pin expects a variable that is an array of the size indicated
[ ] suffixed with square brackets (STATE[4])
within the brackets

Instruction Guide GEI-100682AB 7


For public disclosure
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 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 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-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Changing Data Type of a 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.

From the Block Data Type


drop down list , select a valid
data type for the block.

Instruction Guide GEI-100682AB 9


For public disclosure
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_BF _COMMENT _COMMENT is equivalent to the current functionality of _COMMENT_BF
_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 TRAN_DLY_V2 TRAN_DLY_V2 corrects existing issues with TRAN_DLY, which could not be made backwards
compatible

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

10 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Absolute Value (ABS)
Block Category: ABS, 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, Changing Data Type of a
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-100682AB 11


For public disclosure
Add (ADD)
Block Category: ADD, 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, Changing Data Type of a
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-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Analog Alarm (ANALOG_ALARM)
Block Category: ANALOG_ALARM, 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.

Note Alarm bits must be enabled to display as pins.

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.

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

ANALOG_ALARM Block

Instruction Guide GEI-100682AB 13


For public disclosure
(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.

From the Editor Tree


View, expand Alarm
System and right-click
Alarm Block Template.

Enter a name for the


Analog Alarm block
template and click OK.

14 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
2. If any attributes are required for the block template, create or add attributes as needed. From the Tree View, expand the
block template and select Attributes.

Enter and define any


attributes as needed for
the alias properties.

From the Editor Tree


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

Instruction Guide GEI-100682AB 15


For public disclosure
ToolboxST Configuration

➢ To insert the block in the ToolboxST application


1. From the Tree View, select a task in to display the Block Diagram Editor in the Summary View.

From the Library View,


select the Analog
Alarm block and drag
and drop into the
Diagram Editor.

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

Add values to the


SubVariables and click OK.

16 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Analog Alarm Block Inserted
2. Double-click the IN pin and connect the global variable to the input.

Select Global Variable.


Select Create variable
and enter the variable
name, or click Browse
Globals to select a
variable. Click OK.

Global Variable Connected to Input

Instruction Guide GEI-100682AB 17


For public disclosure
3. From the Block Diagram Editor, double-click the Analog Alarm block.

Select the variable name.

From the Property Editor,


select Alarm and select an
available Analog Alarm
Definition from the drop
down menu.

18 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Select an Alarm Type
property and select True
from the drop down menu to
change the value from
False to True.

Select the Alarm Shelving


property and select
Enabled from the drop
down menu.

Instruction Guide GEI-100682AB 19


For public disclosure
Verify that the correct
variables display for each
alarm created, then close
the window.

20 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
4. From the Tree View, right-click ANALOG_ALARM_1.

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

Instruction Guide GEI-100682AB 21


For public disclosure
6. Configure the alarm parameters. From the Summary View, right-click the ANALOG_ALARM_1 block.

From the shortcut


menu, select Edit
Block Pins.

22 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Instruction Guide GEI-100682AB 23
For public disclosure
Inputs
Name Data Type Description
IN ANY_NUM Connect to a Numeric variable to document its alarm configuration
When set to True, all configured alarm levels for this variable are
INH† Boolean
inhibited
Unshelve†† Boolean 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

24 GEI-100682AB Mark VIe Controller Standard Block Library


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

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
H, HH, HHH or L, LL,
HYST ANY_NUM Hysteresis for the analog alarm (type must match IN)
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 Unacknowledged alarm state
Auto Reset Boolean is reached when the process returns within normal limits, and the N/A
alarm clears automatically before an operator has acknowledged
the alarm condition.
Enable or disable the ability for an operator to shelve an alarm. A
Alarm shelved alarm will temporarily be removed from the alarm display,
Boolean N/A
Shelving 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-100682AB 25


For public disclosure
Any Forces (ANY_FORCES)
Block Category: ANY_FORCES, 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 Boolean True if any variables are forced

OUTPUT
Name Data Type Description
NUMVARS Integer Number of variables currently forced

26 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Application State (APP_STATE)
Block Category: APP_STATE, System

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

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

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-100682AB 27


For public disclosure
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

Note Removing the APP_STATE block from an application is not recommended after the block has been added.

The user must be very careful if choosing to delete an APP_STATE block. Before deleting the APP_STATE block, the
DOWNLOAD_OK and REBOOT_OK input pins must be forced to True. Only after forcing these inputs to True, and
verifying, then the user can safely delete the block from the application.
Precautions Before Relocating the APP_STATE Block
Before relocating the APP_STATE block, the user must force the DOWNLOAD_OK and REBOOT_OK input pins to True.
After forcing the inputs to True, and verifying, then the user can safely relocate the block.
Precautions Before Causing Major Revision Mismatch
Actions including compressing variables and changing the network redundancy can cause a major revision mismatch. Before
such actions are performed, the user must force the DOWNLOAD_OK and REBOOT_OK input pins to True. After forcing
the inputs to True, and verifying, the user can safely perform any action that could cause a major revision mismatch, and then
download to the controller.
Inputs
Name Data Type Description
When set to True, the controller allows downloads to occur. When set to
DOWNLOAD_OK Boolean
False, the controller rejects downloads.
When set to True, the controller allows reboots to occur. When set to False,
REBOOT_OK Boolean
the controller rejects reboots.

Output

Name Data Type Description


DOWNLOADING Boolean True when a download is in progress

28 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Array Average (ARRAY_AVERAGE)
Block Category: ARRAY_AVRG, Math
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
Average Linear
2 down into its corresponding x and y components. x(n)=cosine(IN(n)), y(n)=sine(IN(n)). The
Angle
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:
Average Cosine y(n) = abs(IN(n))/IN(n) x arccos(abs(IN(n))).
3
Phi 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 Boolean Enable the block to run
IN Real/LReal Array Input Variable Array
TYPE ENUM(Integer) Average Type
N Unsigned double integer Constant number of IN values to average
INDEX_ENABLE Boolean Array Defines which array elements are included in the average.

Output
Name Data Type Description
OUT Real Current average

Instruction Guide GEI-100682AB 29


For public disclosure
Array Calculator (ARRAY_CALC)
Block Category: ARRAY_CALC, Math
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, Changing Data Type of a
Variant Block.

30 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
ARRAY_CALC Block

Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
A Any_num_array† First operand
↓ ↓ ↓
H Any_num_array† Eighth operand
Number of element of the array to
N Unsigned integer
evaluate.
Defines which array elements are
INDEX_ENABLE Boolean Array
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-100682AB 31


For public disclosure
Array Compare (ARRAY_COMPARE)
Block Category: ARRAY_COMPARE, Comparison
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, Changing Data Type of a
Variant Block.

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

32 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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-100682AB 33


For public disclosure
Greater Than or Equal To

Equal To

34 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Not Equal

Less Than or Equal To

Instruction Guide GEI-100682AB 35


For public disclosure
Less Than

Inputs
Name Data Type Description
IN1 Any_num_array The input to compare
IN2 Any_num_array The input to compare against
The comparison function (GT, LT, GE, LE, EQ, NE), default
FUNC ENUM (integer)
value is GT
HYST Any_num The hysteresis value
SENS Any_num The sensitivity value
N Unsigned double integer Number of elements in comparison

Output
Name Data Type Description
OUT Boolean Array The result of the comparison

36 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Array Empty (ARRAY_EMPTY)
Block Category: ARRAY_EMPTY, 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 Boolean Block enable (default is 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-100682AB 37


For public disclosure
Array Fill (ARRAY_FILL)
Block Category: ARRAY_FILL, 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 Boolean Block enable (default is TRUE)
OUT_INDEX Unsigned long 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

38 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Array Find Element (ARRAY_FIND)
Block Category: ARRAY_FIND, 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, Changing Data Type of a Variant Block.

ARRAY_FIND Block

Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
Integer zero-based array index to begin searching from (default of
0, or beginning of the array). This should be less than the size of
IN_INDEX Unsigned Double Integer
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
SENS Any_num
type. If SENS is less than 0, it will be treated as 0.

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

Instruction Guide GEI-100682AB 39


For public disclosure
Array Minimum/Maximum Element Determination
(ARRAY_MINMAX)
Block Category: ARRAY_MINMAX, 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 Boolean Enable the block to run
N Constant Unsigned Integer Number of elements in input array IN
INDEX_ENABLE Boolean Array Defines which array elements determine MAX/MIN
IN[ ] Any_num Array Array holding elements
Choice of operation { 0 for Maximum,1 for Minimum
FUNC Constant Unsigned Integer
}

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

40 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Array Relay Ladder Logic (ARRAY_RUNG)
Block Category: ARRAY_RUNG, Boolean Operations
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 Boolean Array Required Boolean input used in equation
↓ ↓ ↓
P Boolean Array Boolean input used in the equation
NVal Unsigned double integer Number of elements to evaluate

Output
Name Data Type Description
OUT_ARRAY Boolean Array The result of the equation

Instruction Guide GEI-100682AB 41


For public disclosure
Array Sum (ARRAY_SUM)
Block Category: ARRAY_SUM, Math
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 Boolean Enable the block to run
IN Real/LReal Array Input Variable Array
N Unsigned double integer Constant number of IN values to be summed
Defines which array elements are included in the
INDEX_ENABLE Boolean Array
summation

Output
Name Data Type Description
OUT Real Current sum

42 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Average Input (AVRG)
Block Category: AVRG, 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 Boolean Block enable (default is TRUE)
IN Real† Last input to be included in the rolling average
PRESET Boolean 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 at
ARRAY[N] Real
least N elements
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AB 43


For public disclosure
Bit Counter (BIT_CNTR)
Block Category: BIT_CNTR, 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 Boolean Input Boolean variable 1
↓ ↓ ↓
IN32 Boolean Input Boolean variable 32

Output
Name Data Type Description
COUNT Unsigned Integer Number of input bits set to TRUE

44 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Boolean Alarm (BOOLEAN_ALARM)
Block Category: BOOLEAN_ALARM, 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.

From the Library View,


select the
BOOLEAN_ALARM
block and drag and
drop into the Diagram
Editor.

Inserted BOOLEAN_ALARM Block

Instruction Guide GEI-100682AB 45


For public disclosure
2. Double-click the IN pin and connect the global variable to the input.

Select Global Variable.


Select 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


3. From the Block Diagram Editor, double-click the BOOLEAN_ALARM block.

Select the
variable name.

46 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
From the Property
Editor, select Alarm.
From the drop-down
list, select Alarmed.

Configured BOOLEAN_ALARM Block

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

Instruction Guide GEI-100682AB 47


For public disclosure
Bubble Sort (BSORT)
Block Category: BSORT, 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 Boolean Block enable (default is False)
N Unsigned Double Integer 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[ ] Unsigned Double Integer The mapping used to take the source array to the destination array

48 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Calculator (CALC)
Block Category: CALC, Math

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

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 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.

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).
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, Changing Data Type of a
Variant Block.

Instruction Guide GEI-100682AB 49


For public disclosure
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 Boolean Block enable (default is 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.

50 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Capture Data (CAPTURE)
Block Category: CAPTURE, 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

Instruction Guide GEI-100682AB 51


For public disclosure
Inputs
Name Data Type Function Description
The sensitivity applied to the trigger condition for trigger evaluation – default
is Level
Constant Tr_
TR_TYPE Trigger Type Edge (1) – If the current trigger condition is True and the previous trigger
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 Automatic
AUTOENA buffer is uploaded. Note if automatic enabling is selected all manual enable
Boolean Enable
inputs are ignored - default is False
Constant
Automatic The number of seconds after the last upload before capturing is re-enabled
ATOUT Unsigned Long
Enable Timeout (only applicable if AUTOENA is True) – default is 60 seconds
Integer
Buffer Control – Controls how and when the data is collected – default is
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.


Constant Buf_
BUF_CTL Buffer Control The buffer contains the newest PRE_SAM + POSTSAM samples unless
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 Boolean 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 is False
Allows data to be collected slower than the performance rate of the block
Constant (scan period) by specifying a multiple of the scan period for samples to be
Sample Period
FMULT Unsigned taken (only applies to Normal and Circular buffer control) – default is 1
Multiplier
Integer
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 Unsigned Long
Sample Size default is 100
Integer
Constant
Pre Trigger
PRE_SAM Unsigned Long The number of samples to collect prior to the trigger event – default is 10
Sample Size
Integer

52 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 is NE

EQ (1) – TR_VAR must equal to TR_VAL

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


TR_COND
Cond_T Condition
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 Long The value compared against the trigger variable for trigger evaluation –
TR_VAL Trigger Value
Real default is 0
TR_VAR Any Trigger Variable The variable against which the trigger condition is evaluated – default is 0
Time Stamp If True, the UTC time of each sample is collected with the sample – default is
TSTAMP Const Boolean
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.

UPL_TYPE Upl_Type_T 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
three samples are preserved after which the oldest one is overwritten. This
works only when the BUF_CTL is set to NORMAL.

Instruction Guide GEI-100682AB 53


For public disclosure
Outputs
Name Data Type Function Description
The current status of the capture:
DISABLED (0) – Not running
WAITING FOR TRIGGER (1) – Collecting pre-trigger
samples
CAPTURING (2) – Collecting post-trigger samples
STATUS Unsigned Integer Capture Status
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 Boolean 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.

54 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Enabling Collections

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.

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.

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.

Instruction Guide GEI-100682AB 55


For public disclosure
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.

56 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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

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

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.

Instruction Guide GEI-100682AB 57


For public disclosure
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

58 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Change Detection (CHG_DET)
Block Category: CHG_DET, 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, Changing Data Type of a Variant Block.

Inputs
Name Data Type Description
IN Any The variable to watch
The maximum numerical difference (deadband) that will not be detected. This
DBAND Any
pin is inactivated for CHG_DET_B.
The range around zero (near zero band) that when entered by IN will cause
NZBAND Any OUT to 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 Last value of the input
NZFLAG Boolean Near Zero Flag. Not used for CHG_DET_B.

Instruction Guide GEI-100682AB 59


For public disclosure
Clamp (CLAMP)
Block Category: CLAMP, 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, Changing Data Type of a
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.

60 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean 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 Boolean Output is clamped at HILIM
IN_MIN Boolean Output is clamped at LOLIM
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AB 61


For public disclosure
Code Timer (CODETIMER)
Block Category: CODETIMER, 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

62 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
OFFSET Unsigned Integer Calibration offset in microseconds
PBAND Real Minimum time of sweep in microseconds to collect statistics on

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

State

Name Data Type Description


DTIME Long Real Internal State Variable

Instruction Guide GEI-100682AB 63


For public disclosure
Comment (_COMMENT)
Block Category: COMMENT, 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).

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).

64 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Comment No Break (_COMMENT_NB)
Block Category: COMMENT_NB, 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).

Instruction Guide GEI-100682AB 65


For public disclosure
Compare (COMPARE)
Block Category: COMPARE, 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 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.

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 Changing Data Type of a
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

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.

66 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Greater Than

Greater Than or Equal To

Instruction Guide GEI-100682AB 67


For public disclosure
Equal To

Not Equal

68 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Less Than or Equal To

Less Than

Instruction Guide GEI-100682AB 69


For public disclosure
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 value is GT
HYST Any_num The hysteresis value
SENS Any_num The sensitivity value

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

70 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Compress Boolean (COMPRESS)
Block Category: COMPRESS, 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. The EXPAND
block performs the opposite operation of the COMPRESS block.

COMPRESS Block

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

Output
Name Data Type Description
OUT Unsigned Integer Contains the packed information

Instruction Guide GEI-100682AB 71


For public disclosure
Compress to Long Integer (COMPRESS_UDI)
Block Category: COMPRESS_UDI, 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.
The COMPRESS_UDI block performs the opposite operation of the EXPAND_UDI block.

COMPRESS_UDI Block

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

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

72 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Controller Monitor (CTRLR_MON)
Block Category: CTRLR_MON, System

Note From the ToolboxST Component Editor Software tab, press F1 for more information on the ControllerStateHeartbeat
intrinsic variable.CTRLR_MON creates global variables that can be used throughout the controller application logic.Only
one instance of this block is allowed per controller set.

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.
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.
• 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 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).

Instruction Guide GEI-100682AB 73


For public disclosure
CTRLR_MON Block

74 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Mark VIe Controller Platforms
Output Pins UCCA UCCC UCSA UCSBH1/H4 UCSBH3 UCSC
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_
Number of forced signals in the application
NUM
True: CPU True: CPU True: CPU
True: CPU
temperature too True: CPU temperature too temperature too
temperature too
high Not Applicable temperature too high high high
OVERTEMP_R high
False: CPU (False) False: CPU False: CPU False: CPU
False: CPU
temperature temperature normal temperature temperature
temperature normal
normal normal normal
True: CPU True: CPU True: CPU
True: CPU
temperature too True: CPU temperature too temperature too
temperature too
high Not Applicable temperature too high high high
OVERTEMP_S high
False: CPU (False) False: CPU False: CPU False: CPU
False: CPU
temperature temperature normal temperature temperature
temperature normal
normal normal normal
True: CPU True: CPU True: CPU
True: CPU
temperature too True: CPU temperature too temperature too
temperature too
high Not Applicable temperature too high high high
OVERTEMP_T high
False: CPU (False) False: CPU False: CPU False: CPU
False: CPU
temperature temperature normal temperature temperature
temperature normal
normal normal 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
True: R Controller
Fan1 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN1_FAIL_R
(False) (False) (False) (False) False: R (False)
Controller Fan1 is
functioning
True: S Controller
Fan1 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN1_FAIL_S
(False) False) (False) (False) False: S (False)
Controller Fan1 is
functioning

Instruction Guide GEI-100682AB 75


For public disclosure
Mark VIe Controller Platforms (continued)
True: T Controller
Fan1 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN1_FAIL_T
(False) (False) (False) (False) False: T Controller (False)
Fan1 is
functioning
True: R Controller
Fan2 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN2_FAIL_R
(False) (False) (False) (False) False: R (False)
Controller Fan2 is
functioning
True: S Controller
Fan2 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN2_FAIL_S
(False) (False) (False) (False) False S Controller (False)
Fan2 is
functioning
True: T Controller
Fan2 not
Not Applicable Not Applicable Not Applicable Not Applicable functioning Not Applicable
FAN2_FAIL_T
(False) (False) (False) (False) False: T Controller (False)
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

Inputs
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

76 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Outputs (continued)
Initial Interface
Name Description Type Visibility Usage
Value Type
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

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
Not
POWER_UP Controller Powered Up N/A False N/A Read Only
Alarmed
SIG_FORCED Signal Forced In Controller Alarmed Diag False N/A Read Only
Not
SIG_FORCED_NUM Number of Forced Signals N/A False N/A Read Only
Alarmed
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
Not
ONLINE_R R Controller Online N/A False $Default Read Only
Alarmed
Not
ONLINE_S 1 S Controller Online N/A False $Default Read Only
Alarmed

Instruction Guide GEI-100682AB 77


For public disclosure
Global Variables (continued)
EGD
Alarm External
Global Pin Name Description Alarm Event Default
Class Access
Page
Not
ONLINE_T 2 T Controller Online N/A False $Default Read Only
Alarmed
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

78 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Count Down (CTD)
Block Category: CTD, 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 Boolean Decrements counter upon rising edge
MAX_CNT Unsigned double integer Value to start countdown
RESET Boolean Sets counter to MAX_CNT
ENABLE Boolean Permissive for block performance

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

Instruction Guide GEI-100682AB 79


For public disclosure
Count Up (CTU)
CTU, 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 Boolean Increments counter upon rising edge
MAX_CNT Unsigned Double Integer Maximum count value
RESET Boolean Sets counter to zero
ENABLE Boolean Permissive for block performance

Outputs
Name Data Type Description
AT_CNT Boolean True when CUR_CNT reaches MAX_CNT
CUR_CNT Unsigned Double Integer Current count value

80 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Decode (IN_DECODE)
Block Category: IN_DECODE, 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

Instruction Guide GEI-100682AB 81


For public disclosure
Derivative (DERIVATIVE)
Block Category: DERIVATIVE, 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 is 0)
TC Real† Time constant for smoothing (sec) (default is 0)
ENABLE Boolean Block enable (default is 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.

82 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Device Heartbeat (DEVICE_HB)
Block Category: DEVICE_HB, 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

Instruction Guide GEI-100682AB 83


For public disclosure
Divide (DIV)
Block Category: BlDIV, 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, Changing Data Type of a
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.

84 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Equal (EQ)
Block Category: EQ, 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, Changing Data Type of a
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.

Instruction Guide GEI-100682AB 85


For public disclosure
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 Boolean The result of the comparison

86 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Expand Integer (EXPAND)
Block Category: EXPAND, 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 OUT15. The COMPRESS block performs the opposite operation.

EXPAND Block

Input
Name Data Type Description
IN Unsigned Integer Value to expand

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

Instruction Guide GEI-100682AB 87


For public disclosure
Expand Long Integer (EXPAND_UDI)
Block Category: EXPAND_UDI, 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.

EXPAND_UDI Block

88 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Input

Name Data Type Description


IN Unsigned Long Integer Value to expand

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

Instruction Guide GEI-100682AB 89


For public disclosure
Finite Impulse Response (FIR)
Block Category: FIR, 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.

90 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
IN Real† Current input
GAIN [ ] Real Gain array, this array must be defined with at least N elements
PRESET Boolean Preset flag. The default value is 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

Instruction Guide GEI-100682AB 91


For public disclosure
Function Generator (FUNGEN)
Block Category: FUNGEN, 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

92 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is 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 valueThe default value is "Step"
Maximum value of the output (unless the initial value of the output is already
MAX_VAL Real greater 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
PERIOD1 Real
of the square wave function
Minimum value of the output. For proper operation MIN_VAL should be less than
MIN_VAL Real
or 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

Instruction Guide GEI-100682AB 93


For public disclosure
Greater Than, Equal To (GE)
Block Category: GE, 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, Changing Data Type of a
Variant Block.

94 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 Boolean Result of the comparison

Instruction Guide GEI-100682AB 95


For public disclosure
Get From Array (GET)
Block Category: GET, 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, Changing Data Type of a Variant Block.

GET Block

Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
SRC[ ] Any Source array

N Unsigned Double Integer Source array index (0 based, interpreted internally as unsigned)

Output

Name Data Type Description


DEST Any Destination variable

96 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Greater Than (GT)
Block Category: GT, 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, Changing Data Type of a
Variant Block.

GT Block

Instruction Guide GEI-100682AB 97


For public disclosure
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 Boolean The result of the comparison

98 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Infinite Impulse Response (IIR)
Block Category: IIR, 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-100682AB 99


For public disclosure
Inputs
Name Data Type Description
ENA_FIL Boolean 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 Unsigned integer 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

100 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Integrator With Lead (INTWLEAD)
Block Category: INTWLEAD, 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-100682AB 101


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
HILIM Real Upper clamp
IN Real† Value to be integrated
LD_FREQ Real Lead frequency in radians/second
LOLIM Real Lower clamp
PRESET Boolean Preset command (default is 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 Boolean Output is clamped at HILIM
IN_MIN Boolean Output is clamped at LOLIM
† Value with status, if status option is enabled.

102 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Integrator, Selectable Algorithm (INTEG)
Block Category: INTEG, 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-100682AB 103


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is False)
IN Real† Value to be integrated
GAIN Real Integrator gain
HILIM Real Maximum allowed output
LOLIM Real Minimum allowed output
INTMETH ENUM (Unsigned integer) Integration method (EULER or TUSTIN)
PRESET Boolean 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 Boolean Output is clamped at HILIM
IN_MIN Boolean Output is clamped at LOLIM
† Value with status, if status option is enabled.

104 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Interpolator (INTERP)
Block Category: INTERP, 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. The OUT is then 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 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 INPUT is not within the range of the argument table elements. The slope M is calculated as follows when INPUT is within
the limits of the argument table; 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-100682AB 105


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
IN Real† Input value
N Unsigned double integer Number of elements in the 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 the output function
†Value with status, if status option is enabled.

106 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Interpolator DL (INTERP_DL)
Block Category: INTERP_DL, 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-100682AB 107


For public disclosure
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.

108 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Lag Filter (LAG)
Block Category: LAG, 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-100682AB 109


For public disclosure
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 Boolean Block enable (default is 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.

110 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Latch (LATCH)
Block Category: LATCH, 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 Boolean Set input

RESET Boolean Reset input (default is False)

RDOM Boolean If True RESET dominates the latch, else SET dominates (default is False)

Output
Name Data Type Description
OUT Boolean 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 or
STATUS Boolean 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-100682AB 111


For public disclosure
Lead, Lag (LEAD_LAG)
Block Category: LEAD_LAG, 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.

112 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Instruction Guide GEI-100682AB 113


For public disclosure
Less Than (LT)
Block Category: LT, 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, Changing Data Type of a
Variant Block.

114 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 Boolean The result of the comparison

Instruction Guide GEI-100682AB 115


For public disclosure
Less Than, Equal To (LE)
Block Category: LE, 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, Changing Data Type of a
Variant Block.

116 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 Boolean Result of the comparison

Instruction Guide GEI-100682AB 117


For public disclosure
Limit Detect Manual (LD_MAN)
Block Category: LD_MAN, 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

118 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
LD_MAN Block Functional Diagram

Instruction Guide GEI-100682AB 119


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is 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 Boolean Indicates that the input variable is in the HIGH-HIGH limit
H_STAT Boolean Indicates that the input variable is in the HIGH limit
N_STAT Boolean Indicates that the input variable is not in any limit condition
L_STAT Boolean Indicates that the input variable is in the LOW limit
LL_STAT Boolean Indicates that the input variable is in the LOW-LOW limit

120 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Logic Builder (LOGIC_BUILDER)
Block Category: LOGIC_BUILDER, 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.

Instruction Guide GEI-100682AB 121


For public disclosure
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

122 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Instruction Guide GEI-100682AB 123


For public disclosure
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

124 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Instruction Guide GEI-100682AB 125


For public disclosure
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:

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.

126 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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
LOGIC
EQN STRING 0 IN1 Always Const
EQUATION
TYP LOGIC TYPE UINT 0 {Type} Always Input
IN1 INPUT 1 BOOL 0 False Always Input
INPUT 1
IN1T TOGGLE BOOL 0 False Always State
VALUE
INPUT 1
TOGGLE
IN1TE BOOL 0 False Always Input
ENABLE FROM
HMI
INPUT 1
IN1TP TOGGLE BOOL 0 False Always Const
PERMITTED
IN2 INPUT 2 BOOL 0 False Always Input
INPUT 2
IN2T TOGGLE BOOL 0 False Always State
VALUE
INPUT 2
TOGGLE
IN2TE BOOL 0 False Always Input
ENABLE FROM
HMI
INPUT 2
IN2TP TOGGLE BOOL 0 False Always Const
PERMITTED
↓ ↓ ↓ ↓ ↓ ↓ ↓
↓ ↓ ↓ ↓ ↓ ↓ ↓
IN32 INPUT 32 BOOL 0 False Always Input
INPUT 32
IN32T TOGGLE BOOL 0 False Always State
VALUE

Instruction Guide GEI-100682AB 127


For public disclosure
Inputs (continued)
Name Description Type Array Initial Value Visibility Usage
INPUT 32
TOGGLE
IN32TE BOOL 0 False Always Input
ENABLE FROM
HMI
INPUT 32
IN32TP TOGGLE BOOL 0 False Always Const
PERMITTED

Outputs
Name Description Type Array Initial Value Visibility Usage
TEST STRING
{Device}{Type} FOR THE BOOL 0 False Always Output
EQUATION
OUTPUT NO_PERM -NO_
OUT UINT 0 Always Output
ENUMERATION BYPASS
BOOLEAN
OUT_VAL OUTPUT BOOL 0 False Always Output
STATUS
INPUTS IN
TOGGLE
OUT_TGL BOOL 0 False Always Output
ENABLED
MODE

128 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Global Pins (Automatically Created for an Auto Permit Type Block)
External
Global Pin Name Description Alarm Event EGD Page
Access
TEST STRING FOR THE
00LOG_BLD1000AU_PMT Not Alarmed False $DEFAULT Read Only
EQUATION
00LOG_BLD1000AU_PMT.IN1 INPUT 1 Not Alarmed False $DEFAULT Read Only
INPUT 1 TOGGLE
00LOG_BLD1000AU_PMT.IN1T Not Alarmed False $DEFAULT Read Only
VALUE
INPUT 1 TOGGLE
00LOG_BLD1000AU_PMT.IN1TE Not Alarmed *IN1TP $DEFAULT Read Only
ENABLE FROM HMI
INPUT 1 TOGGLE
00LOG_BLD1000AU_PMT.IN1TP Not Alarmed False $DEFAULT Read Only
PERMITTED
00LOG_BLD1000AU_PMT.IN2 INPUT 2 Not Alarmed False $DEFAULT Read Only
INPUT 2 TOGGLE
00LOG_BLD1000AU_PMT.IN2T Not Alarmed False $DEFAULT Read Only
VALUE
INPUT 2 TOGGLE
00LOG_BLD1000AU_PMT.IN2TE Not Alarmed *IN2TP $DEFAULT Read Only
ENABLE FROM HMI
INPUT 2 TOGGLE
00LOG_BLD1000AU_PMT.IN2TP Not Alarmed False $DEFAULT Read Only
PERMITTED
↓ ↓ ↓ ↓ ↓ ↓
↓ ↓ ↓ ↓ ↓ ↓
00LOG_BLD1000AU_PMT.IN32 INPUT 32 Not Alarmed False $DEFAULT Read Only
INPUT 32 TOGGLE
00LOG_BLD1000AU_PMT.IN32T Not Alarmed False $DEFAULT Read Only
VALUE
INPUT 32 TOGGLE
00LOG_BLD1000AU_PMT.IN32TE Not Alarmed *IN32TP $DEFAULT Read Only
ENABLE FROM HMI
INPUT 32 TOGGLE
00LOG_BLD1000AU_PMT.IN32TP Not Alarmed False $DEFAULT Read Only
PERMITTED
OUTPUT
00LOG_BLD1000AU_PMT.OUT Not Alarmed False — Read Only
ENUMERATION
BOOLEAN OUTPUT
00LOG_BLD1000AU_PMT.OUT_VAL Not Alarmed False — Read Only
STATUS
INPUTS IN TOGGLE
00LOG_BLD1000AU_PMT.OUT_TGL Not Alarmed False — Read Only
ENABLED MODE

Instruction Guide GEI-100682AB 129


For public disclosure
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.

130 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Connection and Naming

GEI-100682AB Instruction Guide 131


For public disclosure
Logic Builder State Change (LOGIC_BUILDER_SC)
Block Category: LOGIC_BUILDER_SC, 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.

Note Refer to the Mark VIe Controller DCS Block Library (GEI-100679), the block First In-First Out (FIFO).

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.
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.

132 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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-100682AB 133


For public disclosure
Logical AND (AND)
Block Category: AND, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Output
Name Data Type Description
OUT Boolean Output

134 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Logical NAND (NAND)
Block Category: NAND, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Output

Name Data Type Description


OUT Boolean Output

Instruction Guide GEI-100682AB 135


For public disclosure
Logical NOR (NOR)
Block Category: NOR, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Output

Name Data Type Description


OUT Boolean Output

136 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Logical NOT (NOT)
Block Category: NOT, 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 Boolean Input value

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

Instruction Guide GEI-100682AB 137


For public disclosure
Logical OR (OR)
Block Category: OR, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Outputs

Name Data Type Description


OUT Boolean Output

138 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Logical XNOR (XNOR)
Block Category: XNOR, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Output
Name Data Type Description
OUT Boolean Output

Instruction Guide GEI-100682AB 139


For public disclosure
Logical XOR (XOR)
Block Category: XOR, 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 Boolean First input
↓ ↓ ↓
INn Boolean N'th input

Output
Name Data Type Description
OUT Boolean Output

140 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Median Selector with Enable (MEDIAN)
Block Category: MEDIAN, 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 Boolean Block enable (default is True)

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

Instruction Guide GEI-100682AB 141


For public disclosure
Minimum, Maximum (MIN_MAX)
Block Category: MIN_MAX, 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, Changing Data Type of a
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 Boolean Block enable (default is True)
FUNC ENUM (Integer) Selection function (either MIN or MAX, default is 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 Boolean First flag. If True, the corresponding input is the minimum or maximum
↓ ↓ ↓
STATn Boolean N'th flag. If True, the corresponding input is the minimum or maximum
† Value with status, if status option is enabled.

142 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Enter a name for the


program and click OK.

Instruction Guide GEI-100682AB 143


For public disclosure
3. Enter a task name, such as T1, and click OK.

Expand the program and


select the task to display
the Block Editor.

Select Matrix as the block


category from the drop
down menu to display the
Matrix blocks .

Select a block and drag


and drop to move the
block (MADDSUB ) into
the Block Editor.

144 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
4. From the Block Editor, double-click the MADDSUB block to display the Edit Block Pin Connections dialog box.
5. Add two matrices (A and B), each having two rows and four columns where:

a. 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:

From the Tree View, right -click


Variables and select Add Variable
from the drop down menu .

Instruction Guide GEI-100682AB 145


For public disclosure
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.

Enter a name for the


variable and click OK.

Change the Type to


REAL .

Modify the initial


value and select an
Array Size as 8.

Enter the values as


1, 2, 3, 4, 5, 6, 7, 8,
then click OK.

146 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
b. 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 follows:

c. From the Tree View, select the task item to display the Block Editor.
d. From the Block Editor, double-click the MADDSUB block diagram to display the Edit Block Pin Connections
dialog box.

For pin A, select Global Variables


from the drop down menu.

Select Variable 1, then click OK.

Instruction Guide GEI-100682AB 147


For public disclosure
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.

148 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Matrix Addition Subtraction (MADDSUB)
Block Category: MADDSUB, 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.

Note Refer to the section Configuring Matrix Blocks.

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-100682AB 149


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROWS_B Constant Unsigned Integer Number of rows in the second input matrix
COLS_B Constant Unsigned Integer Number of columns in the second input matrix
B[ ] Real/LReal Array Array holding entries of the second input matrix
FUNC Constant Unsigned Integer Choice of operation {0 for Addition, 1 for Subtraction}

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

150 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Matrix Concatenation (MCONCAT)
Block Category: MCONCAT, 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

Note Refer to the section Configuring Matrix Blocks.

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.
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-100682AB 151


For public disclosure
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

152 GEI-100682AB Mark VIe Controller Standard Block Library


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

Outputs
Name Data Type Description
ROWS_C Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 153


For public disclosure
Matrix Dot Division (MDOTDIV)
Block Category: MDOTDIV, 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.

Note Refer to the section Configuring Matrix Blocks.

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

154 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROWS_B Constant Unsigned Integer Number of rows in the second input matrix
COLS_B Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 155


For public disclosure
Matrix Dot Multiplication (MDOTMUL)
Block Category: MDOTMUL, 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.

Note Refer to the section, Configuring Matrix Blocks.

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

156 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROWS_B Constant Unsigned Integer Number of rows in the second input matrix
COLS_B Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 157


For public disclosure
Matrix Fill (MFILL)
Block Category: MFILL, 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.

Note Refer to the section, Configuring Matrix Blocks.

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

158 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Instruction Guide GEI-100682AB 159


For public disclosure
Inputs

Name Data Type Description


ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer 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 Unsigned Integer Pattern used in populating output matrix
ROW_ST Unsigned Integer Starting row for fill when using misc option
COL_ST Unsigned Integer Starting column for fill when using misc option
ROW_END Unsigned Integer Ending row for fill when using misc option
COL_END Unsigned Integer Ending column for fill when using misc option

Outputs
Name Data Type Description
ROWS_C Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

160 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Matrix Find (MFIND)
Block Category: MFIND, 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.

Note Refer to the section Configuring Matrix Blocks.

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

Instruction Guide GEI-100682AB 161


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
FUNC Constant unsigned integer Comparison function (GT=1, LT=2, GE=3, LE=4, EQ=5, NE=6)
Tolerance variable used to define equality in EQ & NE (defaults
TOL Real/LReal
to 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
Array holding the row indices of all elements that meet the
BROWNDX Integer
defined criteria
Array holding the column indices of all elements that meet the
BCOLNDX Integer
defined criteria
Array holding the values of all elements that meet the defined
B[ ] Real/LReal Array
criteria
COUNT Unsigned Integer Total number of elements found

162 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Matrix Inverse (MINV)
Block Category: MINV, 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.

Note Refer to the section Configuring Matrix Blocks.

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 Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer 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-100682AB 163


For public disclosure
Matrix Minimum/Maximum Element Determination
(MMINMAX)
Block Category: MMINMAX, 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.

Note Refer to the section Configuring Matrix Blocks.

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

164 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
FUNC Constant Unsigned Integer Choice of operation { 0 for Maximum,1 for Minimum }

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

Instruction Guide GEI-100682AB 165


For public disclosure
Matrix Multiplication (MMUL)
Block Category: MMUL, 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.

Note Refer to the section Configuring Matrix Blocks.

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

166 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROWS_B Constant Unsigned Integer Number of rows in the second input matrix
COLS_B Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 167


For public disclosure
Matrix Submatrix Selection (MSUBMATRIX)
Block Category: MSUBMATRIX, 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.

Note Refer to the section, How To Configure Matrix Blocks.

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 ROW_ST, ROW_END, COL_ST, and COL_END are zero based.

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
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

168 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROW_ST Constant Unsigned Integer Index to start row sub-matrix selection
ROW_INC Constant Unsigned Integer Index to increment between row start-stop selection
ROW_END Constant Unsigned Integer Index to end row sub-matrix selection
COL_ST Constant Unsigned Integer Index to start column sub-matrix selection
COL_INC Constant Unsigned Integer Index to increment between column start-stop selection
COL_END Constant Unsigned Integer Index to end column sub-matrix selection

Outputs
Name Data Type Description
ROWS_B Unsigned Integer Number of rows in the output matrix
COLS_B Unsigned Integer Number of columns in the output matrix
B[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 169


For public disclosure
Matrix Switch Block (MSVCH)
Block Category: MSVCH, 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.

Note Refer to the section, Configuring Matrix Blocks.

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

170 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Enable the block to run
Matrix Selection Flag, If B_FLAG is True, C is set to A. If B_
B_FLAG Boolean
FLAG is False, C is set to B
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer Number of columns in the first input matrix
A[ ] Real/LReal Array Array holding entries of the first input matrix
ROWS_B Constant Unsigned Integer Number of rows in the second input matrix
COLS_B Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_C Unsigned Integer Number of columns in the output matrix
C[ ] Real/LReal Array Array holding entries of the output matrix

Instruction Guide GEI-100682AB 171


For public disclosure
Matrix Transpose (MTRN)
Block Category: MTRN, 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.

Note Refer to the section, Configuring Matrix Blocks.

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 Boolean Enable the block to run
ROWS_A Constant Unsigned Integer Number of rows in the first input matrix
COLS_A Constant Unsigned Integer 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 Unsigned Integer Number of rows in the output matrix
COLS_B Unsigned Integer Number of columns in the output matrix
B[ ] Real/LReal Array Array holding entries of the output matrix

172 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Mode Select (MODSEL)
Block Category: MODSEL, 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

Instruction Guide GEI-100682AB 173


For public disclosure
Inputs
Name Data Type Description
MD0RQ Boolean Mode 0 request
↓ ↓ ↓
MD7RQ Boolean Mode 7 request

Outputs
Name Data Type Description
MODE_0 Boolean Mode 0 selected
↓ ↓ ↓
MODE_7 Boolean 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 mode
MODEW1 Unsigned Integer
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 Unsigned Integer 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 Boolean
download. Default is True to save modes to Nonvolatile memory.

174 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Move (MOVE)
Block Category: MOVE, 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.

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

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 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, Changing Data Type of a 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 Boolean Block enable (default is True) Value only
SRC Any† Source variable Value with status or 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
Destination variable (data type enforced by the
DEST Any† Value with status
block type).
† Value only or value with status, if status option is enabled and value only for Boolean block type.

Instruction Guide GEI-100682AB 175


For public disclosure
Move Truncated (MOVE_DT)
Block Category: MOVE_DT, 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 Boolean Block enable (default is True)
SRC Simple Source variable

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

176 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Move Truncated (MOVE_IT)
Block Category: MOVE_IT, 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 Boolean Block enable (default is 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-100682AB 177


For public disclosure
Mult (MULT)
Block Category: MULT, 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, Changing Data Type of a
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.

178 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
NaN Breaker (NAN_BREAKER)
Block Category: NaN_BREAKER, 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, Long real Input signal to check for NaN

Outputs
Name Data Type Description
INP_IS_NAN Boolean True if input signal value is NaN
OUTPUT Real, Long Real Equal to input if input is not NaN, otherwise it is last good value

State
Name Data Type Description
LGVALUE Real, Long Real Last good input value (default is 0)

Instruction Guide GEI-100682AB 179


For public disclosure
NaN Check (NANCHECK)
Block Category: NANCHECK, 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. Use the former if
the source is a REAL (that is, floating point variable) or UDINT. Use the latter if the source is a LREAL (that is, double).

NANCHECK Block

NANCHECK Block Expanded

Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
RESET Boolean Block reset (default is False); True resets the three counters
For NaNCheck blocks selected as type Real, input SRC may be of
SRC Real, UDint, or LReal type Real or UDint only. For NaNCheck blocks of type LReal, input
SRC may be of type LReal only.

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

180 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Negate (NEGATE)
Block Category: NEGATE, 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, Changing Data Type of a 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, Long real, Integer, Double integer† Input value
† Value with status, if status option is enabled.

Output
Name Data Type Description
OUT Real, Long real, Integer, Double integer† Negated input value
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AB 181


For public disclosure
Not Equal (NE)
Block Category: NE, 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, Changing Data Type of a
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.

182 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 Boolean The result of the comparison

Instruction Guide GEI-100682AB 183


For public disclosure
On Off Delay (ON_OFF_DELAY)
Block Category: ON_OFF_DELAY, 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 Boolean 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 Boolean Delayed filtered output

184 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Parity Check (PARITY_CHK)
Block Category: PARITY_CHK, 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 Boolean Block enable (default is True)
INPUT Double Integer Variable to check parity

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

Instruction Guide GEI-100682AB 185


For public disclosure
Prevote (PREVOTE)
Block Category: PREVOTE, 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, Changing Data Type of a Variant
Block.

PREVOTE Block

PREVOTE Block Expanded

186 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

Instruction Guide GEI-100682AB 187


For public disclosure
Input
Name Data Type Description
VAR Any Source variable

Outputs
Name Data Type Description
RHLT Boolean R prevote variable health
SHLT Boolean S prevote variable health
TAHLT Boolean TA prevote variable health
TBHLT Boolean 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

188 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Proportional Integral Derivative Control (PID)
Block Category: PID, 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

Instruction Guide GEI-100682AB 189


For public disclosure
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

190 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
PID Block

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

Instruction Guide GEI-100682AB 191


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

192 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Pulse (PULSE)
Block Category: PULSE, 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 Boolean Triggers a new pulse on its rising edge
WIDTH Unsigned Double Integer Period of the pulse in milliseconds. Default is 0 (1 sweep).

Output
Name Data Type Description
OUT Boolean Pulse output

State
Name Data Type Description
CWIDTH Unsigned Double Integer 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
ISTRIGGERED Boolean
and selecting Edit Block Pins. Writing to this variable is not
recommended, but can be used to preset block states.

Instruction Guide GEI-100682AB 193


For public disclosure
Pulse Extended (PULSE_EXT)
Block Category: PULSE_EXT, 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 Boolean Triggers pulse timer on its rising edge
WIDTH Unsigned double integer Pulse width in milliseconds

Output
Name Data Type Description
OUT Boolean Pulse output

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

194 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Pushbutton (P_B)
Block Category: P_B, 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 Boolean Push-button input
WIDTH Unsigned double integer Push-button pulse width (ms)

Output
Name Data Type Description
OUT Boolean Push-button output

Instruction Guide GEI-100682AB 195


For public disclosure
Put Into Array (PUT)
Block Category: PUT, 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, Changing Data Type of a Variant Block.

PUT Block

Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
SRC Any Source variable
Destination array index (0 based, interpreted internally as
N Unsigned Double Integer
unsigned)

Output
Name Data Type Description
DEST[ ] Any Destination array

196 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Rate Limiter (RATELIM)
Block Category: RATELIM, 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-100682AB 197


For public disclosure
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 Boolean Initializes output to preset value

PASS Boolean Passes input to output without limiting


HOLD Boolean 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 Boolean Output rate limiting occurring
† Value with Status, if status option is enabled.

198 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Rate Monitor (RATEMON)
Block Category: RATEMON, 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-100682AB 199


For public disclosure
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 Boolean Increase rate of change HIGH flag
RATE_DEC_HI Boolean Decrease rate of change LOW flag
† Value with Status, if status option is enabled.

200 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Relay Ladder Logic (RUNG)
Block Category: RUNG, 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 Boolean Required Boolean input used in equation
↓ ↓ ↓
P Boolean Boolean input used in the equation

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

Instruction Guide GEI-100682AB 201


For public disclosure
Rotary Switch (ROTARY_SW)
Block Category: ROTARY_SW, 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 Unsigned integer Selects which Boolean output will be True

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

202 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Round (ROUND)
Block Category: ROUND, 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
ROUND Block
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

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 Unsigned Integer 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-100682AB 203


For public disclosure
Select (SELECT)
Block Category: SELECT, 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 Changing Data
Type of a 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 Boolean Block enable (default is True)
CASC Any† Default (cascade) selection
IN1 Any† First input variable
SEL1 Boolean First selection input
↓ ↓ ↓
INn Any† N'th input variable
SELn Boolean 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.

204 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Selector (SELECTOR)
Block Category: SELECTOR, 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, Changing Data
Type of a 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-100682AB 205


For public disclosure
Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is True)
CASC Any† Cascade input
SELA Boolean When True Select Input Set A
SELB Boolean 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.

206 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Sequence Branch Block - TMR (SBB)
Block Category: SBB, 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-100682AB 207


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

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

208 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Sequence Manager Block - TMR (SMGR)
Block Category: SMGR, 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-100682AB 209


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

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

210 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Sequence Merge Block - TMR (SMB)
Block Category: SMB, 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-100682AB 211


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

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

States
Name Data Type Description
CTIME Unsigned Double Integer Current merge time in milliseconds
GSTAT[7] Boolean Global input and output connection to SMGR block

212 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Sequence Step Block - TMR (SSB)
Block Category: SSB, 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.

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

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.
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-100682AB 213


For public disclosure
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] Boolean Starts the SSB. Connect from NEXT output of another step
DONEFB Boolean Done feedback input. Causes a transition to the next step
FBTIME Unsigned Double Integer Feedback input time in milliseconds
FORCEFB Boolean Forces the done feedback to True
HOLD Boolean Global hold input to all the SFBs
SSMODE Boolean Single step mode (semi automatic mode)
SSTRIG Boolean Single step trigger (edge sensitive)
RESET Boolean Resets the SSB from any state
When started just go to the next step if the done feedback is
PASSTHR Constant Boolean
True

214 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Outputs
Name Data Type Description
ACTIVE Boolean Indicates the SSB is active
ON Boolean Indicates the SSB is active and on
NEXT[2] Boolean Pin to connect to next SSB, SBB, or SMB block
FAULT Boolean Fault status output
RTIME Unsigned Double Integer Remaining feedback time in seconds

States
Name Data Type Description
CTIME Unsigned Double Integer Current feedback time in milliseconds
GSTAT[7] Boolean Global input and output connection to SMGR block

Instruction Guide GEI-100682AB 215


For public disclosure
Set Array (SETARRY)
Block Category: SETARRY, 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: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. Refer to the section Changing Data Type of a Variant Block.

SETARRY Block

Inputs
Name Data Type Description
ENABLE Boolean Block enable (default is False)
SET Any Set value

Output
Name Data Type Description
DEST[ ] Any Destination array

216 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Square Root (SQRT)
Block Category: SQRT, 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 Changing Data Type of a
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-100682AB 217


For public disclosure
Status Combine (STATUS_COMBINE)
Block Category: STATUS_COMBINE, 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 Changing Data Type of a Variant Block.

STATUS_COMBINE Block

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

218 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Valid Values for IN_S
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
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

Instruction Guide GEI-100682AB 219


For public disclosure
Valid Values for IN_S (continued)
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
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

220 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Valid Values for IN_S (continued)
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

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

Instruction Guide GEI-100682AB 221


For public disclosure
Valid Values for IN_S (continued)
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

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

222 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

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

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).

Instruction Guide GEI-100682AB 223


For public disclosure
Status_Region

Note Additional information on cascade structures is available from the Fieldbus FoundationTM organization.

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.

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).

224 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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
Status_Region Propagation 2
taking first priority and GOOD(NC) region taking last priority
Block modified status-detailed in block specific help file.
Block Status Modification such as Exceeding data type changes Limit_Status:
3
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-100682AB 225


For public disclosure
Bad Status Regions
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

226 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Uncertain Status Regions
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-100682AB 227


For public disclosure
Good Non Cascade Status Region
Good Non Cascade Status Regions 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

228 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Good Cascade Status Region
Good Cascade Status Regions 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-100682AB 229


For public disclosure
Status Split (STATUS_SPLIT)
Block Category: STATUS_SPLIT, 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 Changing Data Type of a 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 Unsigned integer Output status N/A
GOOD Boolean Status in GOOD region N/A
BAD Boolean Status in BAD region N/A
POOR Boolean Status in UNCERTAIN region N/A

230 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Steer (STEER)
Block Category: STEER, 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 Changing Data
Type of a 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 Boolean Block enable (default is True)
CLR Boolean If True, all outputs and CASC are cleared (default is False)
IN Any† Input variable
SEL1 Boolean First selection input
↓ ↓ ↓
SELn Boolean N'th selection input
† Value with Status (Value only for Boolean block type), if status option is enabled.

Instruction Guide GEI-100682AB 231


For public disclosure
Outputs
Name Data Type Description
ACT Boolean 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.

Subtract (SUB)
Block Category: SUB, 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 Changing Data Type of a
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.

232 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Switch (SWITCH)
Block Category: SWITCH, 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 Changing Data
Type of a 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 is 0
T Any† Input variable (default is 0)
SEL Boolean Selection input (default is 0)
A_RATE Real Ascending transfer rate (engineering_units/sec) (default is 0)
D_RATE Real Descending transfer rate (engineering_units/sec) (default is 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-100682AB 233


For public disclosure
System Outputs (SYS_OUTPUTS)
Block Category: SYS_OUTPUTS, 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.

SYS_OUTPUTS Block

SYS_OUTPUTS Block Expanded

Inputs
Name Data Type Description
Application Reset: Directs all I/O packs to reset any latched
MRESET Boolean
conditions resulting from previous trips.
Reset Suicide: Directs all I/O packs to unsuicide any closed loop
RSTSUIC Boolean regulators. Suiciding 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
RSTDIAG Boolean
from the queue all diagnostics in the normal state.
Reset System Limits: Directs all I/O packs to clear all latched system
RSTSYS Boolean
limit logicals.

234 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Task Scan (SCAN)
Block Category: SCAN, 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-100682AB 235


For public disclosure
Temperature Status (TEMP_STATUS)
Block Category: TEMP_STATUS, 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

236 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
TEMP_STATUS Inputs
Input Pin Data Type Platform Functionality
ID of the controller being monitored/controlled; 1 for R, 2 for S, and 3 for T
Unsigned Short
ID All controller. 0 for Local means the block monitors/controls the controller
Integer
executing the block (backward compatibility).

UCPA, UCSA, UCSB, and


Not applicable
UCSC
OTPROT Boolean When True, forces the controller to reboot into a low power failure mode
UCCA and UCCC (in which the application will not run) when a temperature alarm condition
is detected.
UCPA, UCSA, UCSB, and
Not applicable
THLD Real UCSC

UCCA and UCCC Setpoint for declaring the alarm. Ignored unless USR_ENA is True.

UCPA, UCSA, UCSB, and


Not applicable
UCSC
HYST Real
Hysteresis value to be considered for clearing the alarm. Ignored unless
UCCA and UCCC
USR_ENA is True.

UCPA, UCSA, UCSB, and


Not applicable
USR_ENA Boolean UCSC

UCCA and UCCC Used to enable user supplied temperature limits

TEMP_STATUS Outputs

Output Pin Data Type Platform Functionality


UCPA, UCSA, UCSB, and
Remains False, is not applicable
UCSC
Is False if CPU_TEMP is within limits

If USR_ENA is False, then ALARM is True if CPU_TEMP is greater than


ALARM Boolean or equal to DEF_THLD.
UCCA and 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, and


Not Applicable, has a value of 0
CPU_TEMP Real UCSC

UCCA and UCCC Provides the CPU temperature in °C

UCSC Not Applicable, has a value of 0

BRD_TEMP Real UCPA, UCSA, and UCSB Processor board hot spot temperature in °C

UCCA and UCCC Motherboard temperature in °C

UCSC Temperature value of sensor on Carrier Board in °C

UCPA Not Applicable, has a value of 0


TEMP1 Real
UCSA, and UCSB Processor board ambient temperature in °C

UCCA and UCCC Temperature value of sensor #1 near resistor on EPMC in °C

Instruction Guide GEI-100682AB 237


For public disclosure
TEMP_STATUS Outputs (continued)

Output Pin Data Type Platform Functionality


UCPA, UCSA, UCSB, and
Not Applicable, has a value of 0
TEMP2 Real UCSC

UCCA and UCCC Temperature value of sensor #2 at bottom of EPMC in °C

UCPA, UCSA, UCSB, and


Not Applicable
DELTA Real UCSC
UCCA and UCCC TEMP1 - TEMP2 in °C
UCPA, UCSA, UCSB, and
Not used
UCSC
DEF_THLD Real
90°C (194 °F) is the default value of CPU temperature limit for alarm, °C.
UCCA and UCCC
Used when USR_ENA is False.

UCPA, UCSA, UCSB, and


Not used
UCSC
DEF_HYST Real
5°C (9 °F) is the default value of CPU temperature hysteresis. Used to
UCCA and UCCC
determine alarm reset value when USR_ENA is False.

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.

238 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Time Monitor (TIME_MON)
Block Category: TIME_MON, 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

Instruction Guide GEI-100682AB 239


For public disclosure
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

Hour setpoint, based on 24 hour clock (9:00 pm


HR_SP UINT Value only
= 21)
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

240 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 UINT UTC seconds Value only
True if time is synchronized with an NTP Time
LOCKED BOOL Value only
Master

Instruction Guide GEI-100682AB 241


For public disclosure
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 MAX_TIME as a multiple of the frame performance
period.
The maximum value of CURTIME in the TIMER block is 4294967295ms (0xFFFFFFFF).

TIMER Block

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

TIMER Example with MOVE

242 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
MAXTIME Unsigned Double Integer Maximum time value in milliseconds
RESET Boolean Zeros the timer
AUTO_RS Boolean Automatically zeros the timer when AT_TIME is set. Maintains residual count.
RUN Boolean Enables the timer

Outputs
Name Data Type Description
AT_TIME Boolean Indicates the timer has reached the maximum time value
CURTIME Unsigned Double Integer 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
Unsigned Double
LAST_CURTIME or changed by right-clicking the block and selecting Edit Block Pins. Writing to
Integer
this variable is not recommended, but can be used to preset block states.

Instruction Guide GEI-100682AB 243


For public disclosure
Timer Version 2 (TIMER_V2)
Block Category: TIMER, 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 MAX_TIME as a multiple of the frame performance
period.
The maximum value of mCurTime in the TIMER block is 4294967295ms (0xFFFFFFFF).

TIMER_V2 Block

TIMER_V2 Example with AT_TIME output to RESET input

244 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
MAXTIME Unsigned Double Integer Maximum time value in milliseconds
RESET Boolean Zeros the timer
Automatically zeros the timer when AT_TIME is set. Maintains the residual
AUTO_RS Boolean
count.
RUN Boolean 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
AT_TIME Boolean pin as was the 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 Unsigned Double Integer 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
Unsigned Double
LAST_CURTIME or changed by right-clicking the block and selecting Edit Block Pins. Writing to
Integer
this variable is not recommended, but can be used to preset block states.

Instruction Guide GEI-100682AB 245


For public disclosure
Totalizer (TOTALIZER)
Block Category: TOTALIZER, Timers and Counters

Note Only one instance of this block is allowed per controller in the application code.

The Totalizer (TOTALIZER) block is a rubber block that can handle up to 64 sets of pins. The TOTALIZER block uses a
special area of the NVRAM to maintain critical application code counter values. The Totalizer block has 64 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 zero until the next rising edge of INCx. TOTALx is never negative.
Use the Set totalizer values menu option from the ToolboxST application to set totalizer values.

TOTALIZER Block

246 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
INC1 Boolean The specified totalizer increments on the rising edge of this pin
↓ ↓ ↓
INC64 Boolean The specified totalizer increments on the rising edge of this pin

Outputs
Name Data Type Description
TOTAL1 Unsigned Double Integer The output value of the totalizer for use by other application code
True if the totalizer value has overflowed. The pin stays True until INCx
ROLL1 Boolean
increments again.
↓ ↓ ↓
TOTAL64 Unsigned Double Integer The output value of the totalizer for use by other application code
True if the totalizer value has overflowed. The pin stays True until INCx
ROLL64 Boolean
increments again.

Instruction Guide GEI-100682AB 247


For public disclosure
Transfer Function (TRNFUN)
Block Category: TRNFUN, 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 Changing Data Type of a 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].

248 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Inputs
Name Data Type Description
ENA_FUN Boolean 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.
ENA_DYN Boolean
Otherwise this 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 functions are rejected. Note that if this pin is set AFTER
DLOCK Boolean
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
PRESET Boolean
the output to the input value.
† Value with status, if status option is enabled.

Outputs
Name Data Type Description
OUT Real, Lreal† Output value
CI_ERR Boolean If True, indicates that the specified transfer function is unstable
† Value with status, if status option is enabled.

Instruction Guide GEI-100682AB 249


For public disclosure
Transport Delay (TRAN_DLY)
Block Category: TRAN_DLY, 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

250 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Transport Delay Version 2 (TRAN_DLY_V2)
Block Category: TRAN_DLY_V2, 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

Instruction Guide GEI-100682AB 251


For public disclosure
Unit Delay (UNIT_DELAY)
Block Category: UNIT_DELAY, 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 Changing Data
Type of a 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.

252 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
User Scheduled Block Heartbeat (USB_HB)
Block Category: USB_HB, System
This block outputs the current value of the USB heartbeat counter. The block has zero inputs and one output.

Note The task heartbeat is anti-voted, so it can be used to detect a stalled task in a particular controller.

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.

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 Unsigned Integer Controller heartbeat variable

Instruction Guide GEI-100682AB 253


For public disclosure
UTC Time (UTC_TIME)
Block Category: UTC_TIME, 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 Long Real Outputs UTC seconds
LOCKED Boolean True if local time is synchronized with an NTP Time Master

254 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Variable Alarm Status (VAR_ALARM_STATUS)
Block Category: VAR_ALARM_STATUS, System

Note Refer to the Mark VIe Control Volume III Diagnostics and Troubleshooting Manual (GEH-6721_Vol_III), the section
Alarm States for more information on the alarm subsystem, alarm variables, and the alarm queue.

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.

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 Boolean Alarm Acknowledge status for the input variable VAR
IN_ALM_Q Boolean In-Alarm Queue status for the input variable VAR

Instruction Guide GEI-100682AB 255


For public disclosure
Variable Health (VAR_HEALTH)
Block Category: VAR_HEALTH, 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)
• Internal state variable (rarely needed)
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).

Note Refer to the table Output Pin States for I/O Pack Inputs.

256 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 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

Instruction Guide GEI-100682AB 257


For public disclosure
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.

258 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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

Instruction Guide GEI-100682AB 259


For public disclosure
Output Pin States for I/O Pack Inputs
I/O Pack, I/O Output Pins
Network LINK- LINK LINK Description
HEALTHnn UNCERTnn BADnn
Redundancy OKnn _UNCERTnn _BADnn
Input is Bad and the IONet
EGD Exchange has not
0 0 1 0 0 1 been received after the
configured health delay
period
Input was set to Bad by the
I/O pack and the IONet
EGD Exchange has not
0 0 1 0 1 0
been received within the
configured base health
delay period
Input is set to Bad by the
Simplex I/O
I/O pack and the IONet
pack, 0 0 1 1 0 0
EGD Exchange is being
Simplex IONet
received
Input has not been
received within the
configured base health
delay period and the IONet
0 1 0 0 1 0
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

260 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, I/O Output Pins
Network LINK- LINK LINK Description
HEALTHnn UNCERTnn BADnn
Redundancy OKnn _UNCERTnn _BADnn
Input is Bad and none of
the IONet EGD Exchanges
0 0 1 0 0 1 have been received after
the configured health delay
period
Input was set to Bad by the
I/O pack and the IONet
EGD Exchange has not
0 0 1 0 1 0
been received within the
configured base health
delay period
Input is set to Bad by the
Simplex I/O
I/O pack and at least one
pack, Dual 0 0 1 1 0 0
IONet EGD Exchange is
IONet
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
1 0 0 1 0 0 least one IONet EGD
exchange is being received
Simplex I/O
pack, TMR N/A N/A N/A N/A N/A N/A Configuration not allowed
IONet
Dual I/O pack,
N/A N/A N/A N/A N/A N/A Configuration not allowed
Simplex IONet

Instruction Guide GEI-100682AB 261


For public disclosure
Output Pin States for I/O Pack Inputs (continued)
I/O Pack, I/O Output Pins
Network LINK- LINK LINK Description
HEALTHnn UNCERTnn BADnn
Redundancy OKnn _UNCERTnn _BADnn
Input is Bad and none of
the IONet EGD Exchanges
0 0 1 0 0 1 have been received after
the configured health delay
period
Input was set Bad by the
I/O pack and the IONet
EGD Exchange has not
0 0 1 0 1 0
been received within the
configured base health
delay period
Input is set to Bad by the
Dual I/O pack, I/O pack and at least one
0 0 1 1 0 0
Dual IONet 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
1 0 0 1 0 0 least one IONet EGD
exchange is being received
Dual I/O Pack,
N/A N/A N/A N/A N/A N/A Configuration not allowed
TMR IONet
TMR I/O pack,
N/A N/A N/A N/A N/A N/A Configuration not allowed
Simplex IONet

262 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
Output Pin States for I/O Pack Inputs (continued)
Output Pins
I/O Pack, I/O
LINK
Network UN- LINK- LINK Description
HEALTHnn BADnn _UN-
Redundancy CERTnn OKnn _BADnn
CERTnn
Input is Bad and either
none or only one of the
IONet EGD Exchanges has
0 0 1 0 0 1
been received after the
configured health delay
period
Input was set to Bad by the
I/O pack and the IONet
EGD Exchange has not
0 0 1 0 1 0
been received within the
configured base health
delay period
Input is set to Bad by the
I/O pack and at least two
TMR I/O pack, 0 0 1 1 0 0
IONet EGD Exchanges are
Dual IONet
being received
Input has not been
received within the
configured health delay
period and either none or
0 1 0 0 1 0 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-100682AB 263


For public disclosure
Output Pin States for I/O Pack Inputs (continued) (continued)
Output Pins
I/O Pack, I/O
LINK
Network UN- LINK- LINK Description
HEALTHnn BADnn _UN-
Redundancy CERTnn OKnn _BADnn
CERTnn
Input is Bad and either
none or only one of the
IONet EGD Exchanges has
0 0 1 0 0 1
been received after the
configured health delay
period
Input was set to Bad by the
I/O pack and the IONet
EGD Exchange has not
0 0 1 0 1 0
been received within the
configured base health
delay period
Input is set to Bad by the
I/O pack and at least two
TMR I/O pack, 0 0 1 1 0 0
IONet EGD Exchanges are
TMR IONet
being received
Input has not been
received within the
configured health delay
period and either none or
0 1 0 0 1 0 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

264 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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 Boolean Is input 1 Healthy
↓ ↓ ↓
HEALTH32 Boolean Is input 32 Healthy
LINKOK1 Boolean Link OK for EGD variable 1
↓ ↓ ↓
LINKOK32 Boolean Link OK for EGD variable 32
UNCERT1 Boolean Is input 1 Uncertain
↓ ↓ ↓
UNCERT32 Boolean Is input 32 Uncertain
BAD1 Boolean Is input 1 bad
↓ ↓ ↓
BAD32 Boolean Is input 32 bad
LINK_UNCERT1 Boolean Is EGD link 1 Uncertain
↓ ↓ ↓
LINK_UNCERT32 Boolean Is EGD link 32 Uncertain
LINK_BAD1 Boolean Is EGD link 1 bad
↓ ↓ ↓
LINK_BAD32 Boolean Is EGD link 32 bad

Instruction Guide GEI-100682AB 265


For public disclosure
Variable Simulation (VARSIM)
Block Category: VARSIM, 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 Boolean Enable the block to run
PU_DLY Unsigned Integer Pickup Delay - milliseconds to delay a 0 to 1 Boolean transition
DO_DLY Unsigned Integer 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

266 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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

Note There is a standard diagnostic alarm generated from the I/O pack to annunciate operating temperature is out of range.

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 This example process alarm is typically set at a more restrictive range than the I/O pack diagnostic alarm.

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.

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

Instruction Guide GEI-100682AB 267


For public disclosure
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

268 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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

Instruction Guide GEI-100682AB 269


For public disclosure
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

270 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

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

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

Note The ControllerStateHeartbeat intrinsic was developed so the ToolboxST application could drive the status screens for
R, S, and T controllers.

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.

Instruction Guide GEI-100682AB 271


For public disclosure
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

272 GEI-100682AB Mark VIe Controller Standard Block Library


For public disclosure
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.

For public disclosure

Вам также может понравиться