FAST COLLECTION OF CRYOGENIC DATA USING CIRCULAR BUFFER J. Brubaker, 01/27/97 1.0 SUMMARY The cryogenic refrigerator control system upgrade includes hardware for continuously collecting data from analog channels at a 1.0 kHz rate. An I/O crate card called the FIFO card (First In-First Out) is a circular buffer that collects data continuously while waiting for a trigger event signaling file saves of that data. For a limited number of triggering events per hour, this data can be saved 16.384 seconds at a time and then later displayed at a console and mailed to a VAX account. Together with existing and newly modified "Snapshot" software, the feature provides capability previously available only though a separate and cumbersome PC based data acquisition system or though Accelerator Division MADC channels. Knowledge of standard Snapshot data collection control and a few specific items pertaining to the cryogenic subsystem, are sufficient to use the facility. 2.0 CRYOGENIC SUBSYSTEM DIFFERENCES For those who want to know only about differences from other accelerator subsystem snapshot operation, read this section. For a more complete description of how to use the snapshot facility with cryogenic channels, read this section as well as the others. 2.1 Data Collection Only a 1kHz collection rate is availble and the duration of collection is fixed at 16.384 seconds. 2.2 Channels Available Only analog channels on the I/O crate analog board can be used. Engine channels, thermometry channels, and any digital channels must be run to a spare analog channel in order to be recorded with this facility. For each refrigerator or compressor building there is a 16 analog channel limit on the number of devices that can be recorded at a time. 2.3 Non-Cryogenic Channels These can not be recorded on the cryogenic subsystem, unlike other subsystems (e.g. Tev or Booster) that can collect data from different subsystem devices. Also, other subsystems can not use a cryogenic device. 2.4 Triggers Either Tevatron clock events or inputs to cryogenic auxiliary digital status channels can serve as the trigger causing data to be saved at a given refrigerator or compressor building. Only one clock event may be armed at a time (instead of 8 as on other subsystems), but multiple status channels can be logically OR'ed to form the trigger. All active snapshot devices at a building are controlled by the same trigger. Each building has a designated status channel "standard" trigger named T:hsTRGS (where hs=house) available for user created inputs. This corresponds to digital status channel 0 at the I/O crate, and the hex mask used with this trigger is 00000001. 2.5 Modification of Collection Parameters Sampled channels, trigger signal, data collection delay, trigger rearm delay, maximum collections per hour, and user keys are changed using application page D42. However, instead of modifying channels with the "DEVICE:" entry in the upper box, use procedures outlined in section 4.0 3.0 PARAMETERS OF A SNAPSHOT Some cryogenic snapshot parameters are user definable to allow specification of the time relation between the trigger and the data saved, and to set limits on the number of data files saved. Specification of the parameters is made on a house-by-house basis, and the set of values chosen applies to all active snapshot devices at the house. When many channels are collected and/or channels are collected frequently, careful selection of these parameters is needed to assure that desired data files in the 200 file buffer are not overwritten. 3.1 Arm Events Arm Events are the specified triggers that cause the collected data to be saved. Two types of triggers can be used: Tevatron clock events or hardware auxiliary status inputs at the I/O crate. Only one Tevatron clock event at a time can be specified to produce a trigger event at a house. The event's number is entered in the page D42 "Modify Frig Mode". A listing of these clock events can be found on application page T61 where, for example, subpage 4 shows that the event number 4E corresponds to a Tevatron quench. When a single auxiliary status channel is used at a given house, the trigger event corresponds to closing of contact between that channel's two terminals. Status channels that currently have data base names appear in channel number order on application page F73. The hex mask associated with a hardware trigger depends on the status channel number. In the eight number hex mask, each number (having value 0 through F) represents four status channels. So, the mask can represent any of the 30 (not 32) available channels associated with a given auxiliary status card in the I/O crate. For example, hex mask 00080000 corresponds to status channel 19 (start counting with card channel 0 for each set of 30 channels). Which of the auxiliary status card gets addressed is specified only by the trigger device name. Two devices, T:hsDIN0 and T:hsDIN1, contain information on all 30 status channels for their respective auxiliary status cards. By using one of these device names for the trigger and by selecting the hex mask appropriately, any combination of the 30 status channels on an auxiliary status card can be used to trigger data saves. For example, hex mask 000F0000 causes a trigger when the pair of terminals for any of channels 16, 17, 18, or 19 are closed. Using 00000000 as a hex mask causes a trigger event each time the Rearm Delay elapses, up to the Max/hr number of events value. 3.2 Delay msec This is the time between occurrence of a trigger event and the desired first saved data point, A negative value signifies that data is saved for a time prior to the trigger. For Cryo, no delay after the trigger (i.e. positive delay) is allowed, although other subsystems can use positive trigger delay values. The time increment of data saved just prior to the trigger is equal to the absolute value of the "delay" time, and data saved after the trigger is saved for the remainder of the collection time. Since total collection duration is 16384 ms, the delay can not be less than -16384 ms. 3.3 Rearm Delay This parameter provides one way to limit the number of data files saved. To "arm" a trigger is to make the next trigger event cause a data save. Once the trigger event occurs, the trigger will not be rearmed until the specified delay time has elapsed. The Rearm Delay time actually begins after the data is collected and processed, with the processing taking up to several minutes. Thus if the Rearm Delay is set to 60 seconds, for example, trigger events can happen no sooner than several minutes (60s+16.384s+several min.) later. Note that units for the delay are selected from a menu and that selecting "once" results in data file saves at that house after the next trigger event only. Max/hr (described below) is then automatically set to zero in the "Active Cryo Snapshots" window after a first trigger, preventing further saves. Note that the Max/hr parameter is not set to zero in the "Frig Modes" window, which is only for setting up building triggers. 3.4 Max/hr A second way to limit the data file saves is to specify a maximum number per hour. In an effort to limit data path traffic, an upper limit of 30 file save per hour has been placed on this parameter. The parameter may be most useful in regulating the number of events for which data is recorded, so that previously saved data files are not overwritten. To capture events more uniformly spaced in time, it may be better to use the Rearm Delay parameter, but for this too the maximum 30 file per hour upper limit exists. Note that entering a 0 for Max/hr disables triggers for the house. 3.5 User Keys For certain non-cryo applications, automatic labeling of a data file with some identifier is performed. Since it takes additional software to implement this feature, it is available only on special request to AD/Controls. Generally, snapshot data can be just as easily labeled after the file has been moved to the user's VAX account. 4.0 SETTING UP SNAPSHOTS FOR CRYOGENIC CHANNELS Application page D42 "SNAPSHOT LOGGER" is the only application page used to control snapshot (i.e. fast) data collection parameters. It handles snapshot control for all accelerator subsystems listed in the menu box at the top of the page. Subsystems appearing in GREEN have active devices and filed snapshots, those is CYAN have no active snapshot devices but do have filed snapshots, and those in WHITE have neither active devises nor filed snapshots. Since the Snapshot logger is available to many users, and since file space and file save rates are limited, this application records modifications to D42 device lists and mails a notice of the changes to a designated list "owner" noted on a "help" subpage. Each accelerator subsystem list has an owner who is responsible for seeing that one user does not overwrite the useful files of another. This doesn't always mean that for each subsystem D42 is a single user application, but rather that some coordination should take place between users. 4.1 Viewing List of Files for a Single Device One method for obtaining information on files that exist for a particular cryogenic device is to enter the device name at "DEVICE:" in the upper box of D42. For an "active snapshot" device, this gives file dates, times, and numbers, all assigned at the time the data was collected. It also indicates any errors that occurred during the file save (0=no error) and whether user keys were defined. Note that if you try to Add, Modify, or Delete a device using the displayed buttons, "Cryo" is not an available subsystem choice. Other subsystems can modify parameters in this way but Cryo can not. Thus, this file listing is useful only to see if data for a device has been collected, but this task is more usefully performed directly from the SNP utility, where it can also be plotted. 4.2 Adding Devices to the Snapshot List From D42 select "Cryo" in the subsystem menu. Overlapped windows appear, the top one ("Active Cryo Snapshots") showing a list of analog devices for which data is collected (i.e. active devices). Select "Add" on the window boarder and enter the name of the device in the box that appears. Select "save" to add the device to the active list. Up to 16 devices at any house may be active at the same time. 4.3 Deleting Devices from the Snapshot List From D42 select "Cryo" in the subsystem menu. Overlapped windows appear, the top one ("Active Cryo Snapshots") showing a list of active devices. Select "Delete" on the window boarder, and click on a device to be deleted from the list. 4.4 Modifying Data Collection Parameters From D42 select "Cryo" in the subsystem menu. Overlapped windows appear, the top one showing a list of active devices along with their collection parameters. Select "Cryo Engr" on the window boarder to display a building list and a "Modify" button. The "Frig Modes" window provides the way to configure snapshot triggering for an entire house. Though it displays some of the same parameters as the "Active Cryo Snapshot" window, the information here is static. When, for example, Max/hr is automatically set to zero in the "Active Cryo Snapshot" window following a "once" save, it is not set to zero in the "Frig Modes" window. Select "Modify", click on the house for which parameters are to be changed, and make the changes in the box that appears. Toggle between "TriggerOnEvents" (Tev clock events) and "TriggerOnExternal" (auxiliary status input) by clicking on this button on the box boarder. Remember that for status input triggers, both the device name and hex mask must be entered (see section 3.1). For Tevatron clock event triggers, only the event number is entered. Select "Save" and "Quit" to configure the building with the new parameters or just "Quit" to go back to the old version. 5.0 DISPLAYING AND MAILING SNAPSHOT DATA To see what data files have been saved, select "Cryo" from the subsystem menu of application page D42. Of the two overlapping windows that appear, click on the back one ("Cryo Snapshot File") to get a chronological listing of files, each indicating a record number and any error associated with the file. There is a maximum of 200 files available with each containing data from a single analog device. If there are multiple active devices, the same time stamp will appear for more than one file. 5.1 Displaying Data Use the SNP utility on application page D42 to display the data. Click on SNP and type in the desired device name and units, and the time range in seconds relative to the trigger event (0=trigger). Make sure also that the field above the "Eng-U, Volts, Log" selector is set to "SMgr", otherwise the plotting routine won't know where to find the data. Click on the device name field, and in the window that appears, select the desired data file for the device. If more than one device is to be displayed, the data for the each device must have been collected at the same trigger event, but it does not need to be from the same house. For a multiple device plot, the program allows you to specify a file for the first device only, and assumes there are similarly time stamped files for the other device. 5.2 Mailing Data Data that has been displayed using SNP can be forwarded to a VAX account in tabular form using the E-Mail facility on application page D9. In the menu of the upper left-hand box click on "mail snapshot data", which brings up an "export snapshot data" window. Choices identifying the data source include: data taken from the plot currently displayed (1=now) or from the previous plot (i.e. the plot overwritten by the current plot, 2=last), data taken from a particular console (the default is the one you are working on), data taken from window SA (=2) or SB (=3), E-Mail address to which data is to be sent, and subject of the data mailing. To send mail after entering the above information, click on return. In the lower left corner of the plot appears a message "Building mail file", which is eventually replaced with "Sending mail file". The building and sending processes can take several minutes, but the messages at least let you know something is happening. Do not try to send more plot mail until the "Mailing done" message appears.