Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
can9635.mac | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: Detection MCA | ||||||
Description:
| ||||||
Documentation:
Simple macros to control the "digital" ADC Canberra 9635. Use "can9635menu" to set the parameters, "can9635status" to see them and "can9635init" to put them to some default values. | ||||||
Macros:
Usage: can9635setup [mca_no (mca_no ...)] Sets up Canberra 9635 ADC(s) - MCA number mca_no as in the SPEC config. can9635init Usage: can9635init [mca_no] Sets the canberra ADC module to some default state. can9635menu Usage: can9635menu [mca_no] Simple menu to send commands to the canberra adc without having to remember the individual routines. can9635_setlld Usage: can9635_setlld [mca_no lld] Set the LLD (Lower Level Discriminator) for minimum input acceptance voltage, range 0 to +10 V dc. Resolution 1 part in 4096 or 2.5 mV/step. can9635_setuld Usage: can9635_setuld [mca_no uld] Set the ULD (Upper Level Discriminator) for maximum input acceptance voltage; range 0 to +10.5 V dc. Resolution 1 part in 4096 or 2.6 mV/step. can9635_setzero Usage: can9635_setzero [mca_no zero] Set the analog zero level; adjustment range +-3% of the ADC full scale range. Resolution 1 part in 4096 or 0.0015%/step. can9635_setrange Usage: can9635_setrange [mca_no range] Set the range - 256, 512, 1024, 2048, 4096 or 8192 channels as the ADC's output limit. can9635_setgain Usage: can9635_setgain [mca_no gain] Set the gain - 256, 512, 1024, 2048, 4096 or 8192 channels as the ADC's output limit. can9635_setadcgain Usage: can9635_setadcgain [mca_no adc_gain] Set adc gain can9635_setoffset Usage: can9635_setoffset [mca_no offset] Set the digital offset of 0 to 8064 channels in binary multiples of 128 channels. can9635_setmode Usage: can9635_setmode [mca_no] Sets the canberra ADC mode as follows Pileup Rejection: LTC/PUR - non-LTC/PUR; Data Transfer: Overlapped - Non-overlapped; Peak Detect: Delayed - Automatic; Coincidence Mode: Anticoincidence - Coincidence; Coincidence Timing: Late - Early; Conversion Mode: SVA - PHA; can9635read Usage: can9635read [mca_no] Read all parameters from the ADC. can9635status Usage: can9635status [mca_no] Read and print all the parameters from the ADC. | ||||||
Internal Macros: | ||||||
Usage: _can9635setup (mca_no) Get the MCA mca_no device name. _can9635init Usage: _can9635init (mca_no) Sets the canberra ADC module to some default state. _can9635_setlld Usage: _can9635_setlld (mca_no, val, flag) Set the LLD to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_setuld Usage: _can9635_setuld (mca_no, val, flag) Set the ULD to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_setzero Usage: _can9635_setzero (mca_no, val, flag) Set analog zero level to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_setrange Usage: _can9635_setrange (mca_no, val, flag) Set the range to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_setgain Usage: _can9635_setgain (mca_no, val, flag) Set the gain to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_setadcgain Usage: _can9635_setadcgain (mca_no, val, flag) Set ADC Gain to val for mca_no (as in the config) ADC. Return -1 if error. _can9635_setoffset Usage: _can9635_setoffset (mca_no, val, flag) Set ADC Offset to val for mca_no ADC. If the flag is nonzero, ask for the value. Return -1 if error. _can9635_reset Usage: _can9635_reset (mca_no) Reset the mca_no ADC. _can9635_setreg Usage: _can9635_setreg (reg, bit, value) Change to value the bit of the register reg. Return the reg value. _can9635_readmode Usage: _can9635_readmode (mca_no) read the mode from the mca_no ADC. Return -1 if error, a string otherwise. _can9635read Usage: _can9635read (mca_no) Read all parameters from the mca_no ADC. Return -1 if error. _can9635status Usage: _can9635status (mca_no) Read and print all parameters from the mca_no ADC. _can9635_conv_to_reg Usage: _can9635_conv_to_reg (type, value, reg_arr) convert to register contents from physical value depending of the type - "gain", "range", "lld", "uld", "zero" and "adc_gain". The result is written in reg_arr indexed by the number of the register. _can9635_conv_from_reg Usage: _can9635_conv_from_reg (type, reg_arr) convert register content reg_arr to physical value, depending of the type - "gain", "range", "lld", "uld", "zero" or "adc_gain". _icb_read Usage: _icb_read (mca_no, from_reg, no_reg, outarr) read values from the ICB bus for number of registers no_reg, starting from register number from_reg on MCA mca_no and put the result in the output array outarr . Return 0 if OK, -1 if error. The outarr is indexed with the number of the register (i.e. the value of register 7 is outarr[7]). _icb_write Usage: _icb_write (mca_no, from_reg, no_reg, inarr) write values from the input array inarr for number of registers no_reg, starting from register number from_reg on MCA mca_no. Return 0 if OK, -1 if error. _nbch Usage: _nbch (nb_ch) set the number of channels nb_ch to be 256, 512, 1024, 2048, 4096 or 8192 only. | ||||||
|