Using the datalogsnapshot command, Example: creating an event for on-demand logging, Combining logging – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual
Page 592
F
ACTORY
T
ALK
V
IEW
S
ITE
E
DITION
U
SER
’
S
G
UIDE
22–14
• •
•
•
•
Using the DataLogSnapshot command
You can use the DataLogSnapshot command with either of these parameters:
DataLogSnapshot <component> (where
records tag values for all tags in the specified model at the instant the command is run.
DataLogSnapshot * records tag values for all tags in all running models at the instant
the command is run.
You can use the DataLogSnapshot command anywhere you can type a FactoryTalk View
command or macro. For example, you can use the command as the action for an event (an
example of how to do this follows).
To provide operators with a way to log on demand at run time, create a button object in a
graphic display, or a display key or client key, that uses DataLogSnapshot as the press
action.
Example: Creating an event for on-demand logging
To create an event that will trigger logging when an alarm occurs:
1. In the Data Log Models editor, in the Log Triggers tab, select the option On
Demand.
2. Open the Event editor. Create an expression such as:
If alm_in_alarm(motor_fault) and new_batch_started then 1
else 0
3. In the Event editor’s Action field, type DataLogSnapshot <component> where
component is the name of the data log model.
When the tag called motor_fault goes into alarm, and the tag called new_batch_started is
1, the DataLogSnapshot
logged (not just the tag in alarm).
Combining logging
You can combine periodic or on-change logging with on-demand logging, to capture data
at particular times and when a particular event occurs.
To combine logging
1. In the Data Log Models editor, in the Log Triggers tab, select the Periodic or On
Change option.