![]() |
MCA Data Server Reference |
|||||||||||||||||||||||||||||||||||||||||||||
COUNTERUSB driverData structuresARM Data structuresAPI |
Counter Data Structure: arm_loggerSummaryThe arm_logger is implemented in an 8kB general purpose region of memory. For example users can log the change in operating voltage in response to a rapid change of count rate – to verify that the gain remains stable in such circumstances. Or the user may log net counts over background and the resulting alarm probability – to study the performnace of the portal monitor alarm function. In case custom software is implemented on device the logger size may be reduced, or the logger may be omitted altogether. The logger can be used to monitor rapidly changing parameters in time intervals ranging from 50ms to 12.75s. The logger creates running logs for two parameters. The parameters are chosen by the their index in the arm_status register. The parameter index is also indicated in the wxMCA arm_status table.
Associated commandsThe logger automatically starts, or resumes from where it last stopped, when xctrl_0 is non-zero. Setting xctrl_0=0 halts the logger. To reset the logger set arm_ctrl["user"]["clear_logger"]=1 and issue a read-modify-write (rmw) command to the MDS. Data structureThe logger has a fixed two-word header, followed by 2×1023 data words. All entries are 4-byte float numbers. The logger is organized as a two-word header followed by two circular buffers with logger_length-1 entries each. In each time step the logger writes a parameter_1 and parameter_2 value to the respective circular buffer. When the buffers are full, the logger continues writing at the beginning of the buffer, overwriting old data. The two-word header, however, is preserved.
The MCA Data Server (MDS) provides time-orded data lists for both parameters. For example, a value of end=200 indicate that the last new entry was at index 200. Hence, the oldest data point is at index 201. In the user record the MDS presents the data in correct time order with the oldest datum now at index 0. In this example user["var_0"] = fields["var_0"][201:1023] + fields["var_0"][0:201]. Here indices are in Python notation; ie highest index is not part of the selection. Note that a logger_length=1024 means that there are two circular buffers with 1023 entries each; ie one less than the logger_length.
|