sddssynchlog
Reads values of process variables synchronously
and writes them to an output file. Synchronism is imposed by
requiring that all PVs generated callbacks occur within the number of
seconds given by the -synchInterval argument.
The linac bpms and MV200 PVs are synchonously monitored using the command below. One might wish to monitor these PVs determine if linac beam position and transverse size at a flag are correlated. The output file will contain 100 aligned samples of the PV data and should therefore take 16.67 seconds assuming the linac is running at 6 Hz. Alignment of process variable data is accepted and written to the output file if and only if the PV time stamps are withing +/- 1/6 Hz = 0.08 seconds. Data acquisition stops after 100 samples are acquired or a -timelimit of 20 seconds has elapsed. Note, it is absolutely required that the scalar synchronous PV file listed below (synchPVs.mon) contain at least a single PV. This is true even if one wishes only to synchronously acquire waveform process variables.
sddssynchlog synchPVs.mon synchPVs.sdds -samples=100 -synchInterval=0.08 -timelimit=20,seconds -verbosewhere the contents of the file
synchPVs.mon
are
SDDS1 &description &end &column name = ControlName, type = string, &end &column name = ControlType, type = string, &end &column name = ReadbackUnits, type = string, &end &column name = ReadbackName, type = string, &end &data mode = ascii, no_row_counts=1 &end ! page number 1 L2:PM1:BPM.CX pv mm L2:PM1:BPM.XPOS L2:PM1:BPM.CY pv mm L2:PM1:BPM.YPOS L2:PM2:BPM.CX pv mm L2:PM2:BPM.XPOS L2:PM2:BPM.CY pv mm L2:PM2:BPM.YPOS LI:VD1:x:raw:cal:sigmaM pv Pixels LVid:xRawSigma LI:VD1:y:raw:cal:sigmaM pv Pixels LVid:yRawSigma ...
The scalar linac bpm and MV200 PVs are synchonously monitored along with LCLS bpm data waveforms using the command below. The command is identical to that in example 1 except for the additional waveform file command which that specifies a file containing waveform PV data.
sddssynchlog synchPVs.mon synchPVs.sdds -waveformData=LCLS.wmon -samples=100 -synchInterval=0.08 -timelimit=20,seconds -verbosewhere the contents of the file
LCLS.wmon
are
SDDS1 ¶meter name=WaveformLength, type=long, &end &column name=WaveformPV, type=string, &end &column name=WaveformName, type=string, &end &data mode=ascii, &end ! page number 1 128 9 PAD:K211:1:CH0_RAW_WF PAD:K211:1:CH0_RAW_WF PAD:K211:1:CH1_RAW_WF PAD:K211:1:CH1_RAW_WF PAD:K211:1:CH2_RAW_WF PAD:K211:1:CH2_RAW_WF PAD:K211:2:CH0_RAW_WF PAD:K211:2:CH0_RAW_WF PAD:K211:2:CH1_RAW_WF PAD:K211:2:CH1_RAW_WF PAD:K211:2:CH2_RAW_WF PAD:K211:2:CH2_RAW_WF PAD:K211:3:CH0_RAW_WF PAD:K211:3:CH0_RAW_WF PAD:K211:3:CH1_RAW_WF PAD:K211:3:CH1_RAW_WF PAD:K211:3:CH2_RAW_WF PAD:K211:3:CH2_RAW_WF ...
sddssynchlog <input> <output> [-slowData=<input>] [-waveformData=<filename>] -samples=<number> [-timeLimit=<value>[,<units>]] -eraseFile [-pendIOTime=<seconds>] [-connectTimeout=<seconds>] [-verbose] [-comment=<parameterName>,<text>] [-synchInterval=<seconds>] [-precision={single|double}] [-saveTimeStamps=<filename>] [-steps=<int>] [-interval=<value>[,<units>]] Logs numerical data for the process variables named in the ControlName column of <input> to an SDDS file <output>. Synchronism is imposed by requiring that all PVs generated callbacks within the number of seconds given by the -synchInterval argument.
The input file is an SDDS file with a few data columns required:
The waveformData file is an optional input file specified on the command line which lists waveform PVs to be synchronously logged along with the scalar PVs in the input file.
The slowData file is an optional input file specified on the command line which lists scalar PVs to be slow (read non-synchronously) logged along with the synchronously logged scalar or waveform PVs in the input and waveform PV files. This feature is convenient if one wishes to log PVs for system information purposes instead of correlation analysis (such as beam current, vacuum pressure etc.). This file has the same columns as the input file.
The output file contains one data column for each process variables named in the input file if no waveformData file is specified. By default, the data type is float (single precision). If an optional waveformData file is specified, the structure of the output file changes. In this case, the column data are the waveform PVs and the scalar PVs in the input and slowData files are parameters. Each page contains waveform and scalar PV data for a single sample of the total number of samples acquired. The total number of pages equal the number of samples specified in -samples if all samples are able to be collected (ie. timeLimit is not exceeded during acquisition). Time columns and other miscellaneous columns are defined:
sddsplot
to make the best coice of time unit conversions
for time axis labeling.
StartYear
-- Short parameter for the year when the file was started.
StartJulianDay
-- Short parameter for the day when the file was started.
StartMonth
-- Short parameter for the month when the file was started.
StartDayOfMonth
-- Short parameter for the day of month when the file was started.
StartHour
-- Short parameter for the hour when the file was started.
-comment=<parameterName>,<text>
--
Gives the parameter name for a comment to be placed in the SDDS output file,
along with the text to be placed in the file.