Professional Documents
Culture Documents
Mark Vie Controller: Standard Block Library
Mark Vie Controller: Standard Block Library
Public Information
Document Updates
Rev Location Description
Change Detection (CHG_DET) Updated the STATE pin Description in the States table
Updated the block description
AK
NaN Check (NANCHECK) Removed UDINT from the SRC pin Data Type in the Inputs table
Updated the SRC pin Description in the Inputs table
Combined and clarified the Precautions Before APP_STATE Deletion,
Application State (APP_STATE)
AJ Relocation, or Causing a Major Revision Mismatch
Time Monitor (TIME_MON) Updated the Data Type for the UTCTIME output to UDINT
Capture Data (CAPTURE) Updated table entry UPL_TYPE description to include TripFlash
AH
Command Disable (CMD_DISABLE) New block
Modbus Master Read (MBUS_READ)
New blocks
Modbus Master Write (MBUS_WRITE)
Updated MAX_TIME to MAXTIME
AG Timer (TIMER)
Added Note to clarify when AT_TIME goes True
Updated MAX_TIME to MAXTIME and mCurTime to CURTIME
Timer Version 2 (TIMER_V2)
Added Note to clarify when AT_TIME goes True
Controller Monitor (CTRLR_MON)
AF Updated to include the UCSD controller platform
Temperature Status (TEMP_STATUS)
IO-Link Device Read (IO_LINK_DEVICE_READ)
AE New blocks
IO-Link Device Write (IO_LINK_DEVICE_WRITE)
Updates to increase number of supported totalizers (counters) and pins
Totalizer (TOTALIZER)
from 64 to 128
AD Added health support of a regular variable directly from an EtherCAT input
Variable Health (VAR_HEALTH) signal and removed support for an internal state variable (a connected
internal state variable results in health always True)
Array Compress Boolean (ARRAY_COMPRESS)
Array Compress Boolean (ARRAY_COMPRESS_
UDI) New blocks
AC Array Expand Integer (ARRAY_EXPAND)
Array Expand Integer (ARRAY_EXPAND_UDI)
Updated the Description in the Comparison Functions table for LE and LT
Array Compare (ARRAY_COMPARE)
Updated Data Type for N in the Inputs table
Updated for consistency and clarification as to what information applied to
AB Variable Health (VAR_HEALTH)
I/O packs or EGD
AA Timer (TIMER) Corrected parameter name from mCurTime to CURTIME
Controller Monitor (CTRLR_MON) Updated for the UCSC controller platform
Z
Temperature Status (TEMP_STATUS) Updated for the UCSC controller platform
Y Interpolator DL (INTERP_DL) A better description of the FTBL input array
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.
Note LEGACY category blocks are hidden by default in the ToolboxST application. Refer to the ToolboxST User Guide for
Mark Controls Platform (GEH-6700 or GEH-6703) for steps to display these blocks if needed for legacy support.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
ABS Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Input
Name Data Type Description
IN ANY_NUM† Input value
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY_NUM† Absolute value of the input
† Value with status, if status option is enabled.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
ADD Block
Inputs
Name Data Type Description
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY_NUM† Output
† Value with status, if status option is enabled.
ANALOG_ALARM Block
3. Enter a name for the Alarm Block Template and click OK.
5. From the Editor Tree View, select the template and enter an Alias for each SubVariable in the Data Grid as needed.
3. Optionally, choose a block template. From the drop down menu, select a template and click OK.
6. From the Block Diagram Editor, double-click the Analog Alarm block and select the variable name.
7. From the Property Editor, select Alarm and select an available Analog Alarm Definition from the drop down menu.
9. From the Property Editor, select Alarm Shelving and select Enabled from the drop down menu.
12. Double-click the block to view the alias names if they were defined using a block template.
Outputs
Alarm Type
Name Data Type Description
Configuration†
Alarm flag for Bad Quality. For BQ to be available, IN must be
BQ BOOL BQ
connected to a variable with status.
H BOOL Alarm flag for High H
HH BOOL Alarm flag for High High HH
HHH BOOL Alarm flag for High High High HHH
L BOOL Alarm flag for Low L
LL BOOL Alarm flag for Low Low LL
LLL BOOL Alarm flag for Low Low Low LLL
DH BOOL Alarm flag for Deviation High DH
RH BOOL Alarm flag for Rate of Change High RH
† Associated output is only available if the specific alarm type is configured
ANY_FORCES Block
Input
Name Data Type Description
YES BOOL True if any variables are forced
Output
Name Data Type Description
NUMVARS INT Number of variables currently forced
APP_STATE Block
If the APP_STATE block must perform download and reboot checks every frame, the
task containing the block must also run every frame.
Attention
ToolboxST Configuration
The APP_STATE block must not be used until after the input pins are configured. Configuring the APP_STATE block
involves the creation of suitable logic to drive the DOWNLOAD_OK and REBOOT_OK input pins. The user must create this
logic and consider the necessary inputs from field or application to produce Boolean signals for driving the APP_STATE
block inputs. The following figure is an example of possible input configuration where two control logics drive the two inputs
of APP_STATE block.
Attention
The user must be very careful when either deleting or relocating the APP_STATE block or when generating a major
difference (for example, compressing variables or changing the network redundancy) with the controller. These operations
cause the variable addresses of the APP_STATE block to either change or be removed. In this case, if the current running
application has downloads/reboots disabled, there is no way to force the controller to allow downloads/reboots with the new
application. If this occurs the unit under control must be put in a state that allows downloads/reboots or, if appropriate, the
user must connect to the controller using the actively running application to force the DOWNLOAD_OK and REBOOT_OK
input pins to True.
Inputs
Name Data Type Description
When set to True, the controller allows downloads to occur.
DOWNLOAD_OK BOOL
When set to False, the controller rejects downloads.
When set to True, the controller allows reboots to occur.
REBOOT_OK BOOL
When set to False, the controller rejects reboots.
Output
Average Types
Average Type Value Description
Average Linear 1 Average of the elements of input IN(n).
Average of the elements of angle based inputs IN(n). It takes into account 0 degrees
equals/360 degrees wrap-around for angles. For each Linear Angle data point, the
direction vector is broken down into its corresponding x and y components. x(n)=cosine(IN
Average Linear Angle 2
(n)), y(n)=sine(IN(n)). The average of the x and y components are computed separately.
After the result is calculated, a final resulting output, OUT is determined from the x and y
components. Out = arctangent(y/x).
Average calculations are first calculated using:
y(n) = abs(IN(n))/IN(n) x arccos(abs(IN(n))).
Average Cosine Phi 3
If average y(n) is yAvg, then OUT = cos(yAvg).
For average type = cosine phi, the value of IN(n) is restricted to be within -1 to 1.
ARRAY_AVERAGE Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
IN REAL/LReal array Input Variable Array
TYPE ENUM(INT) Average Type
N Unsigned double integer Constant number of IN values to average
INDEX_ENABLE BOOL array Defines which array elements are included in the average.
Output
Name Data Type Description
OUT REAL Current average
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
A ANY_NUM_array† First operand
↓ ↓ ↓
H ANY_NUM_array† Eighth operand
N UINT Number of element of the array to evaluate.
INDEX_ENABLE BOOL array Defines which array elements are calculated per the equation
EQUAT String Equation string to be performed
† Array inputs are at least size N or a scalar.
Output
Name Data Type Description
OUT ANY_NUM_array† Output Array
† Array inputs are at least size N or a scalar.
ARRAY_COMPARE Block
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
Comparison Functions
Function Description
GT Greater than
GE Greater than or equal
EQ Equal
NE Not equal
LT Less than
LE Less than or equal
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
FUNC ENUM (INT) The comparison function (GT, LT, GE, LE, EQ, NE) (Default: GT)
HYST ANY_NUM The hysteresis value
SENS ANY_NUM The sensitivity value
N UINT Number of elements in comparison
Output
Name Data Type Description
OUT BOOL array The result of the comparison
Note The Array Expand Integer (ARRAY_EXPAND) block performs the opposite operation of the ARRAY_COMPRESS
block.
ARRAY_COMPRESS Block
Inputs
Name Data Type Description
IN0 BOOL or BOOL array Contains the first input (least significant binary digit)
↓ ↓ ↓
IN15 BOOL or BOOL array Contains the sixteenth input (most significant binary digit)
N UINT Number of elements to compress
INDEX_ENABLE BOOL array Defines which array elements are included in the compress
Output
Name Data Type Description
OUT UINT array Contains the packed information
Note The Array Expand Integer Long Integer (ARRAY_EXPAND_UDI) block performs the opposite operation of the
ARRAY_COMPRESS_UDI block.
ARRAY_COMPRESS_UDI Block
Inputs
Name Data Type Description
IN0 BOOL or BOOL array Contains the first input (least significant binary digit)
↓ ↓ ↓
IN31 BOOL or BOOL array Contains the thirty-second input (most significant binary digit)
N UINT Number of elements to compress
INDEX_ENABLE BOOL array Defines which array elements are included in the compress
Output
Name Data Type Description
OUT UINT array Contains the packed information
Note This block supports all data types. It is required that an array be connected to the input array and the data type of the
array is the same as the output pins.
ARRAY_EMPTY Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN_ARRAY ANY Input array
IN_INDEX Unsigned Long Offset in input array to start copy
Outputs
Name Data Type Description
OUT1 ANY Output 1
↓ ↓ ↓
OUT32 ANY Output 32
Note The Array Compress Boolean (ARRAY_COMPRESS) block performs the opposite operation of the ARRAY_EXPAND
block.
ARRAY_EXPAND Block
Inputs
Name Data Type Description
IN UINT array Value to expand
N UINT Number of elements to expand
INDEX_ENABLE BOOL array Defines which array elements are included in the expansion
Outputs
Name Data Type Description
OUT0 BOOL array Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUTF BOOL array Contains the results of the expansion process (most significant binary digit)
Note The Array Compress Boolean Long Integer (ARRAY_COMPRESS_UDI) block performs the opposite operation of the
ARRAY_EXPAND_UDI block.
ARRAY_EXPAND_UDI Block
Outputs
Name Data Type Description
OUT0 BOOL array Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL array Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL array Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUT1F BOOL array Contains the results of the expansion process (most significant binary digit)
Note This block supports all data types. It is required that an array be connected to the output and the data type of the array
is the same as the input pins.
ARRAY_FILL Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
OUT_INDEX BOOL Offset to start copy in output array
IN1 ANY Input 1
↓ ↓ ↓
IN32 ANY Input 32
Output
Name Data Type Description
OUT_ARRAY ANY Destination array
Note This is a variant block that supports the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer, and Boolean. Refer to the section Change Data Type of Variant Block.
ARRAY_FIND Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
Integer zero-based array index to begin searching from (default of 0, or beginning of
IN_INDEX UDINT the array). This should be less than the size of the array. If this value is greater than
the size of the array, then the search will begin from the beginning of the array.
IN_ARRAY[ ] ANY_NUM array Input array to be searched
IN_VALUE ANY_NUM Value to be searched for in the array
Sensitivity value. This is not applicable for the Boolean block data type. If SENS is
SENS ANY_NUM
less than 0, it will be treated as 0.
Outputs
Name Data Type Description
OUT BOOL Result of the find. True indicates that the value was found in the array.
OUT_INDEX UDINT Integer zero-based array index of the array element that matched the value.
Note This is a variant block that supports the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, and Unsigned Double Integer.
ARRAY_MINMAX Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
N Constant UINT Number of elements in input array IN
INDEX_ENABLE BOOL array Defines which array elements determine MAX/MIN
IN[ ] ANY_NUM array Array holding elements
FUNC Constant UINT Choice of operation { 0 for Maximum,1 for Minimum }
Outputs
Name Data Type Description
INDEX UINT Integer Zero-Based array Index for Min/Max Element (1st instance)
VALUE ANY_NUM Value of Min/Max element found
Supported Operators
Operation Operator
Parenthesis ()
NOT ~
OR +
AND *
RUNG Block
Inputs
Name Data Type Description
EQN Constant String Boolean equation
A BOOL array Required Boolean input used in equation
↓ ↓ ↓
P BOOL array Boolean input used in the equation
NVal Unsigned double integer Number of elements to evaluate
Output
Name Data Type Description
OUT_ARRAY BOOL array The result of the equation
ARRAY_SUM Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
IN REAL/LReal array Input Variable Array
N Unsigned double integer Constant number of IN values to be summed
INDEX_ENABLE BOOL array Defines which array elements are included in the summation
Output
Name Data Type Description
OUT REAL Current sum
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
AVRG Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
IN REAL† Last input to be included in the rolling average
PRESET BOOL True to initialize all N values of ARRAY to current value of IN
N Unsigned double integer Constant number of IN values to average
† Value with status, if status option is enabled.
Outputs
Name Data Type Description
OUT REAL† Current rolling average
Storage for last N values of input, IN. This array must be defined with
ARRAY[N] REAL
at least N elements
† Value with status, if status option is enabled.
BIT_CNTR Block
Inputs
Name Data Type Description
IN1 BOOL Input Boolean variable 1
↓ ↓ ↓
IN32 BOOL Input Boolean variable 32
Output
Name Data Type Description
COUNT UINT Number of input bits set to True
4. From the Block Diagram Editor, double-click the BOOLEAN_ALARM block and select the variable name.
Inputs
Name Data Type Description
IN BOOL Connect to a Boolean variable to document its alarm configuration
Unshelve† BOOL When set to True when the alarm is shelved, will cause the alarm to unshelve
† Available only when the Alarm Shelving property is set to Enabled
BSORT Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
N UDINT Number of elements in the array to be sorted
SRC[ ] REAL The input array
Outputs
Name Data Type Description
DEST[ ] REAL The sorted array
INDEX[ ] UDINT The mapping used to take the source array to the destination array
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the CALC block.
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 Change Data Type of 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 BOOL Block enable (Default: True)
A ANY_NUM† First operand
B ANY_NUM† Second operand
C ANY_NUM† Third operand
↓ ↓ ↓
H ANY_NUM† Eighth operand
EQUAT String Equation string to be performed
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY_NUM† Output
† Value with status, if status option is enabled.
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
AUTOENA Automatic Enable buffer is uploaded. Note: if automatic enabling is selected all manual enable
BOOL
inputs are ignored. (Default: False)
Constant Automatic Enable The number of seconds after the last upload before capturing is re-enabled –
ATOUT
UDINT Timeout only applicable if AUTOENA is True. (Default: 60 seconds)
Buffer Control – Controls how and when the data is collected. (Default:
NORMAL)
CIRCULAR (2) – Samples are collected indefinitely every FMULT scans. The
Constant
BUF_CTL Buffer Control buffer contains the newest PRE_SAM + POSTSAM samples unless
Buf_Ctl_T
capturing is stopped prior to filling the buffer. Capturing stops when an
upload command is received, or when the ENA_CAP pin transitions to False
if automatic re-enabling is not selected.
ONLY (3) – The trigger condition is evaluated each scan. Samples are only
collected when the trigger event is valid. The buffer contains PRE_SAM +
POSTSAM samples unless capturing is stopped prior to filling the buffer.
Capturing stops when the specified samples have been collected, an upload
command is received, or when the ENA_CAP pin transitions to False if
automatic re-enabling is not selected.
If True and the AUTOENA pin is False, enable the block for capture. This pin
gives the application code the ability to enable and disable data collection.
ENA_CAP BOOL Manual Enable This is an edge-triggered pin. Once a capture has been stopped the pin must
be toggled False and then True again to re-enable the next capture. (Default:
False)
Allows data to be collected slower than the performance rate of the block
(scan period) by specifying a multiple of the scan period for samples to be
Constant Sample Period
FMULT taken (only applies to Normal and Circular buffer control) (Default: 1)
UINT Multiplier
If a zero value is given, then the block will treat it as one Frame multiple.
Constant Post Trigger The number of samples to collect after and including the trigger event.
POSTSAM
UDINT Sample Size (Default: 100)
Constant Pre Trigger
PRE_SAM The number of samples to collect prior to the trigger event. (Default: 10)
UDINT Sample Size
Flash (4) – Captured data is written to flash disk on the controller. The last
UPL_TYPE Upl_Type_T three samples are preserved after which the oldest one is overwritten. This
works only when the BUF_CTL is set to NORMAL.
TripFlash (5) - This type is a combination of Trip and Flash types. The
Captured data is automatically uploaded by the data collection system and is
incorporated as part of the trip log. Also, the captured data is written to flash
disk on the controller and the last three samples are preserved after which
the oldest one is overwritten. Note: For proper operation, the BUF_CTL must
be set to NORMAL and the Compressed Data Log (CDL) feature must be
enabled.
Theory of Operation
The Capture block is a software function used to collect application variables in real-time for offline display and analysis. The
core software is shared between the Capture block and Dynamic Data Recorders (DDRs). The main differences between them
are:
• Capture blocks require an application code download to configure, while DDRs are configured by an independent
download mechanism.
• Capture blocks are embedded in the application code and can be used to catch events that occur between application code
blocks. DDRs perform outside of the application code and can only sample data after all of the application code has
performed in a particular frame.
• Capture blocks perform at the same priority as the other application code and so insure the highest data fidelity. DDRs
perform at a lower priority than the application code and are not guaranteed to catch data transitioning at frame rate.
The Capture block collects data sets of variables, known as samples and stores them in a local buffer. The buffer may be
uploaded to one or more client devices. Once uploaded the block may be re-armed to take another collection. Typically, for
clients other than ToolboxST application the status pin must be mapped to EGD so that it can be monitored outside the
controller. Once an upload is in progress, the buffer is locked to prevent it from being re-armed during the data transfer.
Multiple clients may upload the buffer simultaneously. The block ignores the transitions of its ENA_CAP pin until all clients
have been serviced.
Data collection is managed by specifying a buffer control mode and a trigger event. There are three buffer control modes. A
NORMAL collection is one where a specified number of samples are collected prior to a trigger event and a specified number
of samples are collected after the trigger event. Once the trigger event has been found to be satisfied it is no longer evaluated.
A CIRCULAR collection is one where no trigger event is specified and samples are taken indefinitely until the collection is
halted by requesting an upload or disabling the block. An ONLY collection is one where samples are only collected if the
specified trigger event is True each opportunity the block has to collect a sample. This is useful when collecting data around
an event that occurs sporadically.
A trigger event is completely specified by selecting a trigger condition, a trigger type, a trigger variable, and a trigger value.
The trigger variable is an application variable that the block monitors. It is compared against a trigger value using the
relational specifications of the trigger condition, and the sensitivity of the trigger type. Acceptable trigger conditions include
EQUAL TO, NOT EQUAL TO, GREATER THAN, GREATER THAN OR EQUAL TO, LESS THAN, and LESS THAN OR
EQUAL TO. Acceptable trigger types include LEVEL or EDGE. A level trigger is one that is satisfied at present, regardless
of past values. An edge trigger is one that is satisfied at present but was not satisfied at the previous evaluation.
Configuration
The Capture block may be re-configured by either an offline or online download. Downloading causes the states of ALL
Capture blocks in the controller to be re-initialized, invalidating any data that may be in the process of being collected.
Therefore, if external blockware is used to sequence to collection of data, it must be sufficiently robust to recover from such a
re-initialization. This may be accomplished by examining the DONE and STATUS pins or through timeouts.
Note A variable needs to be connected to the Status pin to enable the automatic upload functionality of the CAPTURE block
in the WorkstationST* application.
Triggering Issues
The trigger event is evaluated differently for each of the buffer control modes. For the NORMAL and CIRCULAR modes the
sample period multiplier pin, FMULT allows the block to collect samples at rates slower than the block performs, thereby
extending its range. A sample is only collected every FMULT scans. Using the NORMAL mode, the trigger event is evaluated
every scan regardless of the value of FMULT. When the event occurs, the sample is collected and post-trigger samples are
collected every FMULT scans away from the trigger sample. Note that because the trigger sample may not occur on an
FMULT boundary, the time between the last pre-trigger sample and the trigger sample may not be the same when FMULT is
not equal to one.
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.
Redundancy Issues
Like all application code blocks configured in a redundant controller system, the Capture block is replicated faithfully in each
controller. However, unlike other blocks, the Capture block maintains un-voted internal state information in each controller.
This independence allows the block to trigger on and capture data that may be different in each controller (for example,
anti-voted data). Likewise the communication channel established between the block and an external client (for example,
ToolboxST application) for an upload is not replicated to any redundant controllers. The STATUS and DONE pins are not
voted and as a result may not always track between controllers. This is normal if a capture is terminated early by an upload
request or anti-voted data is used in the trigger specification. Application writers who want to monitor these pins through
blockware should be aware of this discrepancy.
Note For potential application code pitfalls, refer to the section Redundancy Issues.
Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the outpin must match with the selected data
type of the block. Refer to the section Change Data Type of Variant Block.
Inputs
Name Data Type Description
IN ANY The variable to watch
The maximum numerical difference (deadband) that will not be detected. This pin is
DBAND ANY
inactivated for CHG_DET_B.
The range around zero (near zero band) that when entered by IN will cause OUT to
NZBAND ANY be pulsed True even if the change to get there was less than the DBAND value. This
pin is inactivated for CHG_DET_B.
Output
Name Data Type Description
OUT ANY True when a change is detected or when entering near zero, otherwise False
States
Name Data Type Description
STATE ANY The value of IN at the last detected change
NZFLAG BOOL Near Zero Flag. Not used for CHG_DET_B.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
CLAMP Block
This block propagates quality status if the status operations are enabled.
Block status modifications: OUT status is propagated from IN status. The status of OUT is modified to include HIGH_
LIMITED or LOW_LIMITED when applicable. For example:
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
MAX ANY_NUM Maximum limit
IN ANY_NUM† Value to be clamped
MIN ANY_NUM Minimum limit
†Value with status, if status option is enabled.
Outputs
Name Data Type Description
OUT ANY_NUM† Clamped output
IN_MAX BOOL Output is clamped at HILIM
IN_MIN BOOL Output is clamped at LOLIM
† Value with status, if status option is enabled.
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 LREAL The longest period in microseconds between block performances
MIN LREAL The shortest period in microseconds between block performances
DELTA LREAL The time in microseconds since the last performance of the block
NPBAND UDINT The number of sweep times that have been longer than PBAND
SWEEPS UDINT The number of performance cycles recorded
WORST1 LREAL The longest sweep time greater than PBAND
WORST2 LREAL The second longest sweep time greater than PBAND
WORST3 LREAL The third longest sweep time greater than PBAND
WORST4 LREAL The fourth longest sweep time greater than PBAND
WORST5 LREAL The fifth longest sweep time greater than PBAND
State
Name Data Type Description
DTIME LREAL Internal State Variable
Note This block is supported in all platforms and in all redundancy configurations.
Attention
For each command type there is a disable pin to disable commands of that type. If the ALL_DIS pin is set to True, commands
of all types are disabled regardless of their individual disable pin value. If a command type is disabled, the reception of a
command of that type is silently ignored by default. Each command type has an error/NAK enable pin which causes the
reception of a command of the given type to be responded to with an error value selected by the error/NAK value pin.
CMD_DISABLE Block
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 This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
Note Annunciation of Overtemp for Mark VIe I/O Packs and Annunciation of Controller TMR Heartbeat Status Not OK are
logic examples of using the COMPARE block.
Comparison Functions
Function Description
GT Greater than
GE Greater than or equal
EQ Equal
NE Not equal
LT Less than
LE Less than or equal
COMPARE Blocks
Hysteresis and sensitivity settings are provided to prevent toggling around a boundary condition. Sensitivity refers to the
tolerance band of the equality relationship. That is, IN1 is equal to IN2 if it is numerically within the band defined by IN2 ±
SENS. Hysteresis applies for all relationships. Once any relationship evaluates to True it must exceed the normal specification
by the value of HYST amount before it evaluates to False.
Not Equal
Less Than
Output
Name Data Type Description
OUT BOOL The result of the comparison
Note The Expand Integer (EXPAND) block performs the opposite operation of the COMPRESS block.
COMPRESS Block
Inputs
Name Data Type Description
IN0 BOOL Contains the first input (least significant binary digit)
↓ ↓ ↓
IN15 BOOL Contains the sixteenth input (most significant binary digit)
Output
Name Data Type Description
OUT UINT Contains the packed information
Note The Expand Long Integer (EXPAND_UDI) block performs the opposite operation of the COMPRESS_UDI block.
COMPRESS_UDI Block
Inputs
Name Data Type Description
IN0 BOOL Contains the first input (least significant binary digit)
↓ ↓ ↓
IN31 BOOL Contains the thirty-second input (most significant binary digit)
Output
Name Data Type Description
OUT Unsigned double integer Contains the packed information
Attention
Note From the ToolboxST Component Editor Software tab, press F1 for more information on the ControllerStateHeartbeat
intrinsic variable.
The Controller Monitor (CTRLR_MON) block is used for the following purposes:
• The Block has a POWER_UP output that transitions to True 5 secs after the controller is in control mode. SIG_FORCED
turns on if there are any forced variables in the controller, SIG_FORCED is set to False for 2 s every time the number of
forced variables is increased. SIG_FORCED_NUM indicates the number of forced variables in the controller.
• The block detects the current controller configuration (simplex, dual, or TMR). According to this configuration,
over-temperature alarms OVERTEMP_R, OVERTEMP_S, OVERTEMP_T and controller online variables ONLINE_R,
ONLINE_S, and ONLINE_T are generated for R, S and T, respectively.
Note In the virtual controller, the OVERTEMP_R, OVERTEMP_S and OVERTEMP_T are all False because there is
no temperature measurement functionality. ONLINE_S and ONLINE_T are always False regardless of the controller
configuration (Simplex, Dual or TMR).
• The input ONLINE_FL_TMR is used to delay the controller online variables change from True to False in the event that
the controller heartbeat stops.
• The outputs HW_ALARM_R, HW_ALARM_S, HW_ALARM_T are set to True whenever a hardware failure diagnostic
is generated for R, S and T controllers respectively. The outputs FAN1_FAIL_R, FAN1_FAIL_S and FAN1_FAIL_T are
set to True whenever a FAN 1 failure is detected for R, S and T controllers respectively (applicable to UCSB only). The
outputs FAN2_FAIL_R, FAN2_FAIL_S and FAN2_FAIL_T are set to True whenever a FAN 2 failure is detected for R, S
and T controllers respectively (applicable to UCSB only). Fans 1 and 2 are available only in UCSB, and the
corresponding failure outputs will be False for other platforms.
• The outputs MEM_LOW1_R, MEM_LOW1_S, MEM_LOW1_T are set to True when more than 70% of RAM memory
has been used. Otherwise, these outputs remain False for R, S and T controllers, respectively. The outputs MEM_LOW2_
R, MEM_LOW2_S, MEM_LOW2_T are True when more than 95% of RAM memory has been used. Otherwise, these
outputs remain False for R, S and T controllers, respectively.
Note CTRLR_MON creates global variables that can be used throughout the controller application logic.
Outputs
Initial Interface
Name Description Type Visibility Usage
Value Type
HW_ALARM_R R Controller Hardware Failure Alarm BOOL False Always Output Value only
HW_ALARM_S 1 S Controller Hardware Failure Alarm BOOL False Always Output Value only
HW_ALARM_T 2 T Controller Hardware Failure Alarm BOOL False Always Output Value only
FAN1_FAIL_R R Controller Fan1 Failure BOOL False Always Output Value only
FAN1_FAIL_S 1 S Controller Fan1 Failure BOOL False Always Output Value only
FAN1_FAIL_T 2 T Controller Fan1 Failure BOOL False Always Output Value only
FAN2_FAIL_R R Controller Fan2 Failure BOOL False Always Output Value only
FAN2_FAIL_S 1 S Controller Fan2 Failure BOOL False Always Output Value only
FAN2_FAIL_T 2 T Controller Fan2 Failure BOOL False Always Output Value only
POWER_UP Controller Powered Up BOOL 0 Always Output Value only
SIG_FORCED Signal Forced In Controller BOOL False Always Output Value only
SIG_FORCED_NUM Number of Forced Signals INT 0 Always Output Value only
OVERTEMP_R R Controller Over Temperature BOOL False Always Output Value only
OVERTEMP_S 1 S Controller Over Temperature BOOL False Always Output Value only
OVERTEMP_T 2 T Controller Over Temperature BOOL False Always Output Value only
ONLINE_S 1 R Controller Online BOOL False Always Output Value only
ONLINE_R S Controller Online BOOL False Always Output Value only
ONLINE_T 2 T Controller Online BOOL False Always Output Value only
MEM_LOW1_R R Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW1_S 1 S Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW1_T 2 T Controller Low Memory 1 BOOL False Always Output Value only
MEM_LOW2_R R Controller Low Memory 2 BOOL False Always Output Value only
MEM_LOW2_S 1 S Controller Low Memory 2 BOOL False Always Output Value only
MEM_LOW2_T 2 T Controller Low Memory 2 BOOL False Always Output Value only
1 Exists only when the controller’s redundancy is dual or TMR
2 Exists only when the controller’s redundancy is TMR
CTD Block
Inputs
Name Data Type Description
DEC BOOL Decrements counter upon rising edge
MAX_CNT Unsigned double integer Value to start countdown
RESET BOOL Sets counter to MAX_CNT
ENABLE BOOL Permissive for block performance
Outputs
Name Data Type Description
AT_CNT BOOL True when CUR_CNT reaches zero
CUR_CNT Double integer Current countdown value
CTU Block
Inputs
Name Data Type Description
INC BOOL Increments counter upon rising edge
MAX_CNT UDINT Maximum count value
RESET BOOL Sets counter to zero
ENABLE BOOL Permissive for block performance
Outputs
Name Data Type Description
AT_CNT BOOL True when CUR_CNT reaches MAX_CNT
CUR_CNT UDINT Current count value
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: 0)
TC REAL† Time constant for smoothing (sec) (Default: 0)
ENABLE BOOL Block enable (Default: True)
† Value with status, if status option is enabled.
Output
Name Data Type Description
DIF_OUT REAL† Derivative of input
† Value with status, if status option is enabled.
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 Change Data Type of Variant
Block.
DIV Block
This block propagates quality status if the status operations are enabled.
Block status modifications: If DENOM = 0, then the output status will be either LOW_LIMITED-CONFIGURATION_
ERROR-BAD [5] if NUM < 0 or HIGH_LIMITED-CONFIGURATION_ERROR-BAD [6] if NUM > 0. The status of M always
follows the status of OUT.
Inputs
Name Data Type Description
NUM ANY_NUM† Numerator
DENOM ANY_NUM† Denominator
† Value with status, if status option is enabled.
Outputs
Name Data Type Description
OUT ANY_NUM† Output
M REAL† Mantissa
† Value with status, if status option is enabled.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
EQ Block
Example
If HYST equals 5, SENS equals 2, IN1 equals 10 and IN2 equals 11.9; then OUT is True. OUT will become False when the
difference between IN1 and IN2 becomes greater than 7, since IN1 and IN2 are considered equal when they are within the
SENS value of 2.
Output
Name Data Type Description
OUT BOOL The result of the comparison
Note The Compress Boolean (COMPRESS) block performs the opposite operation of the EXPAND block.
EXPAND Block
Input
Name Data Type Description
IN UINT Value to expand
Outputs
Name Data Type Description
OUT0 BOOL Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT9 BOOL Contains the results of the expansion process (tenth least significant binary digit)
OUTA BOOL Contains the results of the expansion process (eleventh least significant binary digit)
↓ ↓ ↓
OUTF BOOL Contains the results of the expansion process (most significant binary digit)
Note The Compress to Long Integer (COMPRESS_UDI) block performs the opposite operation of the EXPAND_UDI
block.
EXPAND_UDI Block
Outputs
Name Data Type Description
OUT0 BOOL Contains the results of the expansion process (least significant binary digit)
↓ ↓ ↓
OUT31 BOOL Contains the results of the expansion process (most significant binary digit)
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 Change Data Type of Variant
Block.
Output
Name Data Type Description
OUT BOOL 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 Change Data Type of Variant Block.
GET Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC[ ] ANY Source array
N UDINT Source array index (0 based, interpreted internally as unsigned)
Output
Name Data Type Description
DEST ANY Destination variable
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
GT Block
Inputs
Name Data Type Description
IN1 ANY_NUM The input to compare
IN2 ANY_NUM The input to compare against
HYST ANY_NUM The hysteresis value
Output
Name Data Type Description
OUT BOOL The result of the comparison
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 BOOL Output is clamped at HILIM
IN_MIN BOOL 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 BOOL Output is clamped at HILIM
IN_MIN BOOL 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 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.
Note This block is only supported in Simplex controllers that support Embedded PPNG.
The IO-Link blocks, IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE, are used to Read and Write acyclic data
(parameters and identification data) to IO-Link devices. These blocks run in Mark VIe controllers and communicate with the
Embedded PROFINET Gateway (Embedded PPNG) module. The Embedded PPNG module communicates with the IO-Link
Masters (PROFINET devices). The IO-Link Master communicates with the IO-Link devices (sensors).
The following figure illustrates the basic communication path from the IO-Link blocks to the IO-Link sensor device.
• The blocks can Read and Write parameter data to the index and sub-indices of the IO-Link device parameter space.
• The blocks provide the means for users to save and back up IO-Link device parameters to the IO-Link Master. (These
parameters cannot be saved to ToolboxST.)
IO-Link devices have indexes and sub-indices from/to which parameters can be Read or Written. The IO-Link blocks are
designed to communicate with a specific IO-Link device index and sub-index.
When the REQUEST pin is transitioned from False to True, the IO-Link block initiates a Read or Write request, depending on
which block is being used. IO-Link Read/Write communication occurs sequentially for all devices connected to an IO-Link
Master. If the IO-Link Read/Write request is in progress with an IO-Link Master, another communication request will not
start until the communication already in progress has completed or timed out. However, communication to two different
IO-Link devices connected to two different IO-Link Masters can occur simultaneously.
When the block’s REQUEST pin is triggered, the output BUSY pin is immediately set to True. The BUSY pin resets to False
only when the IO-Link Read or Write communication has completed or timed out.
The internal pin, IO_LINK_COMM_STARTED, is set to True when the IO-Link block communication starts, and resets to
False when block communication has completed. When the IO-Link Read or Write communication has completed or timed
out, the DONE output pin is set to True.
If an IO-Link block does not complete its IO-Link transaction within one second after communication has started, the IO-Link
transaction is cancelled, an error indicator is displayed on the IO_LINK_STATUS pin, and the ERROR pin is set to True.
Note The inputs listed in the following table are shared by the IO_LINK_DEVICE_READ block and the IO_LINK_
DEVICE_WRITE block.
Input values are dependent upon the specific IO-Link Master in use. Users should refer to the manufacturer’s documentation
for the specific IO-Link Master for block input requirements.
For Unsigned Integer (16-bit) data: To write to an IO-Link device Index that supports Unsigned Integer (16-bit) data type, the
Write data needs to be swapped by 8 bits. Set the DATA_SWAP input value to 1 for the Unsigned Integer (16-bit) data type.
For example, to Write 16-bit data (100) to an IO-Link device Index, this data needs to be 1 byte-swapped, as the data type
supported by the IO-Link device Index is Unsigned Integer. Therefore, the first element of WR_DATA will be 100 and the
DATA_SWAP input will be 1.
To Write 32-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 2.
To Write 64-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 4.
For Unsigned Integer (16-bit) data: To Read data from an IO-Link device Index that supports Unsigned Integer (16-bit) data
type, the Read data needs to be swapped by 8 bits. Set the DATA_SWAP input value to 1 for the Unsigned Integer (16-bit)
data type. For example, to Read 16-bit data (assume 100) from an IO-Link device Index, this data needs to be 1
byte-swapped, as the data type supported by the IO-Link device Index is Unsigned Integer. Set the DATA_SWAP input to 1
and after the request is triggered the first element of RD_DATA will be 100.
To Read 32-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 2.
To Read 64-bit data on an IO-Link Index and Sub-Index, set the DATA_SWAP input value to 4.
WR_DATA
Type IO_LINK_INDEX IO_LINK_SUBINDEX DATA_SWAP LEN
(First Element in Array)
Backup 2 0 0 1 5
Note The IO-Link blocks are not used to initiate the Restore operation.
Note This block is only supported in Simplex controllers that support Embedded PPNG.
The IO-Link blocks, IO_LINK_DEVICE_READ and IO_LINK_DEVICE_WRITE, are used to Read and Write acyclic data
(parameters and identification data) to IO-Link devices. These blocks run in Mark VIe controllers and communicate with the
Embedded PROFINET Gateway (Embedded PPNG) module. The Embedded PPNG module communicates with the IO-Link
Masters (PROFINET devices). The IO-Link Master communicates with the IO-Link devices (sensors).
Note The functionality of this block is described in detail in the documentation for the IO-Link Device Read (IO_LINK_
DEVICE_READ) block.
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 BOOL Block enable (Default: True)
LAG_IN REAL† Variable to filter
TC REAL Filter time constant in seconds
† Value with status, if status option is enabled.
Output
Name Data Type Description
LAG_OUT REAL† Filtered variable
† Value with status, if status option is enabled.
LATCH Block
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the LATCH block.
Truth Table
RDOM SET(t) RESET(t) OUT(t) OUT(t+1)
X 0 0 0 0
X 0 0 1 1
X 0 1 0 0
X 0 1 1 0
X 1 0 0 1
X 1 0 1 1
1 1 1 X 0
0 1 1 X 1
Where:
X = either state
t = current state
t+1 = next state
Inputs
Name Data Type Description
SET BOOL Set input
RESET BOOL Reset input (Default: False)
RDOM BOOL If True RESET dominates the latch, else SET dominates (Default: False)
Output
Name Data Type Description
OUT BOOL Output of the latch
State
Name Data Type Description
This is the status variable for storing the trigger status, a hidden pin. It can be viewed
STATUS BOOL or changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.
LEAD_LAG Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING)block.
Inputs
Name Data Type Description
IN REAL† Analog input
T1 REAL† Lead tau
T2 REAL† Lag tau
†Value with status, if status option is enabled.
Output
Name Data Type Description
OUT REAL† Output value
† Value with status, if status option is enabled.
LT Block
Hysteresis is provided to prevent toggling around a boundary condition. The less than relationship evaluates to True, when
IN1 is less than IN2. The block output will not become False until the less than relationship exceeds the value of the
hysteresis input, HYST.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
Output
Name Data type Description
OUT BOOL 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 Change Data Type of Variant
Block.
Output
Name Data Type Description
OUT BOOL Result of the comparison
LD_MAN Block
Outputs
Name Data Type Description
HH_STAT BOOL Indicates that the input variable is in the HIGH-HIGH limit
H_STAT BOOL Indicates that the input variable is in the HIGH limit
N_STAT BOOL Indicates that the input variable is not in any limit condition
L_STAT BOOL Indicates that the input variable is in the LOW limit
LL_STAT BOOL Indicates that the input variable is in the LOW-LOW limit
Track Type enumeration, CMD_TRK is used when a Command track enumeration output is required.
Inputs
Name Description Type Array Initial Value Visibility Usage
EQN LOGIC EQUATION STRING 0 IN1 Always Const
TYP LOGIC TYPE UINT 0 {Type} Always Input
IN1 INPUT 1 BOOL 0 False Always Input
IN1T Input 1 toggle value BOOL 0 False Always State
IN1TE Input 1 toggle enable from HMI BOOL 0 False Always Input
IN1TP Input 1 toggle permitted BOOL 0 False Always Const
IN2 INPUT 2 BOOL 0 False Always Input
IN2T Input 2 toggle value BOOL 0 False Always State
IN2TE Input 2 toggle enable from HMI BOOL 0 False Always Input
IN2TP Input 2 toggle permitted BOOL 0 False Always Const
↓ ↓ ↓ ↓ ↓ ↓ ↓
↓ ↓ ↓ ↓ ↓ ↓ ↓
IN32 INPUT 32 BOOL 0 False Always Input
IN32T Input 32 toggle value BOOL 0 False Always State
IN32TE Input 32 toggle enable from HMI BOOL 0 False Always Input
IN32TP Input 32 toggle permitted BOOL 0 False Always Const
Outputs
Name Description Type Array Initial Value Visibility Usage
{Device}{Type} Test string for the equation BOOL 0 False Always Output
OUT Output enumeration UINT 0 NO_PERM -NO_BYPASS Always Output
OUT_VAL Boolean output status BOOL 0 False Always Output
OUT_TGL Inputs in toggle enabled mode BOOL 0 False Always Output
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 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL 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 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL 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 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL Output
NOT Block
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the NOT block.
Input
Name Data Type Description
A BOOL Input value
Outputs
Name Data Type Description
OUT_A BOOL Non-inverted value of input A
NOT_A BOOL Inverted value of input A
OR Block
Truth Table
IN1 IN2 OUT
0 0 0
0 1 1
1 0 1
1 1 1
OUT will be 0 only if all inputs are 0. Otherwise, OUT will be 1.
Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL Output
XNOR Block
Truth Table
IN1 IN2 IN3 OUT
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
OUT will be 1 only if there is an even number of inputs that are 1 OR if all of the inputs are
0. Otherwise, OUT will be 0.
Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL Output
XOR Block
Truth Table
IN1 IN2 IN3 OUT
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
OUT is 1 only if there is an odd number of inputs that are 1. Otherwise, OUT is 0.
Inputs
Name Data Type Description
IN1 BOOL First input
↓ ↓ ↓
INn BOOL N'th input
Output
Name Data Type Description
OUT BOOL Output
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 BOOL Block enable (Default: True)
Outputs
Name Data Type Description
MEDIAN REAL Median selected output value
LDIFLMT BOOL Maximum to minimum difference limit exceeded logical
Note Annunciation of Overtemp for Mark VIe I/O Packs is a logic example using the MIN_MAX block.
The status pin, STAT1 - STAT32, corresponding to the selected input is set to True and others are set to False. If more than
one input satisfies the function, the first input found in top/down order is passed. The default value for the FUNC input is
MIN.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
MIN_MAX Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
FUNC ENUM (INT) Selection function (either MIN or MAX) (Default: MIN)
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.
Outputs
Name Data Type Description
OUT ANY_NUM† Minimum or maximum value
STAT1 BOOL First flag. If True, the corresponding input is the minimum or maximum
↓ ↓ ↓
STATn BOOL N'th flag. If True, the corresponding input is the minimum or maximum
† Value with status, if status option is enabled.
8. From the block category drop down menu, select Matrix to display the Matrix blocks. Select MADDSUB and drag and
drop to move the block into the Block Editor.
11. Create a local or global variable with an array size of 8 (equivalent to ROWS_A multiplied by COLS_A) and values of [1,
2, 3, 4, 5, 6, 7, 8] to attach to the input A, as follows:
a. From the Tree View, right-click Variables and select Add Variable from the drop down menu.
Note In the Tree View, the Variables item inside the Programs item contains global variables. The Variables item inside
the task item contains local variables. Local variables are only available for the specified task, whereas global variables
can be used with multiple tasks.
13. From the Tree View, select the task item to display the Block Editor.
14. From the Block Editor, double-click the MADDSUB block diagram to display the Edit Block Pin Connections dialog
box.
a. For Pin A, select Global Variables from the drop down menu.
b. Select Variable 1 and click OK.
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 UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL Array Array holding entries of the output matrix
• Combines two smaller matrices into one large matrix by either stacking them on top of each other or setting them
side-by-side
• Merges one small matrix into another big matrix, and as a result, some content in the big matrix is replaced by the content
of the small matrix
In Matrix Notation, two-dimensional arrays (matrices) are collapsed into one dimension. This is done such that all entries are
listed column-wise in an array. The two-dimensional matrices are defined by an integer number of rows in the matrix
(ROWS_A), an integer number of columns in the matrix (COLS_A), and an array (A) holding the floating-point/double
entries according to the variant of the block. The input pins specifying the size of the matrix are immediate pins and therefore
cannot be changed while the controller is online. Refer to the section Configuring Matrix Blocks for further details.
Examples
This block provides the ability to stack two matrices either on top of each other or side-by-side, resulting in one larger matrix.
This block also provides merging of a given smaller matrix into the given bigger matrix resulting in a new matrix, which has
the same size of the bigger matrix.
Horizontal Concatenation
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
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
START_ROW UINT Start row in the matrix A for merge, it starts from 0 and used only for merge function
Start column in the matrix A for merge, it starts from 0 and used only for merge
START_COL UINT
function.
B[ ] REAL/LREAL array Array holding entries of the second input matrix
FUNC UINT Choice of operation {0 for horizontal, 1 for vertical, 2 for Merge}
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A
MDOTDIV Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A
MDOTMUL Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
• 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 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 UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
MFIND Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
FUNC Constant UINT Comparison function (GT=1, LT=2, GE=3, LE=4, EQ=5, NE=6)
TOL REAL/LREAL Tolerance variable used to define equality in EQ & NE (Default: 1e-3)
REF REAL/LREAL Reference value to which all matrix elements are compared
PREFILL REAL/LREAL Default value to which the output array is pre-filled
Outputs
Name Data Type Description
BROWNDX INT Array holding the row indices of all elements that meet the defined criteria
BCOLNDX INT Array holding the column indices of all elements that meet the defined criteria
B[ ] REAL/LREAL array Array holding the values of all elements that meet the defined criteria
COUNT UINT Total number of elements found
MINV Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
TOL† REAL/LREAL Tolerance value
† The TOL pin should always be equal to 0.0 except in the case when the DET output is almost zero, < 1E-08. Setting the TOL
pin to a small number, for example 1E-06, will cause the DET output to equal 0.0 and the ERROR output to equal True.
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
ERROR BOOL The matrix is not invertible (if not invertible ERROR = True)
DET REAL/LREAL Determinant of the matrix
• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The failure to properly specify and input matrix by defining an input array that has either more or less elements than
defined by the intended number of rows and columns in the matrix
MMINMAX Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
FUNC Constant UINT Choice of operation { 0 for Maximum,1 for Minimum }
Outputs
Name Data Type Description
ROW UINT Integer Zero-Based Row Index for Min/Max Element (1st instance)
COL UINT Integer Zero-Based Column Index for Min/Max Element (1st instance)
VALUE REAL/LREAL Floating point value of Min/Max element found
• An attempt to define the size (length) of either of the input arrays, A or B, as anything other than the product of the input
values for ROWS_A and COLS_A, or ROWS_B and COLS_B
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_B
• An attempt to find the product of two matrices that are not the proper size for multiplication (the number of columns in A
matrix must equal the number of rows in B)
• An attempt to define the number of rows or columns in the desired input matrices as a non-positive number
MMUL Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
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 UINT Number of rows in the output matrix
COLS_B UINT Number of columns in the output matrix
B[ ] REAL/LReal array Array holding entries of the output matrix
MSVCH Block
The failure modes for this block include:
• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The 2 input matrices are not equal
• The failure to properly specify a matrix by defining an input array that has either more or less elements than defined by
the intended number of rows and columns in the matrix
• An attempt to attach a variable to the output pin that does not match the expected output size defined by the number of
ROWS_A and COLS_A
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
Matrix Selection Flag.
B_FLAG BOOL
If B_FLAG is True, C is set to A. If B_FLAG is False, C is set to B
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
ROWS_B Constant UINT Number of rows in the second input matrix
COLS_B Constant UINT Number of columns in the second input matrix
B[ ] REAL/LREAL array Array holding entries of the second input matrix
Outputs
Name Data Type Description
ROWS_C UINT Number of rows in the output matrix
COLS_C UINT Number of columns in the output matrix
C[ ] REAL/LREAL array Array holding entries of the output matrix
• An attempt to define a non-positive number of rows (ROWS_A) or columns (COLS_A) in the desired output matrix
• The failure to properly specify an input array that has either more or less elements than defined by the intended number
of rows and columns in the matrix
MTRN Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
ROWS_A Constant UINT Number of rows in the first input matrix
COLS_A Constant UINT Number of columns in the first input matrix
A[ ] REAL/LREAL array Array holding entries of the first input matrix
Outputs
Name Data Type Description
ROWS_B UINT Number of rows in the output matrix
COLS_B UINT Number of columns in the output matrix
B[ ] REAL/LREAL array Array holding entries of the output matrix
Note This block is supported in all Mark VIe platforms and in all redundancy configurations.
The Modbus master blocks, MBUS_READ and MBUS_WRITE, are used to Read and Write data to Modbus slave devices.
Only TCP Modbus slaves are supported by the MBUS_READ and MBUS_WRITE blocks.
Timeout error cases: Since this is timeout, the ERROR_CODE is updated with Timeout error (7000). The cases defined in
the table below are the various scenarios for timeout.
Timeout Error Cases
Case
Description
Number
1 Modbus slave not available to the UDH/CDH communicator
2 Writing to holes in Modbus register map
3 Writing to Mark VIeS Modbus slave
4 If number of Modbus blocks queued for a Modbus slave is more than 64
5 Writing to more than the number of Modbus command limit of the Modbus slave
6 The number of Modbus connections made by the Modbus slave is out of limit
7 Modbus response received from the slave is more than 260 bytes
8 If the Modbus master process is restarted, then the block might timeout during this period
Note This block is supported in all Mark VIe platforms and in all redundancy configurations.
The Modbus master block, MBUS_WRITE, is used to Write data to Modbus slave devices. Only TCP Modbus slaves are
supported by the MBUS_WRITE block.
Note The functionality of this block is described in detail in the documentation for the Modbus Master Read (MBUS_READ)
block.
MBUS_WRITE Block
MODSEL Block
Outputs
Name Data Type Description
MODE_0 BOOL Mode 0 selected
↓ ↓ ↓
MODE_7 BOOL Mode 7 selected
Mode Word one indicates which mode is selected. This word is formatted
such that each bit presents a mode. With the least significant bit being
MODEW1 UINT
mode 0 and the most significant bit being mode 7. For example, if mode 5
is selected the word will be set equal to 32.
Mode Word two indicates which mode is selected. This word is formatted
MODEW2 UINT such that the magnitude of the word represents the mode number. For
example, if mode 5 is selected then the word will be set to 5.
Pin that contains state information to be preserved during an online
SCRATCH BOOL
download. (Default: True to save modes to Nonvolatile memory)
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the MOVE block.
Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the DEST pin must match the selected data
type of the block. Refer to the section Change Data Type of Variant Block.
ENABLE
MOVE Block
This block propagates quality status if the status operations are enabled.
Block status modification: If SRC is value only, the status of DEST is NOT_LIMITED-GOODNC [128].
Inputs
Name Data Type Description Interface Type
ENABLE BOOL Block enable (Default: True) Value only
Value with status or
SRC ANY† Source variable
Value only
† Value only or value with status, if status option is enabled and value only for Boolean block type.
Output
Name Data Type Description Interface Type
DEST ANY† Destination variable (data type enforced by the block type) Value with status
† Value only or value with status, if status option is enabled and value only for Boolean block type.
MOVE_DT Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC Simple Source variable
Output
Name Data Type Description
DEST Long Integer Destination variable (data type enforced by the block used)
MOVE_IT Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC SIMPLE Source variable
Output
Name Data Type Description
DEST Long INT Destination variable (data type enforced by the block used)
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
MULT Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
Inputs
Name Data Type Description
IN1 ANY_NUM† First input
↓ ↓ ↓
INn ANY_NUM† N'th input
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY_NUM† Product
† Value with status, if status option is enabled.
Note This block supports the following block data types: Real and Long Real.
NaN_BREAKER Block
Note The diagnostic message is not displayed if the block is run in the Virtual Controller. The rest of the functionality is
supported.
Input
Name Data Type Description
INPUT REAL/LREAL Input signal to check for NaN
Outputs
Name Data Type Description
INP_IS_NAN BOOL True if input signal value is NaN
OUTPUT REAL/LREAL Equal to input if input is not NaN, otherwise it is last good value
State
Name Data Type Description
LGVALUE REAL/LREAL Last good input value (Default: 0)
NANCHECK Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
RESET BOOL Block reset (Default: False); True resets the three counters
SRC REAL or LREAL Variable checked for NaNs
Outputs
Name Data Type Description
Q_NAN UDINT Number of Quiet NaNs detected after block reset
S_NAN UDINT Number of Signaling NaNs detected after block reset
INFIN UDINT Number of Infinities detected after block reset
Note This is a variant block that supports any one of the following block data types: Integer, Double Integer, Real, Long
Real. The default data type is Real. Refer to the section Change Data Type of Variant Block.
NEGATE Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
Input
Name Data Type Description
IN REAL, LREAL, INT, DINT† Input value
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT REAL, LREAL, INT, DINT† Negated input value
† Value with status, if status option is enabled.
NE Block
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
Sensitivity refers to the tolerance band of the equality relationship. That is, IN1 is not equal to IN2 if it is numerically outside
the band defined by IN2 ± SENS.
Output
Name Data Type Description
OUT BOOL The result of the comparison
ON_OFF_DELAY Block
Inputs
Name Data Type Description
IN BOOL Boolean input signal
PU_DEL Unsigned double integer Pickup delay (ms)
DO_DEL Unsigned double integer Dropout delay (ms)
Output
Name Data Type Description
OUT BOOL Delayed filtered output
PARITY_CHK Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
INPUT DINT Variable to check parity
Outputs
Name Data Type Description
ODD BOOL True if Odd Parity
EVEN BOOL True if Even Parity
Note This block is a variant block that supports any one of the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, and Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.
PREVOTE Block
Outputs
Name Data Type Description
RHLT BOOL R prevote variable health
SHLT BOOL S prevote variable health
TAHLT BOOL TA prevote variable health
TBHLT BOOL TB prevote variable health
R ANY R prevote destination variable
S ANY S prevote destination variable
TA ANY TA prevote destination variable
TB ANY TB prevote destination variable
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
D_ACT BOOL Direct acting switch. (Default: False) If False then KP' = -KP, else KP' = KP.
KI REAL Integral gain
KD REAL Derivative gain
DSRC REAL Derivative source
OFFSET REAL Offset modifier
LOCKON [32] UINT Lockon control array (32 elements maximum) of lockon codes corresponding to each mode
MODE UINT Operating mode, used as an index into the LOCKON[ ] array
MAXOUT REAL Maximum output clamp limit
MINOUT REAL Minimum output clamp limit
Outputs
Name Data Type Description
ERROR REAL Error; if mode is PASSTHRU then ERROR is 0, otherwise ERROR is CTL_VAR - SETPT
OUT REAL PID Output Correction
LALM BOOL Set to True if OUT is ≤ MINOUT, else set to False
HALM BOOL Set to True if OUT is ≥ MAXOUT, else set to False
MSTATE UINT Mode state - stores the previous operating mode (no user input required)
KIPROP1 LREAL Double precision KI x prop (t-1) (no user input required)
INTEG1 LREAL Double precision INTEG (t-1) (no user input required)
S_DSRC1 LREAL Double precision DSRC (t-1) (no user input required)
S_DSRC2 LREAL Double precision DSRC (t-2) (no user input required)
S_OUT1 LREAL Double precision OUT (t-1) (no user input required)
PULSE Block
Inputs
Name Data Type Description
TRIG BOOL Triggers a new pulse on its rising edge
WIDTH UDINT Period of the pulse in milliseconds. (Default: 0) (1 sweep)
Output
Name Data Type Description
OUT BOOL Pulse output
State
Name Data Type Description
CWIDTH UDINT Elapsed time since the pulse began in milliseconds
This is the state pin for storing the trigger status of the block, a hidden pin,
It can be viewed or changed by right-clicking the block and selecting Edit
ISTRIGGERED BOOL
Block Pins. Writing to this variable is not recommended, but can be used to
preset block states.
PULSE_EXT Block
Inputs
Name Data Type Description
TRIG BOOL Triggers pulse timer on its rising edge
WIDTH Unsigned double integer Pulse width in milliseconds
Output
Name Data Type Description
OUT BOOL Pulse output
State
Name Data Type Description
CWIDTH Unsigned double integer Elapsed time since rising edge of TRIG in milliseconds
P_B Block
Inputs
Name Data Type Description
IN BOOL Push-button input
WIDTH Unsigned double integer Push-button pulse width (ms)
Output
Name Data Type Description
OUT BOOL Push-button output
Note This block is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.
PUT Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
SRC ANY Source variable
N UDINT Destination array index (0 based, interpreted internally as unsigned)
Output
Name Data Type Description
DEST[ ] ANY Destination array
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
PRESET BOOL Initializes output to preset value
PASS BOOL Passes input to output without limiting
HOLD BOOL Holds output to current value when True
†Value with Status, if status option is enabled.
Outputs
Name Data Type Description
RATE_OUT REAL† Rate of change after limit (units/sec)
RATE_IN REAL† Rate of change before limit (units/sec)
OUT REAL† Rate limited output
RATE_LIM BOOL Output rate limiting occurring
† Value with Status, if status option is enabled.
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 BOOL Increase rate of change HIGH flag
RATE_DEC_HI BOOL Decrease rate of change LOW flag
† Value with Status, if status option is enabled.
RUNG Block
Note Annunciation of Loss of IONet for Mark VIe I/O Packs, Annunciation of TMR Controller Heartbeat Status Not OK,
and Selection of Setpoint based on Boolean Logic are logic examples using the RUNG block.
Supported Operators
Operation Operator
Parenthesis ()
NOT ~
OR +
AND *
Inputs
Name Data Type Description
EQN Constant String Boolean equation
A BOOL Required Boolean input used in equation
↓ ↓ ↓
P BOOL Boolean input used in the equation
Output
Name Data Type Description
OUT BOOL The result of the equation
ROTARY_SW Block
Input
Name Data Type Description
IN UINT Selects which Boolean output will be True
Outputs
Name Data Type Description
OUT1 BOOL Contains the results of the selection process
↓ ↓ ↓
OUT32 BOOL Contains the results of the selection process
IN = 2.55
PREC = 1
OUT = 2.60000000
IN = 5.007
PREC = 2
OUT = 5.01000000
IN = -14.5
PREC = 0
OUT = -15
IN = 14.5
PREC = 0
OUT = 15
ROUND Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
Inputs
Name Data Type Description
IN REAL† Input variable
PREC UINT Input rounding precision
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT REAL† Rounded output
† Value with status, if status option is enabled.
Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.
SELECT Block
Note Selection of Setpoint based on Boolean Logic is a logic example using the SELECT block.
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
CASC ANY† Default (cascade) selection
IN1 ANY† First input variable
SEL1 BOOL First selection input
↓ ↓ ↓
INn ANY† N'th input variable
SELn BOOL N'th selection input
† Value with Status (Value only for Boolean block type), if status option is enabled.
Output
Name Data Type Description
OUT ANY† Selected output
† Value with Status (Value only for Boolean block type), if status option is enabled.
Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is BOOL. Refer to the section Change Data
Type of Variant Block.
SELECTOR Block
This block propagates quality status if the status operations are enabled. Refer to the Status Monitoring (STATUS_
MONITORING) block.
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 BOOL If True the branch is active
ON BOOL If True the branch is active and transitioning
GSTAT[7] BOOL Global input and output connection to SMGR block
NEXT1[2] BOOL Next output for branch 1
↓ ↓ ↓
NEXT8[2] BOOL Next output for branch 8
SMGR Block
Outputs
Name Data Type Description
ACTIVE BOOL Sequence is active status output
ON BOOL ON status output
NEXT[2] BOOL Output to connect to the START[2] of the next SSB
FAULT BOOL Sequence is faulted status output
SMB Block
Outputs
Name Data Type Description
NEXT[2] BOOL Next output to the start input of an SSB
ACTIVE BOOL If True the merge is active
ON BOOL If True the merge is active and transitioning
FAULT BOOL If True a fault has occurred
RTIME UDINT Remaining feedback time in seconds
States
Name Data Type Description
CTIME UDINT Current merge time in milliseconds
GSTAT[7] BOOL Global input and output connection to SMGR block
Note The SSMODE can be used to implement a semi-auto mode for a sequence.
The PASSTHR input controls how the SSB behaves if the DONEFB is True when the SSB is started. If PASSTHRU is True,
then only the ACTIVE output becomes True while the SSB transitions to the next step. If PASSTHR is False, then both the
ACTIVE and the ON outputs become True while the SSB transitions to the next step. The only way the SSB can fault is if the
DONEFB does not come True within the time specified in the FBTIME input (a value of zero or less means that the SSB will
never time out). If the SSB times out before the DONEFB becomes True, the FAULT output will go high. If the DONEFB
becomes True, the fault will clear automatically and the sequence will continue.
SSB Block
Inputs
Name Data Type Description
START[2] BOOL Starts the SSB. Connect from NEXT output of another step
DONEFB BOOL Done feedback input. Causes a transition to the next step
FBTIME UDINT Feedback input time in milliseconds
FORCEFB BOOL Forces the done feedback to True
HOLD BOOL Global hold input to all the SFBs
SSMODE BOOL Single step mode (semi automatic mode)
SSTRIG BOOL Single step trigger (edge sensitive)
RESET BOOL Resets the SSB from any state
PASSTHR Constant BOOL When started just go to the next step if the done feedback is True
States
Name Data Type Description
CTIME UDINT Current feedback time in milliseconds
GSTAT[7] BOOL Global input and output connection to SMGR block
Note This block is a variant block that supports any one the following block data types: BOOL, Integer, Double Integer,
Real, Long Real, Unsigned Integer, Unsigned Double Integer. Refer to the section Change Data Type of Variant Block.
SETARRY Block
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: False)
SET ANY Set value
Output
Name Data Type Description
DEST[ ] ANY Destination array
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
SQRT Block
This block propagates quality status if the status operations are enabled.
Block Status Modification: If the input is negative, the output will be the square root of the absolute value of the input and the
output status will be NOT_LIMITED- CONFIGURATION_ERROR-BAD [4].
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 Change Data Type of Variant Block.
STATUS_COMBINE Block
This block propagates status. Refer to the Status Monitoring (STATUS_MONITORING) block.
Inputs
Name Data Type Description Default
IN_S UINT Input status 128
IN ANY_NUM Input value 0
Output
Name Data Type Description Default
OUT ANY_NUM Output value with status N/A
• Single Input/Single Output blocks (such as ABS) take a single input and produce a single output.
• Selection blocks (such as SELECT, MIN_MAX) produce one output from a selection of multiple inputs. The output
status is propagated based on the selected input variable.
• Relational blocks (such as ADD, MULT, SUB) use multiple inputs to produce an output.
These blocks change status based on equation boundary conditions or when the output value exceeds the data type range as
specified for that specific block. The standard status is represented as: (Limit_Status)-(Sub_Status)-(Status_Region) (for
example, NOT_LIMITED-DEVICE_FAILURE-BAD).
Note The priority of the output status calculation is listed in the table Output Status Calculation Hierarchy.
Note For a complete list of status regions, refer to the section Status Tables.
The output status region is based on the inputs. It cannot be improved, but can be degraded based on the propagation priority.
For example, a block with three inputs and one output has input variables in the status regions of BAD, UNCERTAIN, and
GOOD(NC). The output would reflect the input with the lowest propagation priority and therefore have an output status of
BAD. This applies for all three function block divisions for input variables used in the calculation of the output.
Note Additional information on cascade structures is available from the FOUNDATION FieldbusTM organization.
Sub_Status
There are many different sub statuses (such as DEVICE_FAILURE and SUBSTITUTE), which are used to provide more
specific information. The sub-status is propagated to the output based on the following rules:
1. For Relational blocks, sub-status is not propagated when two or more measurements are combined. The resulting
sub-status will be designated as non-specific.
2. For Single Input/Single Output and Selection blocks:
• BAD Region - Only Device Failure (Status Enumeration Values: 12 – 15) or Sensor Failure (Status Enumeration
Values: 16 – 19) BAD quality Sub-Status are propagated. All others are propagated as non-specific (Status
Enumeration Values: 0 – 3)
• UNCERTAIN Region - No Sub-status Propagated, all are propagated as non-specific (Status Enumeration Values: 64
– 67)
• GOOD(NC) Region - No Sub-status Propagated, all are propagated as non-specific (Status Enumeration Values: 128
– 131)
• GOOD(C) Region - All Sub-status Propagated (Status Enumeration Values: 192 – 227)
Limit_Status
There are four limits used in statuses: NOT-LIMITED, LOW-LIMITED, HIGH-LIMITED, and CONSTANT. The limit status
propagation is based on these rules:
1. For Relational blocks, the limit status is never propagated. The limit status is only created by a block if needed.
2. For Single Input/Single Output and Selection blocks, the status limit is propagated. A block altered status will
overwrite an input limit status.
Note This block is a variant block that supports any one of the following block data types: Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The data type of the VALUE pin must match the selected data type of
the block. Status functionality is always enabled for this block. Refer to the section Change Data Type of Variant Block.
STATUS_SPLIT Block
This block propagates status. Refer to the section Status Monitoring (STATUS_MONITORING).
Input
Name Data Type Description Default
IN ANY† Input value 0
† Value with status
Outputs
Name Data Type Description Default
VALUE ANY Output value N/A
STATUS UINT Output status N/A
GOOD BOOL Status in GOOD region N/A
BAD BOOL Status in BAD region N/A
POOR BOOL Status in UNCERTAIN region N/A
Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.
STEER Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Inputs
Name Data Type Description
ENABLE BOOL Block enable (Default: True)
CLR BOOL If True, all outputs and CASC are cleared (Default: False)
IN ANY† Input variable
SEL1 BOOL First selection input
↓ ↓ ↓
SELn BOOL N'th selection input
†Value with Status (Value only for Boolean block type), if status option is enabled.
Outputs
Name Data Type Description
ACT BOOL Block is active; a selection has been made by the block or CLR is True
CASC ANY† Default selection
OUT1 ANY† First output variable
↓ ↓ ↓
OUTn ANY† N'th output variable
† Value with Status (Value only for Boolean block type), if status option is enabled.
Note This is a variant block that supports any one the following block data types: Integer, Double Integer, Real, Long Real,
Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type of Variant
Block.
SUB Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Inputs
Name Data Type Description
IN1 ANY_NUM† Input 1
IN2 ANY_NUM† Input 2
†Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY_NUM† Result of the substraction
† Value with status, if status option is enabled.
Note This is a variant block that supports any one the following block data types: Boolean, Integer, Double Integer, Real,
Long Real, Unsigned Integer, Unsigned Double Integer. The default data type is Real. Refer to the section Change Data Type
of Variant Block.
SWITCH Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Inputs
Name Data Type Description
F ANY† (Default: 0)
T ANY† Input variable (Default: 0)
SEL BOOL Selection input (Default: 0)
A_RATE REAL Ascending transfer rate (engineering_units/sec) (Default: 0)
D_RATE REAL Descending transfer rate (engineering_units/sec) (Default: 0)
† Value with status, if status option is enabled.
Output
Name Data Type Description
OUT ANY† Selected value
† Value with status, if status option is enabled.
Attention
SYS_OUTPUTS Block
Inputs
Name Data Type Description
Application Reset: Directs all I/O packs to reset any latched conditions resulting from
MRESET BOOL
previous trips.
Reset Suicide: Directs all I/O packs to unsuicide any closed loop regulators. Suiciding
RSTSUIC BOOL a regulator forces it into a safe state. Closed loop operation may not be re-started
without lifting the suicide.
Reset Diagnostics: Directs all I/O packs and the controller to clear from the queue all
RSTDIAG BOOL
diagnostics in the normal state.
RSTSYS BOOL Reset System Limits: Directs all I/O packs to clear all latched system limit logicals.
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
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
DAY_SP UINT Day setpoint Value only
HR_SP UINT Hour setpoint, based on 24 hour clock (9:00 pm = 21) Value only
MIN_SP UINT Minute setpoint Value only
SEC_SP UINT Second setpoint Value only
DST_B_MON ENUM(UNIT) Daylight Savings Time Begin Month Value only
DST_B_DAY ENUM(UNIT) Daylight Savings Time Begin Day Value only
DST_B_HR ENUM(UNIT) Daylight Savings Time Begin Hour Value only
DST_B_MIN ENUM(UNIT) Daylight Savings Time Begin Minute Value only
DST_E_MON ENUM(UNIT) Daylight Savings Time End Month Value only
DST_E_DAY ENUM(UNIT) Daylight Savings Time End Day Value only
DST_E_HR ENUM(UNIT) Daylight Savings Time End Hour Value only
DST_E_MIN ENUM(UNIT) Daylight Savings Time End Minute Value only
Outputs
Name Data Type Description Interface Type
FLAG BOOL Indicates that the set time has been reached Value only
YR UINT Year in Local Time Value only
MON UINT Month in Local Time Value only
DAY UINT Day in Local Time Value only
HR UINT Hour in Local Time Value only
MIN UINT Minute in Local Time Value only
SEC UINT Second in Local Time Value only
UTCTIME UDINT UTC seconds Value only
LOCKED BOOL True if time is synchronized with an NTP Time Master Value only
Note This block is not recommended for use in any new controller applications (ControlST V05.02 or later). Refer to the
section Legacy Category Blocks.
The Timer (TIMER) block accumulates incremental time into CURTIME while RUN is True. When CURTIME is equal to
MAXTIME, AT_TIME transitions to True. If RUN is False then timing is suspended but the value in CURTIME remains. If
RESET is True then CURTIME is set to zero and counting is suspended. The AUTO_RS flag can reset the timer after it
reaches MAXTIME. In this mode, AT_TIME will be True for one scan and the CURTIME will be set to the residual count so
that no time is lost.
The time period taken by the output pin AT_TIME to transition is always a multiple of the frame performance period set in
the ToolboxST application. For accurate performance of the block, set MAXTIME as a multiple of the frame performance
period.
The maximum value of CURTIME in the TIMER block is 4294967295ms (0xFFFFFFFF).
Note The AUTO_RS input pin will provide timing intervals equal to MAXTIME, except for the first timing interval which
will be MAXTIME minus one execution period.
If the user wraps the AT_TIME output pin back to the RESET input pin, the timing interval will be equal to MAXTIME plus
one execution period, except for the first timing interval which will be MAXTIME minus one execution period.
On the TIMER block, the AT_TIME output pin should never be connected directly to the RESET input pin, a MOVE block
should be inserted between the pins. If the AT_TIME output pin is connected directly to the RESET input pin, the AT_TIME
output pin will never go true.
TIMER Block
Note Annunciation of TMR Controller Heartbeat Status Not OK is a logic example using the TIMER block.
Outputs
Name Data Type Description
AT_TIME BOOL Indicates the timer has reached the maximum time value
CURTIME UDINT Current time value in milliseconds
State
Name Data Type Description
This is the last current time value in milliseconds, a hidden pin. It can be viewed or
LAST_CURTIME UDINT changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.
Note The AUTO_RS input pin will provide timing intervals equal to MAXTIME, except for the first timing interval which
will be MAXTIME minus one execution period.
If the user wraps the AT_TIME output pin back to the RESET input pin, the timing interval will be equal to MAXTIME plus
one execution period, except for the first timing interval which will be MAXTIME minus one execution period.
TIMER_V2 Block
Outputs
Name Data Type Description
AT_TIME = True indicates that the timer has reached the maximum time value. In
Timer Version 2, AT_TIME can be used as a signal for the RESET pin as was the
AT_TIME BOOL
case in many existing Mark VI controller applications. This logic results in a loss of
residual time, whereas the use of AUTO_RS results in no loss of residual time.
CURTIME UDINT Current time value in milliseconds
State
Name Data Type Description
This is the last current time value in milliseconds, a hidden pin. It can be viewed or
LAST_CURTIME UDINT changed by right-clicking the block and selecting Edit Block Pins. Writing to this
variable is not recommended, but can be used to preset block states.
Only one instance of this block is allowed per controller in the application code.
Attention
Note Totalizer values are set in the ToolboxST application. For instructions, refer to the ToolboxST User Guide for Mark
Controls Platform (GEH-6700 or GEH-6703), the section Totalizers.
TOTALIZER Block
Inputs
Name Data Type Description
INC1 BOOL Specified totalizer increments on the rising edge of this pin
↓ ↓ ↓
INC128 BOOL Specified totalizer increments on the rising edge of this pin
Outputs
Name Data Type Description
TOTAL1 UDINT Output value of the totalizer for use by other application code
↓ ↓ ↓
TOTAL128 UDINT Output value of the totalizer for use by other application code
Set True if the totalizer value has overflowed. The pin stays True until INCx
ROLL1 BOOL
increments again.
↓ ↓ ↓
Set True if the totalizer value has overflowed. The pin stays True until INCx
ROLL128 BOOL
increments again.
This equation can approximate a phase lead, phase lag, simple lag, phase lead/lag, or a bridged-T (Notch) compensator
depending upon the choice of the appropriate coefficients. The block can also be used to create Butterworth, Chebyshev, and
such, second order filters, and can be cascaded to form higher order filters.
The nature of the transfer function may be altered online by changing the values of the equation coefficients. The block
calculates whether the new coefficients result in an unstable function (one or more poles lie outside the unit circle). If found to
be unstable the block does not switch to the new function but maintains the old coefficients. The switching lockout may be
defeated by using the DLOCK pin but CI_ERR will still be set True if the stability check fails.
The stability check is intended to protect the user against transfer functions that are grossly unstable. It cannot replace sound
engineering judgement. Limitations in the stability check may cause erroneous results when the coefficients specify a
marginally stable transfer function. There is no guarantee about the stability of the loop in which it is placed.
The evaluation of coefficients normally occurs in the background and the coherent set is transferred to the foreground.
Therefore the change from one set of coefficients to another may require over 500 milliseconds to occur. If ENA_DYN is set
to True this calculation is performed in the foreground, but the block incurs an performance time penalty as a result. If
foreground coefficient evaluation is chosen the block is preset with the unity gain function at initialization time. The first
evaluation occurs at the first foreground performance and if found to be unstable, the unity gain function remains in effect.
The TRNFUN (REAL) form should be used to implement second order and simpler functions. The TRNFUN (long) form
should be used when cascading blocks to create higher order forms because it maintains the resolution of a double floating
point number between the blocks. A data type conversion block, such as MOVE (REAL) is required to convert the output of
the final block back to a single precision floating point number for use with most other blocks. The transformation from the
continuous domain (s) into the discrete domain (z) is accomplished by bilinear transformation. This method produces accurate
results for frequencies of interest that are less than 0.3/T (w < 0.3/T). For tasks executing at 32 milliseconds this is about 10
radians, or 1.5 Hz. For tasks executing at 2 milliseconds this is about 150 radians, or 24 Hz.
Note This is a variant block that supports any one the following block data types: REAL or Long Real. The default data type
is REAL. Refer to the section Change Data Type of Variant Block.
TRNFUN Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Block status modifications: If B0, B1, B2 = 0, then the output status will be NOT_LIMITED-CONFIGURATION_ERROR-BAD
[4].
Outputs
Name Data Type Description
OUT REAL/REAL† Output value
CI_ERR BOOL If True, indicates that the specified transfer function is unstable
† Value with status, if status option is enabled.
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 Change Data Type
of Variant Block.
UNIT_DELAY Block
This block propagates quality status if the status operations are enabled. Refer to the section Status Monitoring (STATUS_
MONITORING).
Inputs
Name Data Type Description
INPUT ANY† Input value to be delayed
† Value with status, if status option is enabled.
Outputs
Name Data Type Description
OUTPUT ANY† Delayed value
STATE ANY† Current value of the input (for feedback)
† Value with status, if status option is enabled.
Note The task heartbeat is anti-voted, so it can be used to detect a stalled task in a particular controller.
USB_HB Block
Note The USB heartbeat counter should not be connected to an I/O module output. This generates an output disagreement
diagnostic alarm. The DEVICE_HB block should be used instead to connect to an I/O module output.
Output
Name Data Type Description
Out UINT Controller heartbeat variable
UTC_TIME Block
Outputs
Name Data Type Description
UTCTIME LREAL Outputs UTC seconds
LOCKED BOOL True if local time is synchronized with an NTP Time Master
Note If a variable that is not an alarm is attached to this block, the output statuses will return False.
VAR_ALARM_STATUS Block
Inputs
Name Data Type Description
VAR ANY Variable for which alarm statuses are to be examined
Outputs
Name Data Type Description
ACK BOOL Alarm Acknowledge status for the input variable VAR
IN_ALM_Q BOOL In-Alarm Queue status for the input variable VAR
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
Name Data Type Description
HEALTH1 BOOL Is input 1 Healthy
↓ ↓ ↓
HEALTH32 BOOL Is input 32 Healthy
LINKOK1 BOOL Link OK for EGD variable 1
↓ ↓ ↓
LINKOK32 BOOL Link OK for EGD variable 32
UNCERT1 BOOL Is input 1 Uncertain
↓ ↓ ↓
UNCERT32 BOOL Is input 32 Uncertain
BAD1 BOOL Is input 1 bad
↓ ↓ ↓
BAD32 BOOL Is input 32 bad
LINK_UNCERT1 BOOL Is EGD link 1 Uncertain
↓ ↓ ↓
LINK_UNCERT32 BOOL Is EGD link 32 Uncertain
LINK_BAD1 BOOL Is EGD link 1 bad
↓ ↓ ↓
LINK_BAD32 BOOL Is EGD link 32 bad
VARSIM Block
Inputs
Name Data Type Description
ENABLE BOOL Enable the block to run
PU_DLY UINT Pickup Delay - milliseconds to delay a 0 to 1 Boolean transition
DO_DLY UINT Dropout Delay - milliseconds to delay a 1 to 0 Boolean transition
IN1 ANY The unscaled value to be written to the corresponding variable point
↓ ↓ ↓
IN32 ANY The unscaled value to be written to the corresponding variable point
Outputs
Name Data Type Description
OUT1 ANY A variable identifying the variable point to write
↓ ↓ ↓
OUT32 ANY A variable identifying the variable point to write
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 alarm could be used as a warning for when the cabinet is getting too hot. This process alarm (typically set at a more
restrictive range than when the diagnostic alarm from the I/O pack is annunciated) does not indicate any immediate danger to
the I/O pack electronics.
Note This example process alarm is typically set at a more restrictive range than the I/O pack diagnostic alarm.
3
Max temp for all simplex
7
Max of the 8
max temp Compare
to temp
threshold
4, 5, 6
Max temp for all TMR
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
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. From the ToolboxST Component Editor Software tab, press F1 for more information on the
ControllerStateHeartbeat intrinsic variable.