GEI-100682AJ
Mark* VIe ControllerStandard Block Library
These instructions do not purport to cover all details or variations in equipment, nor to provide for every possiblecontingency to be met during installation, operation, and maintenance. The information is supplied for informationalpurposes 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 reflectedherein. It is understood that GE may make changes, modifications, or improvements to the equipment referenced herein or tothe document itself at any time. This document is intended for trained personnel familiar with the GE products referencedherein.
Public Information – This document contains non-sensitive information approved for public disclosure.
GE may have patents or pending patent applications covering subject matter in this document. The furnishing of thisdocument 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 forparticular purpose.
For further assistance or technical information, contact the nearest GE Sales or Service Office, or an authorized GE SalesRepresentative.
Revised: Apr 2021Issued: Sept 2005
© 2005 – 2021 General Electric Company.___________________________________* Indicates a trademark of General Electric Company and/or its subsidiaries.All other trademarks are the property of their respective owners.
We would appreciate your feedback about our documentation.Please send comments or suggestions to [email protected]
Public Information
mailto:[email protected]
Document UpdatesRevision Location Description
AJApplication State (APP_STATE)
Combined and clarified the Precautions Before APP_STATE Deletion,Relocation, or Causing a Major Revision Mismatch
Time Monitor (TIME_MON) Updated the Data Type for the UTCTIME output to UDINT
AHCapture Data (CAPTURE) Updated table entry UPL_TYPE description to include TripFlash
Command Disable (CMD_DISABLE) New block
AG
Modbus Master Read (MBUS_READ)New blocks
Modbus Master Write (MBUS_WRITE)
Timer (TIMER)Updated MAX_TIME to MAXTIMEAdded Note to clarify when AT_TIME goes True
Timer Version 2 (TIMER_V2)Updated MAX_TIME to MAXTIME and mCurTime to CURTIMEAdded Note to clarify when AT_TIME goes True
AFController Monitor (CTRLR_MON)
Updated to include the UCSD controller platformTemperature Status (TEMP_STATUS)
AEIO-Link Device Read (IO_LINK_DEVICE_READ)
New blocksIO-Link Device Write (IO_LINK_DEVICE_WRITE)
AD
Totalizer (TOTALIZER)Updates to increase number of supported totalizers (counters) and pinsfrom 64 to 128
Variable Health (VAR_HEALTH)Added health support of a regular variable directly from an EtherCATinput signal and removed support for an internal state variable (aconnected internal state variable results in health always True)
AC
Array Compress Boolean (ARRAY_COMPRESS)
New blocks
Array Compress Boolean(ARRAY_COMPRESS_UDI)
Array Expand Integer (ARRAY_EXPAND)
Array Expand Integer (ARRAY_EXPAND_UDI)
Array Compare (ARRAY_COMPARE)
Updated the Description in the Comparison Functions table for LE andLT
Updated Data Type for N in the Inputs table
AB Variable Health (VAR_HEALTH)Updated for consistency and clarification as to what information appliedto I/O packs or EGD
AA Timer (TIMER) Corrected parameter name from mCurTime to CURTIME
ZController Monitor (CTRLR_MON) Updated for the UCSC controller platform
Temperature Status (TEMP_STATUS) Updated for the UCSC controller platform
Y Interpolator DL (INTERP_DL) A better description of the FTBL input array
2 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
ContentsIntroduction......................................................................................................................................................7Block Data Type ............................................................................................................................................8Change Data Type of Variant Block ...................................................................................................................9Legacy Category Blocks ................................................................................................................................ 10
Absolute Value (ABS) ...................................................................................................................................... 11Add (ADD) .................................................................................................................................................... 12Analog Alarm (ANALOG_ALARM) .................................................................................................................. 13Any Forces (ANY_FORCES) ............................................................................................................................ 26Application State (APP_STATE) ........................................................................................................................ 27Array Average (ARRAY_AVERAGE) ................................................................................................................. 29Array Calculator (ARRAY_CALC)..................................................................................................................... 30Array Compare (ARRAY_COMPARE)................................................................................................................ 32Array Compress Boolean (ARRAY_COMPRESS) ................................................................................................. 37Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI) ....................................................................... 38Array Empty (ARRAY_EMPTY) ....................................................................................................................... 39Array Expand Integer (ARRAY_EXPAND) .......................................................................................................... 40Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) ................................................................................ 41Array Fill (ARRAY_FILL) ................................................................................................................................ 43Array Find Element (ARRAY_FIND) ................................................................................................................. 44Array Minimum/Maximum Element Determination (ARRAY_MINMAX) ................................................................. 45Array Relay Ladder Logic (ARRAY_RUNG) ....................................................................................................... 46Array Sum (ARRAY_SUM) .............................................................................................................................. 47Average Input (AVRG) ..................................................................................................................................... 48Bit Counter (BIT_CNTR).................................................................................................................................. 49Boolean Alarm (BOOLEAN_ALARM) ............................................................................................................... 50Bubble Sort (BSORT)....................................................................................................................................... 53Calculator (CALC) .......................................................................................................................................... 54Capture Data (CAPTURE) ................................................................................................................................ 56Theory of Operation...................................................................................................................................... 59Configuration .............................................................................................................................................. 59Enabling Collections ..................................................................................................................................... 60Triggering Issues.......................................................................................................................................... 60Buffer Control Details ................................................................................................................................... 61Time Stamping ............................................................................................................................................ 61Capture Status ............................................................................................................................................. 62Redundancy Issues ....................................................................................................................................... 62Memory Use ............................................................................................................................................... 63
Change Detection (CHG_DET) .......................................................................................................................... 64Clamp (CLAMP)............................................................................................................................................. 65Code Timer (CODETIMER) .............................................................................................................................. 66Command Disable (CMD_DISABLE) ................................................................................................................. 68Comment (_COMMENT) ................................................................................................................................. 70Comment Block Functionality (_COMMENT_BF) ................................................................................................ 71Comment No Break (_COMMENT_NB) ............................................................................................................. 72Compare (COMPARE) ..................................................................................................................................... 73Compress Boolean (COMPRESS)....................................................................................................................... 78Compress to Long Integer (COMPRESS_UDI) ..................................................................................................... 79
Instruction Guide GEI-100682AJ 3Public Information
Controller Monitor (CTRLR_MON).................................................................................................................... 80Count Down (CTD) ......................................................................................................................................... 86Count Up (CTU).............................................................................................................................................. 87Decode (IN_DECODE) .................................................................................................................................... 88Derivative (DERIVATIVE)................................................................................................................................ 89Device Heartbeat (DEVICE_HB) ....................................................................................................................... 90Divide (DIV) .................................................................................................................................................. 91Equal (EQ) ..................................................................................................................................................... 92Expand Integer (EXPAND)................................................................................................................................ 94Expand Long Integer (EXPAND_UDI) ................................................................................................................ 95Finite Impulse Response (FIR) ........................................................................................................................... 97Function Generator (FUNGEN).......................................................................................................................... 99Greater Than, Equal To (GE) ............................................................................................................................101Get From Array (GET) ....................................................................................................................................103Greater Than (GT) ..........................................................................................................................................104Infinite Impulse Response (IIR).........................................................................................................................106Integrator With Lead (INTWLEAD)...................................................................................................................108Integrator, Selectable Algorithm (INTEG) ...........................................................................................................110Interpolator (INTERP).....................................................................................................................................112Interpolator DL (INTERP_DL) .........................................................................................................................114IO-Link Device Read (IO_LINK_DEVICE_READ)..............................................................................................116IO-Link Device Backup and Restore ...............................................................................................................124IO-Link Block Performance Numbers .............................................................................................................124
IO-Link Device Write (IO_LINK_DEVICE_WRITE) ...........................................................................................125Lag Filter (LAG) ............................................................................................................................................126Latch (LATCH) ..............................................................................................................................................128Lead, Lag (LEAD_LAG) .................................................................................................................................129Less Than (LT)...............................................................................................................................................130Less Than, Equal To (LE).................................................................................................................................132Limit Detect Manual (LD_MAN) ......................................................................................................................134Logic Builder (LOGIC_BUILDER) ...................................................................................................................137Logic Builder State Change (LOGIC_BUILDER_SC) ...........................................................................................147Logical AND (AND).......................................................................................................................................149Logical NAND (NAND) ..................................................................................................................................150Logical NOR (NOR) .......................................................................................................................................151Logical NOT (NOT)........................................................................................................................................152Logical OR (OR) ............................................................................................................................................153Logical XNOR (XNOR) ..................................................................................................................................154Logical XOR (XOR) .......................................................................................................................................155Median Selector with Enable (MEDIAN) ............................................................................................................156Minimum, Maximum (MIN_MAX) ...................................................................................................................157Configuring Matrix Blocks ...............................................................................................................................158Matrix Addition Subtraction (MADDSUB)..........................................................................................................164Matrix Concatenation (MCONCAT)...................................................................................................................166Matrix Dot Division (MDOTDIV) .....................................................................................................................168Matrix Dot Multiplication (MDOTMUL) ............................................................................................................169Matrix Fill (MFILL)........................................................................................................................................170
4 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Matrix Find (MFIND) .....................................................................................................................................173Matrix Inverse (MINV)....................................................................................................................................174Matrix Minimum/Maximum Element Determination (MMINMAX) .........................................................................175Matrix Multiplication (MMUL) .........................................................................................................................176Matrix Submatrix Selection (MSUBMATRIX) .....................................................................................................177Matrix Switch Block (MSVCH) ........................................................................................................................179Matrix Transpose (MTRN) ...............................................................................................................................180Modbus Master Read (MBUS_READ) ...............................................................................................................181Modbus Master Write (MBUS_WRITE) .............................................................................................................188Mode Select (MODSEL)..................................................................................................................................189Move (MOVE)...............................................................................................................................................191Move Truncated (MOVE_DT) ..........................................................................................................................192Move Truncated (MOVE_IT)............................................................................................................................193Mult (MULT).................................................................................................................................................194NaN Breaker (NAN_BREAKER) ......................................................................................................................195NaN Check (NANCHECK) ..............................................................................................................................196Negate (NEGATE)..........................................................................................................................................197Not Equal (NE) ..............................................................................................................................................198On Off Delay (ON_OFF_DELAY).....................................................................................................................200Parity Check (PARITY_CHK) ..........................................................................................................................201Prevote (PREVOTE) .......................................................................................................................................202Proportional Integral Derivative Control (PID) .....................................................................................................205Pulse (PULSE)...............................................................................................................................................209Pulse Extended (PULSE_EXT) .........................................................................................................................210Pushbutton (P_B) ...........................................................................................................................................211Put Into Array (PUT).......................................................................................................................................212Rate Limiter (RATELIM).................................................................................................................................213Rate Monitor (RATEMON) ..............................................................................................................................215Relay Ladder Logic (RUNG) ............................................................................................................................217Rotary Switch (ROTARY_SW) .........................................................................................................................218Round (ROUND) ...........................................................................................................................................219Select (SELECT) ............................................................................................................................................220Selector (SELECTOR).....................................................................................................................................221Sequence Branch Block - TMR (SBB) ................................................................................................................223Sequence Manager Block - TMR (SMGR)...........................................................................................................225Sequence Merge Block - TMR (SMB) ................................................................................................................227Sequence Step Block - TMR (SSB) ....................................................................................................................229Set Array (SETARRY).....................................................................................................................................232Square Root (SQRT) .......................................................................................................................................233Status Combine (STATUS_COMBINE) ..............................................................................................................234Status Monitoring ...........................................................................................................................................239Status Block Types ......................................................................................................................................239Status_Region.............................................................................................................................................240Sub_Status .................................................................................................................................................240Limit_Status...............................................................................................................................................240Status Input Verification ...............................................................................................................................240Status Tables ..............................................................................................................................................241
Status Split (STATUS_SPLIT) ..........................................................................................................................246
Instruction Guide GEI-100682AJ 5Public Information
Steer (STEER) ...............................................................................................................................................247Subtract (SUB)...............................................................................................................................................248Switch (SWITCH) ..........................................................................................................................................249System Outputs (SYS_OUTPUTS) ....................................................................................................................250Task Scan (SCAN)..........................................................................................................................................251Temperature Status (TEMP_STATUS) ................................................................................................................252Time Monitor (TIME_MON) ............................................................................................................................256Timer (TIMER)..............................................................................................................................................258Timer Version 2 (TIMER_V2)...........................................................................................................................260Totalizer (TOTALIZER) ..................................................................................................................................262Transfer Function (TRNFUN) ...........................................................................................................................263Transport Delay (TRAN_DLY) .........................................................................................................................265Transport Delay Version 2 (TRAN_DLY_V2) ......................................................................................................266Unit Delay (UNIT_DELAY).............................................................................................................................267User Scheduled Block Heartbeat (USB_HB)........................................................................................................268UTC Time (UTC_TIME) .................................................................................................................................269Variable Alarm Status (VAR_ALARM_STATUS) ................................................................................................270Variable Health (VAR_HEALTH) ......................................................................................................................271Variable Simulation (VARSIM) .........................................................................................................................281Logic Examples..............................................................................................................................................282Annunciation of Temperature Threshold for Mark VIe I/O Packs..........................................................................282Annunciation of Loss of IONet for Mark VIe I/O Packs......................................................................................284Annunciation of TMR Controller Heartbeat Status Not OK .................................................................................286
6 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
IntroductionBlocks 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 orderlisted in the task. The connections between the blocks are RAM memory elements through which data is passed. Theseelements are referred to as variables. Each variable has a defined data type and must be connected to pins of the same datatype. 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. Forthis 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 thatmay 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 toprevent the production and proliferation of such values. Function block descriptions may include additional details concerningfloating point exception handling where needed.
Block Libraries also contain rubber blocks, which are sized according to the number of pins used. Within the library, theblocks 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 simpleblock name and block configuration pins and variable pins, which transfer data in and out of the block. The pins are locatedon the block diagram according to their usage. All input pins (pins read by the block) and block configuration pins are listedon the left. All output pins (pins written by the block) and state pins (pins read and written by the block) are listed on theright. The pin name is listed beside each pin inside the block diagram border.
Pin Name Modifiers Description^ prefixed with a carat (^ONREQ) Pin is rising-edge sensitive[ ] suffixed with square brackets (STATE[4]) Pin expects a variable that is an array of the size indicated within the brackets
Instruction Guide GEI-100682AJ 7Public Information
Block Data TypeThe pin data type identifier is listed beside the pin outside of the block diagram border. The basic data types used in the blocklibraries are BOOL, INT, UINT, REAL, LREAL, DINT and UDINT. Blocks with data types ANY_NUM and ANY must havethe 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 andthe 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 DescriptionA Any (ANY) Any data typeB Boolean (BOOL) 8-bit BooleanI Integer (INT) 16-bit (Short) Signed Integer
DI Double Integer (DINT) 32-bit (Long) Signed Integer
R Real (REAL) 32-bit Floating Point
LR Long Real (LREAL) 64-bit (Long) Floating PointUI Unsigned Integer (UINT) 16-bit (Short) Unsigned IntegerUDI Unsigned Double Integer (UDINT) 32-bit (Long) Unsigned IntegerN Numeric (ANY_NUM) Any data type except BooleanS 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-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Change Data Type of Variant BlockThere are few blocks that support more than one data type as an input and/or output.
➢➢ To change the block data type
1. Select the block for which to change the data type.
2. From the Block Properties window, expand the General section.
3. From the Property Editor, select the Block Data Type.
4. From the Block Data Type drop-down box, select a valid data type for the block.
Instruction Guide GEI-100682AJ 9Public Information
Legacy Category BlocksSome of the controller software blocks have been put into the Legacy Category (this is the category that is used by theToolboxST Block Diagram Editor). This category is different than the blocks that reside in the Legacy Block Library. Legacycategory 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. Inmany 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
LegacyCategory Block
ReplacementBlock Reason
_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 andearly versions of Mark VIe controllers
TIMER TIMER_V2 TIMER_V2 supports AT_TIME output to RESET input
TRAN_DLY TRAN_DLY_V2TRAN_DLY_V2 corrects existing issues with TRAN_DLY, which could not be madebackwards compatible
Note LEGACY category blocks are hidden by default in the ToolboxST application. Refer to the ToolboxST User Guide forMark Controls Platform (GEH-6700 or GEH-6703) for steps to display these blocks if needed for legacy support.
10 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Absolute Value (ABS)Block Category: Math
The Absolute Value (ABS) block outputs the absolute value of the input, IN.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of VariantBlock.
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 DescriptionIN ANY_NUM† Input value† Value with status, if status option is enabled.
Output
Name Data Type DescriptionOUT ANY_NUM† Absolute value of the input† Value with status, if status option is enabled.
Instruction Guide GEI-100682AJ 11Public Information
Add (ADD)Block Category: Math
The Add (ADD) block is an expandable block that adds up to 32 inputs. The sum of the connected inputs is set as the output.Furthermore, if no inputs are connected, the output will be 0.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of VariantBlock.
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 DescriptionIN1 ANY_NUM† First input↓ ↓ ↓INn ANY_NUM† N'th input† Value with status, if status option is enabled.
Output
Name Data Type DescriptionOUT ANY_NUM† Output† Value with status, if status option is enabled.
12 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Analog Alarm (ANALOG_ALARM)Block Category: Analog Operations
The Analog Alarm (ANALOG_ALARM) block documents the configuration of an analog alarm. It has no associated runtimeoperation; it is effectively an application code comment. When the IN pin is connected to a numeric variable, the blockdisplays the configuration of the analog alarms for that variable.
Each analog alarm consists of a main numeric variable and a number of SubVariables that either configure the alarms or holdindividual alarm bits. Each of these SubVariables is represented by a pin on the ANALOG_ALARM block.
Note Alarm bits must be enabled to display as pins.
➢➢ To create or edit configuration: double-click the ANALOG_ALARM block.
ANALOG_ALARM Block
Instruction Guide GEI-100682AJ 13Public Information
(Optional) Alarm Block Template Configuration
An alarm block template may be used to define variable aliasing behavior for blocks.
➢➢ To create and configure an Analog Alarm block template
1. From the System Editor, select Edit, and System Information.
2. From the Editor Tree View, expand Alarm System and right-click Alarm Block Template, then select Add AlarmBlock Template.
3. Enter a name for the Alarm Block Template and click OK.
14 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
4. Create or add any required attributes for the block template. From the Tree View, expand the block template and selectAttributes.
5. From the Editor Tree View, select the template and enter an Alias for each SubVariable in the Data Grid as needed.
Instruction Guide GEI-100682AJ 15Public Information
ToolboxST Configuration
➢➢ To insert the block in the ToolboxST application
1. From the Tree View, select a task to display the Block Diagram Editor in the Summary View.
2. From the Library View, select the Analog Alarm block and drag and drop into the Diagram Editor.
3. Optionally, choose a block template. From the drop down menu, select a template and click OK.
16 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
4. Add values to the SubVariables and click OK.
Analog Alarm Block Inserted
5. Double-click the IN pin and connect the global variable to the input.
a. Select Global Variable, then select (check) Create variable and enter the variable name, or click BrowseGlobals to select a variable. Click OK.
Instruction Guide GEI-100682AJ 17Public Information
Global Variable Connected to Input
6. From the Block Diagram Editor, double-click the Analog Alarm block and select the variable name.
7. From the Property Editor, select Alarm and select an available Analog Alarm Definition from the drop down menu.
18 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
8. From the Property Editor, select an Alarm Type property (for example, H) and select True from the drop down menuto change the value from False to True.
9. From the Property Editor, select Alarm Shelving and select Enabled from the drop down menu.
Instruction Guide GEI-100682AJ 19Public Information
10. Verify that the correct variables display for each alarm created, then close the window.
20 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
11. From the Tree View, right-click ANALOG_ALARM_1 and select Instance to refresh the alias’ for each alarm.
12. Double-click the block to view the alias names if they were defined using a block template.
Instruction Guide GEI-100682AJ 21Public Information
13. Configure the alarm parameters. From the Summary View, right-click the ANALOG_ALARM_1 block and selectEdit Block Pins.
22 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
14. Beside the parameter name, enter the Connection Variable or Immediate Value for each alarm setpoint, associatedtime delay, and hysteresis. Then close the window.
Instruction Guide GEI-100682AJ 23Public Information
Inputs
Name Data Type DescriptionIN ANY_NUM Connect to a Numeric variable to document its alarm configurationINH† BOOL When set to True, all configured alarm levels for this variable are inhibitedUnshelve†† BOOL When set to True, will cause the alarm to become unshelved† Available as long as any analog alarm type is configured†† Available when shelving is enabled for the alarm
24 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Outputs
Name Data Type DescriptionAlarm TypeConfiguration†
BQ BOOLAlarm flag for Bad Quality. For BQ to be available, IN must beconnected to a variable with status.
BQ
H BOOL Alarm flag for High HHH BOOL Alarm flag for High High HHHHH BOOL Alarm flag for High High High HHHL BOOL Alarm flag for Low LLL BOOL Alarm flag for Low Low LLLLL BOOL Alarm flag for Low Low Low LLLDH BOOL Alarm flag for Deviation High DHRH BOOL Alarm flag for Rate of Change High RH† Associated output is only available if the specific alarm type is configured
Parameters
Name Data Type DescriptionAlarm TypeConfiguration†
H_SP ANY_NUM Setpoint for High alarm (type must match IN) HH_T UINT Delay time for High alarm (ms) HHH_SP ANY_NUM Setpoint for High High alarm (type must match IN) HHHH_T UINT Delay time for High High alarm (ms) HHHHH_SP ANY_NUM Setpoint for High High High alarm (type must match IN) HHHHHH_T UINT Delay time for High High High alarm (ms) HHHL_SP ANY_NUM Setpoint for Low alarm (type must match IN) LL_T UINT Delay time for Low alarm (ms) LLL_SP ANY_NUM Setpoint for Low Low alarm (type must match IN) LLLL_T UINT Delay time for Low Low alarm (ms) LLLLL_SP ANY_NUM Setpoint for Low Low Low alarm (type must match IN) LLLLLL_T UINT Delay time for Low Low Low alarm (ms) LLLHYST ANY_NUM Hysteresis for the analog alarm (type must match IN) H, HH, HHH or L, LL, LLLDH_SP ANY_NUM Setpoint for Deviation High alarm (type must match IN) DHDH_T UINT Delay time for Deviation High alarm (ms) DHDH_C ANY_NUM Compare value for Deviation High (type must match IN) DHDH_Y ANY_NUM Hysteresis for Deviation High (type must match IN) DHRH_SP ANY_NUM Setpoint for Rate of Change High alarm (type must match IN) RHRH_T UINT Delay time for Rate of Change High alarm (ms) RHRH_Y ANY_NUM Hysteresis for Rate of Change High (type must match IN) RH
Auto Reset BOOL
Enable or Disable the Return to Normal (RTN)Unacknowledged alarm state. The Returned to NormalUnacknowledged alarm state is reached when the processreturns within normal limits, and the alarm clears automaticallybefore an operator has acknowledged the alarm condition.
N/A
Alarm Shelving BOOL
Enable or disable the ability for an operator to shelve an alarm.A shelved alarm will temporarily be removed from the alarmdisplay, keeping nuisance trips or bad sensors from clutteringthe Alarm Viewer.
N/A
† Associated parameter is only available if the specific alarm type is configured
Instruction Guide GEI-100682AJ 25Public Information
Any Forces (ANY_FORCES)Block Category: System
The Any Forces (ANY_FORCES) block provides information regarding the status of variable forcing within the controller. Ifany variable is in a forced state within the controller, the Boolean output pin YES is set to True. In addition, the blockindicates the number of forced variables within the controller on integer output pin, NUMVARS.
ANY_FORCES Block
Input
Name Data Type DescriptionYES BOOL True if any variables are forced
Output
Name Data Type DescriptionNUMVARS INT Number of variables currently forced
26 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Application State (APP_STATE)Block Category: System
The Application State (APP_STATE) block can be used to perform download and reboot checks. There can be only one APP_STATE block in an application. All inputs and outputs are Boolean values. The two inputs of the block, DOWNLOAD_OKand REBOOT_OK, are driven from user defined logical circuits. The APP_STATE block output, DOWNLOADING, is aBoolean variable that indicates when a download is in progress. If the DOWNLOADING output of APP_STATE block isTrue, then any changes to the DOWNLOAD_OK and REBOOT_OK input pins will not change the existing download andreboot check status. Therefore, during downloading changes to the input pins are reflected in the download and reboot checksonly after the current download has been completed (when DOWNLOADING is False).
APP_STATE Block
Attention
If the APP_STATE block must perform download and reboot checks every frame, thetask containing the block must also run every frame.
ToolboxST Configuration
The APP_STATE block must not be used until after the input pins are configured. Configuring the APP_STATE blockinvolves the creation of suitable logic to drive the DOWNLOAD_OK and REBOOT_OK input pins. The user must create thislogic and consider the necessary inputs from field or application to produce Boolean signals for driving the APP_STATEblock inputs. The following figure is an example of possible input configuration where two control logics drive the two inputsof APP_STATE block.
APP_STATE Block Configuration
Instruction Guide GEI-100682AJ 27Public Information
Impact of APP_STATE on Different Types of Downloads
All types of downloads including I/O pack, online, and offline (except Update DDR and Device Backup) are impacted by theAPP_STATE block. Update DDR and Device Backup are not affected. If the DOWNLOAD_OK input of the APP_STATEblock is True, all downloads will be allowed. If the DOWNLOAD_OK input is False, no downloads (except Update DDRand Device Backup) will be allowed. The same rule applies when an I/O pack parameter download is requested from theComponent 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 isFalse, 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 beendownloaded to the Mark VIe controller. After adding the block, if the user does not want to perform download and rebootchecks, then this feature can be disabled by forcing the DOWNLOAD_OK and REBOOT_OK inputs to True.
Precautions Before APP_STATE Deletion, Relocation, or Causing a Major Revision Mismatch
Attention
Removing the APP_STATE block from an application is not recommended as it addsprotection for the equipment.
The user must be very careful when either deleting or relocating the APP_STATE block or when generating a majordifference (for example, compressing variables or changing the network redundancy) with the controller. These operationscause the variable addresses of the APP_STATE block to either change or be removed. In this case, if the current runningapplication has downloads/reboots disabled, there is no way to force the controller to allow downloads/reboots with the newapplication. If this occurs the unit under control must be put in a state that allows downloads/reboots or, if appropriate, theuser must connect to the controller using the actively running application to force the DOWNLOAD_OK and REBOOT_OKinput pins to True.
Inputs
Name Data Type Description
DOWNLOAD_OK BOOLWhen set to True, the controller allows downloads to occur.When set to False, the controller rejects downloads.
REBOOT_OK BOOLWhen set to True, the controller allows reboots to occur.When set to False, the controller rejects reboots.
Output
Name Data Type Description
DOWNLOADING BOOL True when a download is in progress
28 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Average (ARRAY_AVERAGE)Block Category: Array
The Array Average (ARRAY_AVERAGE) block performs the average of the input array IN at each scan the ENABLE pin isTrue. 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 performeddepends on the type enumerated on the TYPE pin.
Average Types
Average Type Value DescriptionAverage Linear 1 Average of the elements of input IN(n).
Average Linear Angle 2
Average of the elements of angle based inputs IN(n). It takes into account 0 degreesequals/360 degrees wrap-around for angles. For each Linear Angle data point, thedirection vector is broken down into its corresponding x and y components. x(n)=cosine(IN(n)), y(n)=sine(IN(n)). The average of the x and y components are computed separately.After the result is calculated, a final resulting output, OUT is determined from the x and ycomponents. Out = arctangent(y/x).
Average Cosine Phi 3
Average calculations are first calculated using:y(n) = abs(IN(n))/IN(n) x arccos(abs(IN(n))).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 DescriptionENABLE BOOL Enable the block to runIN REAL/LReal array Input Variable Array
TYPE ENUM(INT) Average Type
N Unsigned double integer Constant number of IN values to averageINDEX_ENABLE BOOL array Defines which array elements are included in the average.
Output
Name Data Type DescriptionOUT REAL Current average
Instruction Guide GEI-100682AJ 29Public Information
Array Calculator (ARRAY_CALC)Block Category: Array
The Array Calculator (ARRAY_CALC) block is an expandable block that performs mathematical operations, defined by theequation 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 inthe INDEX_ENABLE array is True, and places the result in the output variable, OUT(x). The data type of the inputs andoutput is implied by the block data type selected in the Block Properties. Any modification to the equation string EQUATrequires a re-download to the controller.
The INDEX_ENABLE pin is a Boolean array that determines whether the calculation specified by EQUAT is enabled forelements “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 areenabled 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 appliedto 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 angleoperands 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, anequation to ADD two input variables A+B, has two Operands (A and B) and one Operator (+): a total of three elements.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of VariantBlock.
30 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
ARRAY_CALC Block
Inputs
Name Data Type DescriptionENABLE BOOL Enable the block to runA ANY_NUM_array† First operand↓ ↓ ↓H ANY_NUM_array† Eighth operand
N UINT Number of element of the array to evaluate.INDEX_ENABLE BOOL array Defines which array elements are calculated per the equationEQUAT String Equation string to be performed† Array inputs are at least size N or a scalar.
Output
Name Data Type DescriptionOUT ANY_NUM_array† Output Array† Array inputs are at least size N or a scalar.
Instruction Guide GEI-100682AJ 31Public Information
Array Compare (ARRAY_COMPARE)Block Category: Array
The Array Compare (ARRAY_COMPARE) block compares two input values and sets an output Boolean as the result. Theinput 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 atleast size N or a scalar.
ARRAY_COMPARE Block
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of VariantBlock.
Comparison Functions
Function DescriptionGT Greater thanGE Greater than or equalEQ EqualNE Not equalLT Less thanLE Less than or equal
32 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
COMPARE Blocks
Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity refers to thetolerance 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 specificationby the value of HYST amount before it evaluates to False.
Greater Than
Instruction Guide GEI-100682AJ 33Public Information
Greater Than or Equal To
Equal To
34 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Not Equal
Less Than or Equal To
Instruction Guide GEI-100682AJ 35Public Information
Less Than
Inputs
Name Data Type DescriptionIN1 ANY_NUM_array The input to compareIN2 ANY_NUM_array The input to compare against
FUNC ENUM (INT) The comparison function (GT, LT, GE, LE, EQ, NE) (Default: GT)HYST ANY_NUM The hysteresis valueSENS ANY_NUM The sensitivity valueN UINT Number of elements in comparison
Output
Name Data Type DescriptionOUT BOOL array The result of the comparison
36 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Compress Boolean (ARRAY_COMPRESS)Block Category: Boolean Operations
The Array Compress Boolean (ARRAY_COMPRESS) block packs up Boolean input arrays into a single integer arrayvariable. For example, if the input Booleans for a particular array index contain the values 0000 0000 0000 0101, the outputinteger for that index will contain the value 5. The least significant input bit is IN0(x) and the most significant input bit isIN15(x). Each input IN0-IN15 may be either a Boolean array or a single Boolean value. If the input is a single Boolean, itsvalue is used when compressing for all array indexes.
This is a rubber block that can accept a maximum of 16 inputs.
Note The Array Expand Integer (ARRAY_EXPAND) block performs the opposite operation of the ARRAY_COMPRESSblock.
ARRAY_COMPRESS Block
Inputs
Name Data Type DescriptionIN0 BOOL or BOOL array Contains the first input (least significant binary digit)↓ ↓ ↓IN15 BOOL or BOOL array Contains the sixteenth input (most significant binary digit)N UINT Number of elements to compressINDEX_ENABLE BOOL array Defines which array elements are included in the compress
Output
Name Data Type DescriptionOUT UINTarray Contains the packed information
Instruction Guide GEI-100682AJ 37Public Information
Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI)Block Category: Boolean Operations
The Array Compress Boolean (ARRAY_COMPRESS) block packs up Boolean input arrays into a single integer arrayvariable. For example, if the input Booleans for a particular array index contain the values 0000 0000 0000 0101, the outputinteger for that index will contain the value 5. The least significant input bit is IN0(x) and the most significant input bit isIN31(x). Each input IN0-IN31 may be either a Boolean array or a single Boolean value. If the input is a single Boolean, itsvalue is used when compressing for all array indexes.
This is a rubber block that can accept a maximum of 32 inputs.
Note The Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) block performs the opposite operation of theARRAY_COMPRESS_UDI block.
ARRAY_COMPRESS_UDI Block
Inputs
Name Data Type DescriptionIN0 BOOL or BOOL array Contains the first input (least significant binary digit)↓ ↓ ↓IN31 BOOL or BOOL array Contains the thirty-second input (most significant binary digit)N UINT Number of elements to compressINDEX_ENABLE BOOL array Defines which array elements are included in the compress
Output
Name Data Type DescriptionOUT UINTarray Contains the packed information
38 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Empty (ARRAY_EMPTY)Block Category: Array
The Array Empty (ARRAY_EMPTY) block empties array elements into individual output pins. It is expandable up to 32outputs. The block works in reverse of the ARRAY_FILL block. When the IN_INDEX input is 0 (default), the array copystarts at 0 offset of the IN_ARRAY. OUT1 = IN_ARRAY[0], OUT2 = IN_ARRAY[1] and so forth. When the IN_INDEXinput is > 0, the block checks if there is a big enough array connected to the IN_ARRAYpin. 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_INDEXshould 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 thearray is the same as the output pins.
ARRAY_EMPTY Block
Inputs
Name Data Type DescriptionENABLE BOOL Block enable (Default: True)IN_ARRAY ANY Input arrayIN_INDEX Unsigned Long Offset in input array to start copy
Outputs
Name Data Type DescriptionOUT1 ANY Output 1↓ ↓ ↓OUT32 ANY Output 32
Instruction Guide GEI-100682AJ 39Public Information
Array Expand Integer (ARRAY_EXPAND)Block Category: Boolean Operations
The Array Expand Integer (ARRAY_EXPAND) block transforms the unsigned integer input array into its binary equivalentform and stores the expanded information into 16 Boolean output arrays. For example, if the value of the input for a particularindex is 5, the output Booleans contain the values 0000 0000 0000 0101 at the same array index. The least significant outputbit is pin OUT0(x) and the most significant output bit is pin OUTF(x).
Note The Array Compress Boolean (ARRAY_COMPRESS) block performs the opposite operation of the ARRAY_EXPANDblock.
ARRAY_EXPAND Block
Inputs
Name Data Type DescriptionIN UINTarray Value to expandN UINT Number of elements to expandINDEX_ENABLE BOOL array Defines which array elements are included in the expansion
Outputs
Name Data Type DescriptionOUT0 BOOL array Contains the results of the expansion process (least significant binary digit)↓ ↓ ↓OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)↓ ↓ ↓
OUTF BOOL array Contains the results of the expansion process (most significant binary digit)
40 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Expand Integer Long Integer (ARRAY_EXPAND_UDI)Block Category: Boolean Operations
The Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) block transforms the unsigned integer input array into itsbinary equivalent form and stores the expanded information into 32 Boolean output arrays. For example, if the value of theinput for a particular index is 5, the output Booleans contain the values 0000 0000 0000 0101 at the same array index. Theleast significant output bit is pin OUT0(x) and the most significant output bit is pin OUT1F(x).
Note The Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI) block performs the opposite operation of theARRAY_EXPAND_UDI block.
ARRAY_EXPAND_UDI Block
Instruction Guide GEI-100682AJ 41Public Information
Inputs
Name Data Type DescriptionIN UINTarray Value to expandN UINT Number of elements to expandINDEX_ENABLE BOOL array Defines which array elements are included in the expansion
Outputs
Name Data Type DescriptionOUT0 BOOL array Contains the results of the expansion process (least significant binary digit)↓ ↓ ↓OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)↓ ↓ ↓
OUT1F BOOL array Contains the results of the expansion process (most significant binary digit)
42 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Fill (ARRAY_FILL)Block Category: Array
The Array Fill (ARRAY_FILL) block fills an output array with input values. It is expandable up to 32 inputs. When theOUT_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 connectedto the OUT_ARRAYpin. If the array does not have enough space the block does nothing. If the array size is within the copyrange it starts copying from the offset. As a rule OUT_INDEX should be less than [Length of OUT_ARRAY minus Numberof 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 arrayis the same as the input pins.
ARRAY_FILL Block
Inputs
Name Data Type DescriptionENABLE BOOL Block enable (Default: True)OUT_INDEX BOOL Offset to start copy in output arrayIN1 ANY Input 1↓ ↓ ↓IN32 ANY Input 32
Output
Name Data Type DescriptionOUT_ARRAY ANY Destination array
Instruction Guide GEI-100682AJ 43Public Information
Array Find Element (ARRAY_FIND)Block Category: Array
The Array Find Element (ARRAY_FIND) block determines if a given value is present in a given array and reports a Booleanstatus as to whether the value is found in the array. If the value is found, the block reports the index of the array elementcontaining the value. It also supports the ability to specify the starting index in the array from which to search (default is fromthe start of the array). Additionally, it supports sensitivity input to be used when evaluating equality. If multiple arrayelements contain the given value, the ARRAY_FIND block returns the index of the first matching element.
Note This is a variant block that supports the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer, and Boolean. Refer to the section Change Data Type of Variant Block.
ARRAY_FIND Block
Inputs
Name Data Type DescriptionENABLE BOOL Enable the block to run
IN_INDEX UDINTInteger zero-based array index to begin searching from (default of 0, or beginning ofthe array). This should be less than the size of the array. If this value is greater thanthe size of the array, then the search will begin from the beginning of the array.
IN_ARRAY[ ] ANY_NUM array Input array to be searchedIN_VALUE ANY_NUM Value to be searched for in the array
SENS ANY_NUMSensitivity value. This is not applicable for the Boolean block data type. If SENS isless than 0, it will be treated as 0.
Outputs
Name Data Type DescriptionOUT BOOL Result of the find. True indicates that the value was found in the array.OUT_INDEX UDINT Integer zero-based array index of the array element that matched the value.
44 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Minimum/Maximum Element Determination(ARRAY_MINMAX)Block Category: Array
The Array Minimum/Maximum Element Determination (ARRAY_MINMAX) block finds the location and value of theminimum or maximum element in a given array. The input is a column array (IN) holding the floating-point/double entriesaccording to the variant of the block. The input pin N (specifying the size of the array) is an immediate pin. Therefore, itcannot 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 elementsthan 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 DescriptionENABLE BOOL Enable the block to runN Constant UINT Number of elements in input array ININDEX_ENABLE BOOL array Defines which array elements determine MAX/MININ[ ] ANY_NUM array Array holding elementsFUNC Constant UINT Choice of operation { 0 for Maximum,1 for Minimum }
Outputs
Name Data Type DescriptionINDEX UINT Integer Zero-Based array Index for Min/Max Element (1st instance)VALUE ANY_NUM Value of Min/Max element found
Instruction Guide GEI-100682AJ 45Public Information
Array Relay Ladder Logic (ARRAY_RUNG)Block Category: Array
The Array Relay Ladder Logic (ARRAY_RUNG) block solves a Boolean equation of up to 16 input arrays. The arrays are ofsize at least N. The equation is specified as a character string or can be configured through the Relay Ladder Logic editor inthe ToolboxST application. The equation may consist of up to 128 elements, or combinations of operators and operands. Forexample, the equation A + B contains two operands and one operator for a total of three elements.
Supported Operators
Operation OperatorParenthesis ( )NOT ~OR +AND *
RUNG Block
Inputs
Name Data Type DescriptionEQN Constant String Boolean equationA BOOL array Required Boolean input used in equation↓ ↓ ↓P BOOL array Boolean input used in the equationNVal Unsigned double integer Number of elements to evaluate
Output
Name Data Type DescriptionOUT_ARRAY BOOL array The result of the equation
46 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Array Sum (ARRAY_SUM)Block Category: Array
The Array Sum (ARRAY_SUM) block performs a summation of all the elements of the input array IN. It includes theelement for which the corresponding INDEX_ENABLE array element is True.
ARRAY_SUM Block
Inputs
Name Data Type DescriptionENABLE BOOL Enable the block to runIN REAL/LReal array Input Variable ArrayN Unsigned double integer Constant number of IN values to be summedINDEX_ENABLE BOOL array Defines which array elements are included in the summation
Output
Name Data Type DescriptionOUT REAL Current sum
Instruction Guide GEI-100682AJ 47Public Information
Average Input (AVRG)Block Category: Math
The Average Input (AVRG) block performs a rolling average on the last N values of the input IN at each scan the ENABLEpin 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 pinto 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 DescriptionENABLE BOOL Block enable (Default: True)IN REAL† Last input to be included in the rolling averagePRESET BOOL True to initialize all N values of ARRAY to current value of INN Unsigned double integer Constant number of IN values to average† Value with status, if status option is enabled.
Outputs
Name Data Type DescriptionOUT REAL† Current rolling average
ARRAY[N] REALStorage for last N values of input, IN. This array must be defined withat least N elements
† Value with status, if status option is enabled.
48 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Bit Counter (BIT_CNTR)Block Category: Boolean Operations
The Bit Counter (BIT_CNTR) block counts the number of Boolean inputs that are currently set to 1. This is a rubber blockthat 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 DescriptionIN1 BOOL Input Boolean variable 1↓ ↓ ↓IN32 BOOL Input Boolean variable 32
Output
Name Data Type DescriptionCOUNT UINT Number of input bits set to True
Instruction Guide GEI-100682AJ 49Public Information
Boolean Alarm (BOOLEAN_ALARM)Block Category: Boolean Operations
The Boolean Alarm (BOOLEAN_ALARM) block documents the alarm configuration of a Boolean variable. It has noassociated runtime operation; it is effectively an application code comment. When the IN pin is connected to a Booleanvariable, the block displays the alarm configuration for that variable.
ToolboxST Configuration
➢➢ To insert the BOOLEAN_ALARM block in the ToolboxST application
1. From the Tree View, select a task to display the Block Diagram Editor in the Summary View.
2. From the Library View, select the BOOLEAN_ALARM block and drag and drop into the Diagram Editor.
Inserted BOOLEAN_ALARM Block
50 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
3. Double-click the IN pin and connect the global variable to the input.
a. Select Global Variable, then select (check) Create variable and enter the variable name, or click BrowseGlobals to select a variable. Click OK.
BOOLEAN_ALARM Block Global Variable Connected to the Input
4. From the Block Diagram Editor, double-click the BOOLEAN_ALARM block and select the variable name.
Instruction Guide GEI-100682AJ 51Public Information
5. From the Property Editor, select Alarm, and then select Alarmed from the drop down list.
Configured BOOLEAN_ALARM Block
Inputs
Name Data Type DescriptionIN BOOL Connect to a Boolean variable to document its alarm configurationUnshelve† BOOL When set to True when the alarm is shelved, will cause the alarm to unshelve† Available only when the Alarm Shelving property is set to Enabled
52 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Bubble Sort (BSORT)Block Category: Array
The Bubble Sort (BSORT) block sorts the input array, SRC, of data and transfers it to the sorted array, DEST. BSORT isoptimized for small variation in the input data, SRC[ ], between task performance by initially using the mapping from theprevious task scan, stored in array, INDEX[ ], to move the data in SRC[ ] to the output array, DEST[ ]. The algorithm checksthe array to make sure it is sorted using a comparison system and corrects any errors using a bubble sort algorithm. Thenumber 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 DescriptionENABLE BOOL Block enable (Default: False)N UDINT Number of elements in the array to be sortedSRC[ ] REAL The input array
Outputs
Name Data Type DescriptionDEST[ ] REAL The sorted arrayINDEX[ ] UDINT The mapping used to take the source array to the destination array
Instruction Guide GEI-100682AJ 53Public Information
Calculator (CALC)Block Category: Math
The Calculator (CALC) block is an expandable block that performs mathematical operations as defined by the equation stringon 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 inputsand output is implied by the block data type selected in the Block Properties. Any modification to the equation string EQUATrequires a re-download to the controller.
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the CALC block.
The following operators are supported within EQUAT:
Note The equation must be stated in terms of the operators and the A through H operands. The trigonometric functionsexpect angle operands to be expressed in units of radians.
+ (add), - (subtract), * (multiply), / (divide), ^ (power),
% (modulus), ABS() (absolute value), NEG() (negate),
LOG() (logarithm, base 10), LN() (natural logarithm),
EXP() (Exponential, e^x), RECIP (1/x)
RND() (round to nearest integer), SQR() (square root),
COS() (cosine), SIN() (sine), TAN() (tangent),
ACS() (arccosine), ASN() (arcsine), ATN() (arctangent).
There is a limit of 64 elements (Operands and Operators) that may be specified in the equation string. For example, anequation to ADD two input variables A+B, has two Operands (A and B) and one Operator (+): a total of three elements.
CALC Block
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of VariantBlock.
54 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
This block propagates quality status if the status operations are enabled.
Block status modifications:
• When using the division operator (/), if the denominator = 0, the denominator will be replaced by 3.4e-38. The status willbe 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 eitherLOW_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 theinput. 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 DescriptionENABLE BOOL Block enable (Default: True)A ANY_NUM† First operandB ANY_NUM† Second operandC ANY_NUM† Third operand↓ ↓ ↓H ANY_NUM† Eighth operandEQUAT String Equation string to be performed† Value with status, if status option is enabled.
Output
Name Data Type DescriptionOUT ANY_NUM† Output† Value with status, if status option is enabled.
Instruction Guide GEI-100682AJ 55Public Information
Capture Data (CAPTURE)Block Category: System
The Capture Data (CAPTURE) block collects multiple samples of 1 to 32 variables in a buffer that can be uploaded toToolboxST application or the Data Historian for display and analysis. Multiple clients may upload the same buffer. The blocksupports 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 timeoutfrom the last upload.
CAPTURE Block
CAPTURE Block Expanded
56 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Inputs
Name Data Type Function Description
TR_TYPEConstantTr_Type_T
Trigger Type
The sensitivity applied to the trigger condition for trigger evaluation. (Default:Level)
Edge (1) – If the current trigger condition is True and the previous triggercondition is False, the trigger is True
Level (2) – If the current trigger condition is True, the trigger is True
AUTOENAConstantBOOL
Automatic EnableIf True, the block is automatically re-enabled for a new capture after thebuffer is uploaded. Note: if automatic enabling is selected all manual enableinputs are ignored. (Default: False)
ATOUTConstantUDINT
Automatic EnableTimeout
The number of seconds after the last upload before capturing is re-enabled –only applicable if AUTOENA is True. (Default: 60 seconds)
BUF_CTLConstantBuf_Ctl_T Buffer Control
Buffer Control – Controls how and when the data is collected. (Default:NORMAL)
NORMAL (1) – PRE_SAM samples are collected before a trigger event.POSTSAM samples are collected after the trigger event. Samples arecollected every FMULTscans. Capturing stops when the specified sampleshave 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 FMULTscans. Thebuffer contains the newest PRE_SAM + POSTSAM samples unlesscapturing is stopped prior to filling the buffer. Capturing stops when anupload command is received, or when the ENA_CAP pin transitions to Falseif automatic re-enabling is not selected.
ONLY (3) – The trigger condition is evaluated each scan. Samples are onlycollected 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 uploadcommand is received, or when the ENA_CAP pin transitions to False ifautomatic re-enabling is not selected.
ENA_CAP BOOL Manual Enable
If True and the AUTOENA pin is False, enable the block for capture. This pingives the application code the ability to enable and disable data collection.This is an edge-triggered pin. Once a capture has been stopped the pin mustbe toggled False and then True again to re-enable the next capture. (Default:False)
FMULTConstantUINT
Sample PeriodMultiplier
Allows data to be collected slower than the performance rate of the block(scan period) by specifying a multiple of the scan period for samples to betaken (only applies to Normal and Circular buffer control) (Default: 1)
If a zero value is given, then the block will treat it as one Frame multiple.
POSTSAMConstantUDINT
Post TriggerSample Size
The number of samples to collect after and including the trigger event.(Default: 100)
PRE_SAM ConstantUDINT
Pre TriggerSample Size
The number of samples to collect prior to the trigger event. (Default: 10)
Instruction Guide GEI-100682AJ 57Public Information
Inputs (continued)
Name Data Type Function Description
TR_CONDConstantTr_Cond_T
Trigger Condition
The relational comparison between the trigger variable (TR_VAR) and thetrigger value (TR_VAL), to be evaluated by the triggering logic each scan,(Default: NE)
EQ (1) – TR_VAR must equal to TR_VAL
GT (2) – TR_VAR must be greater than TR_VAL
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
TR_VAL ConstantLREAL
Trigger ValueThe value compared against the trigger variable for trigger evaluation.(Default: 0)
TR_VAR ANY Trigger Variable The variable against which the trigger condition is evaluated. (Default: 0)
TSTAMPConstantBOOL
Time StampEnable
If True, the UTC time of each sample is collected with the sample. (Default:False)
VAR1 ANYCollectedVariables
One to thirty-two variables to be collected each sample. The trigger variableis not required to be one of the captured variables, but including it in thevariable list normally adds value to the collection.
↓ ↓ ↓ ↓
VAR32 ANYCollectedVariables
One to thirty-two variables to be collected each sample. The trigger variableis not required to be one of the captured variables, but including it in thevariable list normally adds value to the collection.
UPL_TYPE Upl_Type_T
Manual (1) – Captured data must be manually uploaded by the user.
Automatic (2) – Captured data is automatically uploaded by the datacollection system.
Trip (3) – Captured data is automatically uploaded by the data collectionsystem and is incorporated as part of the trip log.
Flash (4) – Captured data is written to flash disk on the controller. The lastthree samples are preserved after which the oldest one is overwritten. Thisworks only when the BUF_CTL is set to NORMAL.
TripFlash (5) - This type is a combination of Trip and Flash types. TheCaptured data is automatically uploaded by the data collection system and isincorporated as part of the trip log. Also, the captured data is written to flashdisk on the controller and the last three samples are preserved after whichthe oldest one is overwritten. Note: For proper operation, the BUF_CTL mustbe set to NORMAL and the Compressed Data Log (CDL) feature must beenabled.
58 GEI-100682AJ GEI-100682 Mark VIe Controller Standard Block LibraryPublic Information
Outputs
Name Data Type Function Description
STATUS UINT Capture Status
The current status of the capture:DISABLED (0) – Not runningWAITING FOR TRIGGER (1) – Collecting pre-trigger samplesCAPTURING (2) – Collecting post-trigger samplesCAPTURE COMPLETE (3) – Data ready to be uploadedLOCKED (8003H) – The buffer is locked by an upload to another clientFLASH WRITING (4) – The captured samples are being written to flash.
DONE BOOL Capture Done Set to True when a buffer is ready to be loaded
Theory of OperationThe Capture block is a software function used to collect application variables in real-time for offline display and analysis. Thecore software is shared between the Capture block and Dynamic Data Recorders (DDRs). The main differences between themare:
• Capture blocks require an application code download to configure, while DDRs are configured by an independentdownload mechanism.
• Capture blocks are embedded in the application code and can be used to catch events that occur between application codeblocks. DDRs perform outside of the application code and can only sample data after all of the application code hasperformed in a particular frame.
• Capture blocks perform at the same priority as the other application code and so insure the highest data fidelity. DDRsperform 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 beuploaded to one or more client devices. Once uploaded the block may be re-armed to take another collection. Typically, forclients other than ToolboxST application the status pin must be mapped to EGD so that it can be monitored outside thecontroller. 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 clientshave been serviced.
Data collection is managed by specifying a buffer control mode and a trigger event. There are three buffer control modes. ANORMAL collection is one where a specified number of samples are collected prior to a trigger event and a specified numberof 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 ishalted by requesting an upload or disabling the block. An ONLY collection is one where samples are only collected if thespecified trigger event is True each opportunity the block has to collect a sample. This is useful when collecting data aroundan event that occurs sporadically.
A trigger event is completely specified by selecting a trigger condition, a