description:toggle alternates between two sets of process variable values stored in snapshot files and/or
process variables specified on the command line. Time intervals and the values of the process variables upon
termination can be specified.
examples: Two states of the APS storage ring injection magnets are restored for 10 seconds each by writing values of
process variables listed in the snapshot files SRin.snp1 and SRin.snp2:
toggle SRin.snp1 SRin.snp2 -interval=10,10
In this case the magnets return to the initial state upon termination.
The input files are valid snapshot files as described in sddscasr(). At least three columns must be
defined:
ControlName — Required column. String column for the process variable or device name.
ControlType — Required column. String column for the control name type. For a process variable
name use “pv”; for a device name use “dev”.
ValueString — String column containing the value to be restored as a character string.
Optional columns are:
RestoreMsg — Optional column. String column for the device set message if the ControlType
value is “dev”. If this column is absent then the default read message is “set”.
Both files must have the same set of PV names.
switches:
-controlName=<PVname>,<value1>[,<value2>] — Optional. Specifies a PV to be alternated. If only
one value is given, then the second value is taken to be pre-existing. These values are synchronized with
the snapshot files if they are present.
-interval=<interval1>[,<interval2>] — Optional. <interval1> and <interval2> are the durations
of PV value sets 1 and 2, respectively. If <interval2> isn’t present, then <interval2>=<interval1>. If
this option isn’t present, then the default interval is 1 second each.
-cycles=<number> — Optional number of cycles. Default is 1.
-finalSet={original|first|second} — Optional. Specifies which PV value set to apply at normal
termination. original, first, and second mean the pre-existing values, first set, and second set
respectively. During abnormal termination, the PVs are returned to their pre-existing values.
-pendIOtime=<seconds> — Optional time to wait for channel access operations.
-prompt — Optionally toggles values only on a <CR> key press.
-singleShot[=noprompt|stdout][,resend] — Optionally performs a single toggle initiated by a <CR>
key press. Qualifiers control prompting and resending the value.