Parse function – Rockwell Automation FactoryTalk Transaction Manager User Guide User Manual

Page 107

Advertising
background image

7

Creating Transactions

107

expression to calculate an average of the previous 10 transaction values
(avg(datapoint[0,9]). This functionality also works to calculate the
minimum (min) or maximum (max) value of a data point over several
transactions.

You must run the transaction to reflect changes in the historical values. The results,

however, do not need to be stored.

Using the Store on Every N Transactions option, you can collect the data
needed for an average, but not store the data to the database. If a transaction
executes every second but only stores its data every 60 times and there is an
avg(datapoint[0,59]), the value that is stored once a minute is the average of
the values taken every second.

If you make changes to transactions (or their bound data points) in a running
configuration using the Data Point Range function in conjunction with the
Avg function in an expression, the transaction resets or behaves as though it
is starting for the first time when you assemble the pending edits. For more
information about this behavior in a transaction, see Chapter 8,
Understanding Online Edits (page 111).

Parse Function

The Parse function in the Expression Editor provides a powerful feature to
guarantee that all data for a transaction is synchronized. The input for the
parse function is a block of data and the output is a parsed subset. This
permits the control system to manage all data into a single data point, which
can then be sent using an unsolicited message to the control connector. The
control connector then sends the data as a single unit to the Transaction
Control Manager service or FactoryTalk Transaction Manager service. The
Transaction Control Manager service or FactoryTalk Transaction Manager
service uses the arrival of the data point as a trigger and then parses out the
individual values as needed. Since the control system gathered all of the data
into a single block and the block was sent to the Transaction Control
Manager service or FactoryTalk Transaction Manager service as a single
unit, it is synchronized. The Parse function can also be used on scheduled

Advertising