Mark Vie Controller: Standard Block Library
Mark Vie Controller: Standard Block Library
Mark Vie Controller: Standard Block Library
Updated to include the UCPA platform, and clarification on hardware sensors that
Temperature Status (TEMP_STATUS)
are only in the UCCx platform
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.
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.
Note The Block Data Type is set in the block Property Editor.
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.
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.
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.
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.
ANALOG_ALARM Block
Optionally, choose a
block template. From
the drop down menu,
select a template and
click OK.
5. Double-click the block to view the alias names if they were defined using a block template.
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
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
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.
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
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
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.
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.
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
Greater Than
Equal To
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
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
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
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.
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
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
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
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.
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
Select the
variable name.
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
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
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.
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.
• 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.
CAPTURE Block
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
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
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.
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.
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.
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.
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.
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
States
Name Data Type Description
STATE Any Last value of the input
NZFLAG Boolean Near Zero Flag. Not used for CHG_DET_B.
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:
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.
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
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
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).
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.
Not Equal
Less Than
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
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
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
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).
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
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
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
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
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
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
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
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.
Inputs
Name Data Type Description
NUM Any_num† Numerator
DENOM Any_num† Denominator
† Value with status, if status option is enabled.
Outputs
M Real† Mantissa
† Value with status, if status option is enabled.
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.
Output
Name Data Type Description
OUT Boolean The result of the comparison
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)
EXPAND_UDI Block
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)
FIR Block
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.
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
Square
Sine
Ramp
Triangular
FUNGEN Block
Output
Name Data Type Description
OUTPUT Real Output of the function
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.
Output
Name Data Type Description
OUT Boolean Result of the comparison
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
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
Output
Name Data Type Description
OUT Boolean The result of the comparison
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.
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
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:
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.
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]
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.
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]).
Outputs
Name Data Type Description
OUT Real† Interpolated output
M Real Slope of the output function
†Value with status, if status option is enabled.
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]).
Output
Name Data Type Description
F Real† Function output
† Value with status, if status option is enabled.
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.
This block propagates quality status if the status operations are enabled.
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.
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
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.
LEAD_LAG Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING)block.
Output
Name Data Type Description
OUT Real† Output value
† Value with status, if status option is enabled.
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.
Output
Name Data type Description
OUT Boolean The result of the comparison
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.
Output
Name Data Type Description
OUT Boolean Result of the comparison
LD_MAN Block
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
Track Type enumeration, CMD_TRK is used when a Command track enumeration output is required.
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
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
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
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.
ToolboxST Configuration
Refer to the Logic Builder (LOGIC_BUILDER) block section Configuration.
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
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
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
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
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
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
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
MEDIAN Block
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
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.
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:
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.
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.
• 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
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
• Combines two smaller matrices into one large matrix by either stacking them on top of each other or setting them
side-by-side
• Merges one small matrix into another big matrix, and as a result, some content in the big matrix is replaced by the content
of the small matrix
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online.
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
Merge
• 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
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
• 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
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
• 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
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
• 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
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.
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
MFIND Block
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
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
• 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
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
• 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
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
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online.
Note The indices defining the column and row start and end locations.
Example
ROWS_B=2 COLS_B=2 B=
• 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
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
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
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
• 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
MODSEL Block
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.
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].
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.
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)
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)
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.
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)
NANCHECK Block
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
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.
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.
Output
Name Data Type Description
OUT Boolean The result of the comparison
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
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
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
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
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:
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
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.
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
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
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
RATELIM Block
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
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.
RATEMON 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.
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
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
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.
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.
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.
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.
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.
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
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
SMGR Block
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
SMB Block
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
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.
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
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
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
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].
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.
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.
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
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
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
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
• 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).
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.
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).
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
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.
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.
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.
SYS_OUTPUTS Block
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.
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
UCCA and UCCC Setpoint for declaring the alarm. Ignored unless USR_ENA is True.
TEMP_STATUS Outputs
BRD_TEMP Real UCPA, UCSA, and UCSB Processor board hot spot temperature in °C
TIME_MON Block
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
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.
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.
TIMER_V2 Block
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.
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
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.
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].
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.
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
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
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.
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
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
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
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.
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.
• 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.
Loss of Input
FRAME 1 2 3 4 5
Health Uncertain Bad
Values Hold last Default
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.
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.
Outputs
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
Connected variable
PAIC Variable
Panel.Pack_TerminalBoardLocation_Temperature_Pack Connector
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
Panel.LogicCheckingRelayPack _Location_PackLogic
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
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
Note From the ToolboxST Component Editor Software tab, press F1 for more information on the ControllerStateHeartbeat
intrinsic variable.
CALC MOVE
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
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.