Snapshot
The Snapshot formula in its simplest form is this =<instance>.READTAGSNAPSHOT("<source::tag>") and it will return the latest value of the given tag.
Parameters
The Snapshot formula contains in total 12 parameters, where only the first one is required and all the others are optional and when omitted it will set the default values to some of them when the formula is inserted to an Excel cell.
The complete formula looks as follows:
=<instance>.READTAGSNAPSHOT(
Tags,
StartTime,
EndTime,
StatusFilter,
ShowHeader,
ShowTagName,
ShowStatus,
StatusAsString,
ShowTimeStamp,
NewestFirst,
Orientation,
EmptyValue
)
All parameters can be bounded to cell values.
Tags <List> Required
Tags contains a comma separated list of tags encapsulated with double quotes.
"<source::tag1>,<source::tag2>,<source::tag3,...>"
StartTime <Time>
Can be set by either using OPC-format or date-format.
Default: <empty>
EndTime <Time>
Can be set by either using OPC-format or date-format.
Default: NOW
StatusFilter <List>
Status Filter contains a comma separated list of statuses, encapsulated with double quotes, to filter out values that DO NOT have the specified statuses.
The following will return all values the DO NOT contain the statuses LOA, HIA, LLA and HHA:
"LOA,HIA,LLA,HHA"
Default: <empty>
All statuses:
OK, ROC, LOA, HIA, LLA, HHA, LLL, MNL, OFS, INV, BAD, IOF, INF, LOR, AVG, SUS, MXT, RND, INC
ShowHeader <Boolean>
Determines if the headers should be shown or not in the spreadsheet.
Default: TRUE
ShowTagName <Boolean>
Determines whether the tag name should be shown or not.
Default: TRUE
ShowStatus <Boolean>
Determines whether the status should be shown or not.
Default: TRUE
StatusAsString <Boolean>
Determines whether the status should be shown as a string or as a bit value.
Default: TRUE
ShowTimeStamp <Boolean>
Determines whether the timestamp should be shown or not.
Default: TRUE
NewestFirst <Boolean>
Determines the sort order of the data set by date when multiple tags are included.
Default: TRUE
Orientation <“VERTICAL” / “HORIZONTAL”>
Determines how the data set should be presented in the spreadsheet
Default: HORIZONTAL
EmptyValue <“N/A” / “EMPTY”>
Determines if an empty or missing value should be shown as “N/A” or as an empty cell.
Default: N/A