Control button "Load" of snapshot component

Update:

Since the version 1.1.0.0, you can use the method Load and Save of function block FB_QRC_Snapshot to trigger / save snapshots without using the Named Control concept. Method GetSnapshotState can be used as querying the snapshots' state manually, or the method AddSnapshotControl of FB_QRC_ChangeGroup can be used to join in a change group and then. The function block FB_QRC_ResExtract is now supported to extract the response frame of snapshot. Read the section Snapshot state and related properties for more information.

Foreword

There isn’t any related information about controlling snapshot components in the QRC specification. The button "Load" (a control of snapshot component) is a "trigger" type. So there is no way of getting a status back, nor of adding them to a Change Group. The following solution is a functional workaround to get the feedback via the snapshot buttons' "color" property. Otherwise we can't ensure whether the "Load" process was executed successfully.

Using the "color” property it is possible to recognize status changes of buttons within a snapshot component. With the help of the “Control.Get" command, the "color" property can be queried. Due to the behavior of "Save" buttons (No status change), they are excluded from this solution.

Color property and its corresponding snapshot state

Color

State

‘@7F19’

‘unloaded’

‘@7F7F’

‘loaded’

‘@7F4C’

‘changed’

The 'changed' state means, relative controls have been changed after the snapshot was loaded. In this state, "Save" buttons are usable to overwrite a snapshot.

This logic has already been implemented in the function block FB_QRC_ResExtract.

Control button "Load" of snapshot component 1:

1. This solution only works with the default button colors. DO NOT change the snapshot button color. Otherwise its status cannot be recognized by function block FB_QRC_ResExtract.

2. This method is specially developed for snapshot buttons, it doesn’t work for other controls with trigger type.

3. The "Load Prev" and "Load Next" buttons are excluded from this solution because the "color" property of them can't be queried from Q-SYS device.