Changes to Drumbeat Bill Peters 8/96 Background: Drumbeat acquires data by counting pulses from voltage-to-frequency converters. To minimize digitization errors, the frequency for zero volts is not zero but instead 250 kHz. Negative volts give lower frequencies than this and positive volts give higher ones. One consequence of this scheme is that all the numbers recorded by Drumbeat have a offset. This makes no difference for Dicke switched observations, but one must remove the offset from total power observations such as sky dips in order to analyse them properly. Another correction that must often be made is to reverse the sign of the numbers. Increasing intensity for the bolometers corresponds to a lower voltage to Drumbeat, but for the SIS receivers, the voltage is higher. In the past this was cured by reversing the meaning of Dicke Phase 1 and Phase 2 with a manual switch. A better solution would be to reverse the signs of individual channels because a phase definition change affects all the Dicke switched data and does not affect total power data. Each color of the four-color bolometer has two inputs to Drumbeat: an AC coupled input for Dicke switching and a DC coupled input for monitoring the total power. The Drumbeat software was modified in March so that for the DC channels the Dicke phases would be summed while for the AC channels they would be differenced. But this was done "fast and dirty" by requiring that all thirteen channels be recorded even though only the two on the sky had meaningful data. Finally, the orignal version of Drumbeat normalized the counts in each phase to be the nearest integer counts per quarter second. But some observers using the SIS receivers have wanted phase times as long as one second. For such observations, up to two bits of significance were unnecessarily truncated in each phase. Enhancements to Drumbeat: Three commands have been added to Drumbeat to overcome the above limitations: !ZERO, !SIGN, and !TPOWER. Observers will seldom need to use them, but receiver or bolometer installers may want to use them if they change the inputs to Drumbeat. In addition, Drumbeat now records the data in counts per second. (This should also be transparent to the observers since the raw data units have always been arbitrary.) A zero point for each channel will be subtracted and, if specified, the sign of the result will be reversed before the numbers are stored in the raw data file. When the above commands are used, the results are written to a configuration file so that Drumbeat will remember them when it is restarted. There are eight voltage-to-frequency converters available for receivers and bolometers in addition to those dedicated to the four-color bolometer and the seven-beam bolometer array under construction. It is intended that each receiver channel be permanently assigned to one of these eight so that it will no longer be necessary to swap any cables when changing to another receiver or bolometer. Rather, the reconfiguration will be done entirely in software. Gory Details: Drumbeat has 64 counters, one for each of its channels. At the beginning of each Phase, the counters are zeroed and at the end of each Phase, the counts are recorded. Counter #1 is permanently connected to a 1 MHz oscillator. Thus its counts correspond to the duration of each Phase in microseconds. It is used to normalize the counts of the other 63. The 63 should be each connected to a voltage-to-frequency converter, but currently only a third of these have been delivered to the HHT. The software allows one to specify which of the 63 "Physical" channels are to be recorded in the raw data file. This subset is refered to as "Logical" channels below. The three new commands above operate only on the Logical channels. However, the values are saved in a Physical array so that the correct values will always be used regardless of which subset of channels is currently active. Each time one of these commands is completed, the results are put into the corresponding array of 64 and appended to the configuration file, DRUMBEAT.CFG. (The first element of the 64 is for the time channel, but no command will modify this element.) Each entry in the configuration file is preceded by the name of the array and the date and time it was written, and is followed by a blank line. The value of each element which was changed by the command is marked with an asterisk suffix. When Drumbeat starts, it prints these headers, but only saves the data from the last entry for each array. (The asterisks are only for documentation and are ignored by Drumbeat.) One may edit the configuration file as needed, so long as the above structure is retained: a title line beginning in column 1, 64 numbers separated by one or more blank spaces on as many lines as required, followed by a blank line. Periodically, the oldest entries should be deleted. But one must be careful NEVER to use the Norton Editor, ne, for this. This editor adds a CTRL-Z character to the end of each file it edits. When Drumbeat appends to such a file, the system routines silently write the data after the CTRL-Z, but when Drumbeat reads the file (or one types it or edits it), the CTRL-Z is interpreted as the end of the file, and the appended information is lost. The DOS editor, EDIT, can safely be used. To test other editors, do a directory of the configuration file and note the number of bytes listed. Edit the file and change just one character. If the new file still has the same length, it is probably safe to use that editor. But after changing the configuration file, one should restart Drumbeat and verify that all the titles for the entries are printed and that there are no complaints. Commands beginning with ! are not passed on to the VME side of Drumbeat which controls the counters. They are only processed by the Drumbeat PC. The PC mainly reads the counter values stored, performs a Dicke phase difference if required, and sends the data to Kronen which writes it into the Raw Data file. Drumbeat will accept any valid command from Kronen (i.e. BEORGA) or from the Drumbeat keyboard. BEORGA has not yet been modified to send the new commands, however. The commands must be typed in uppercase with no space between the ! and the command name. Parameters for a command should be separated by one or more blank spaces. !ZERO This flags the next measurement to be a zero point measurement. Prior to the measurement, one should disconnect the inputs from the v-to-f converters corresponding to the Logical channels. If being done manually, one should select an active blanking input (a blinking green light in a column on the second VME card from the left) with the SBn command, n being the digit corresponding to the blanking signal. SM1 followed by SD1 begins the measurement, and SD0 ends it. The SD0 also causes the result to be written to the configuration file. Only the zero points for the Logical channels selected with the AK command will be measured. !SIGN s s s ... where each s is either a 1 or a -1 defines the sign of the Logical channels. Only those channels with -1 (actually, 0 or less) will have their signs reversed. An error message results if too many values are given. The extra values are ignored. !TPOWER f f f ... where each f defines whether the corresponding Logical channel is a total power channel (non-zero) or not (zero). An error message results if too many values are given. The extra values are ignored.