spec

Software for Diffraction

px4

Amptek PX4 USB/Serial MCA

INTRODUCTION

spec supports the Amptek PX4 over both USB and RS-232C interfaces. (USB support in spec is currently available on Linux and Mac OS X platforms.) The serial baud rate is fixed at 57.6K.

In USB mode, the maximum number of data channels is 8,192. With the serial interface, the PX4 can be configured for up to 4,096 channels.

Multiple PX4 units can be configured for simultaneous use with spec. When using the USB interface, the module serial number can be configured in the ADDR field of the configuration editor. If the configured serial number or numbers are zero, spec will assign the USB PX4 modules in the order they are discovered on the USB bus.

The PX4 has many operational parameters. Amptek provides Windows-compatible software to control the PX4. That software can read and create parameter configuration files that are interchangeable with spec. See the "read_config" and "save_config" options to mca_par() below.

FUNCTIONS

The standard MCA commands supported by spec are described in the mca help file. Of the standard functions, the Amptek PX4 MCA supports mca_get() (but not mca_put()). The standard mca_par() options "info", "chans", "max_chans", "max_channels", "disable", "auto_run", "soft_preset", "auto_clear", "native_type", "run", "halt", "clear", "group_size" and "select_group", are supported by the Amptek PX4 MCA.

The option "npts" is a synonym for "group_size". The option "buffer" is a synonym for "select_group".

The "auto_clear" mode is on by default.

Options specific to the PX4 are described below.

MCA

mca_par("npts" [, value])
With the optional argument, sets the number of channels to value. Allowed settings are 256, 512, 1024, 2048 and 4096. When using the USB interface, 8192 is also allowed. Returns the current number of channels.
mca_par("input_gate" [, value])

With the optional argument, sets the TTL gate according to value, which can be a number or a string, as below:

0 or "off"
1 or "high"
2 or "low"

Returns one of the above strings, indicating the state of the TTL gate.

mca_par("slow_threshold" [, value])
With the optional argument, sets the slow threshold percent to value. The allowed range is from 0 to 24.41% of full scale. Returns the current setting.
mca_par("SCA#" [, value])
With the optional argument, sets the SCA channel indicated by # (a number from 1 to 8) to value. Returns the value of SCA#.
mca_par("SCA#", "enable")
Enables the designated SCA by setting the high order bit. Returns the contents of the SCA register.
mca_par("SCA#", "disable")
Disables the designated SCA by clearing the high order bit. Returns the contents of the SCA register.
mca_par("SCA#", "lower" [, value])
With the optional argument, sets the lower bytes of the designated SCA register to value. Allowed values are from 0 to 8191. Returns the current setting. The value is the lower ROI limit for the designated scaler channel.
mca_par("SCA#", "upper" [, value])
With the optional argument, sets the upper bytes of the designated SCA register to value. Allowed values are from 0 to 8191. Returns the current setting. The value is the upper ROI limit for the designated scaler channel.

Shaping

mca_par("rise_time" [, value])
With the optional argument, sets the rise (or peaking) time to value. The argument is in microseconds. Permitted values are from 0.8 to 102.4, although only 24 discrete values are available. The software will select the value closed to the argument. Returns the current rise time in microseconds.
mca_par("flat_top" [, value])
With the optional argument, sets the value of the flat-top width. The argument value is in microseconds. Permitted values are between 0.2 and 51.2 altogether, but only 16 discrete values are allowed for each value of rise time. Returns the value of the flat-top width in microseconds.
mca_par("pileup_reject" [, value])
With the optional argument, turns pileup rejection mode on for value set to 1 or a string starting with Y or y. Otherwise turns pileup rejection mode off. Returns 0 or 1 indicating whether the mode is off or on.
mca_par("fast_threshold" [, value])
With the optional argument, sets the current fast-channel threshold. The argument value can be an integer from 0 to 250. Returns the current fast-channel threshold setting.
mca_par("rise_time_disc" [, value])
With the optional argument, turns rise-time discrimination mode on for value set to 1 or a string starting with Y or y. Otherwise turns rise-time discrimination mode off. Returns 0 or 1 indicating whether the mode is off or on.
mca_par("rtd_slow" [, value])
With the optional argument, sets the rise-time discrimination threshold percent to value. The allowed range is from 0 to 48.83% of full scale. Returns the current setting.
mca_par("rtd_fast" [, value])
With the optional argument, sets the rise-time discrimination fast full width at half maximum to value. The valid range is from 4 to 19. Returns the current setting.
mca_par("auto_baseline" [, value])
With the optional argument, turns baseline restoration mode on for value set to 1 or a string starting with Y or y. Otherwise turns baseline restoration mode off. Returns 0 or 1 indicating whether baseline restoration is off or on.
mca_par("baseline_restoration" [, value])
With the optional argument, sets the baseline restoration to value, which can be a number from 63 to 124, or one of the strings "slow", "medium" or "fast". Returns a number indicating the current baseline restoration setting.

Gain and Pole Zero

mca_par("gain" [, value])
With the optional argument, sets the gain to value, which can be from 3.1 to 562.83. Returns the current gain value as derived from the coarse- and fine-gain settings.
mca_par("pole_zero" [, value])
With the optional argument, sets the pole zero to value. The valid range is from 0 to 250. Returns the current pole-zero setting.
mca_par("input_offset" [, value])
With the optional argument, sets the input offset to value, which is in volts. The valid range is -2.050V to 1.95V. Returns the current setting.
mca_par("input_polarity" [, value])

With the optional argument, sets the input polarity according to value, which can be a number or a string, as below:

-1 or "negative"
1 or "positive"

Returns one of the above strings indicating the current setting.

mca_par("detector_reset" [, value])
Sets the detector-reset lockout period to the setting closest to value, in milliseconds. Possible values are 0, 0.102, 0.205, 0.410, 0.819, 1.64, 3.28, 6.55 and 13.11. Returns the current value.

Power

mca_par("power" [, value])
With the optional argument the string "on" or a nonzero value, enables the on-board power supplies. Otherwise disables the power supplies. Returns 0 or 1 to indicate whether the on-board power supplies are disabled enabled.
mca_par("TEC" [, value])
With the optional argument, sets the thermo-electric cooler to value, which is in degrees Kelvin. The allowed range is from 180.0K to 299.9K. Returns the current setting.
mca_par("high_voltage" [, value])
With the optional argument, sets the high-voltage supply to value in volts, or disables the high-voltage supply if value is the string "off". Returns the current setting or the string "off" if the high-voltage is disabled.
mca_par("preamp_voltage" [, value])
With the optional argument, sets the preamplifier voltage to value, which must be 5 or 8.5. Returns 5 or 8.5, indicating the current preamplifier voltage setting.

Miscellaneous

mca_par("analog_out" [, value])

With the optional argument, sets the analog output according to value, a number from 0 to 4, as follows:

0 Fast channel
1 Shaped Pulse
2 Decimated Input
3 Test
4 Off

Returns one of the above strings indicating the current setting.

mca_par("output_offset" [, value])
With the optional argument, sets the output offset to value with units in millivolts. The valid range is from -500mV to 492mV. Returns the current setting.
mca_par("aux_output" [, value])

Sets the auxiliary output according to value, which can be a number or a string, as below:

0 or "icr"
1 or "pileup"
2 or "hold"
3 or "oneshot"
4 or "det_res"
5 or "mca_en"
6 or "trigger"
7 or "sca8"

Returns one of the above strings indicating the current setting.

mca_par("audio" [, value])

With the optional argument, sets the audio output according to value, which can be a number or a string, as below:

0 or "off"
2 or "low"
1 or "medium"
3 or "high"

Returns one of the above strings.

Other

mca_par("buffer" [, value])
With the optional argument, sets the active buffer to A or B according to whether value is 0 or 1, respectively. The mca_get() command reads from the active buffer. The "status" option to mca_par() displays the status for the active buffer. The clear commands clear the active buffer. When the MCA is started, the configuration is set to acquire to the active buffer. Returns 0 or 1 to indicate whether buffer A or B is active.
mca_par("elapsed_counts"|"slow_counts")
Returns the slow counts value for the current acquisition.
mca_par("fast_counts")
Returns the fast counts value for the current acquisition.
mca_par("elapsed_time")
Returns the elapsed time of the current acquisition.
mca_par("status")
Reads and displays the current PX4 status buffer information.
mca_par("pars")
Displays the current PX4 software configuration.
mca_par("get_config")
Reads the hardware configuration buffer from the PX4. The parameters can be displayed with the "pars" option above.
mca_par("set_config")
Writes the PX4 hardware configuration buffer with the current software settings.
mca_par("read_config", filename)
Reads the PX4 configuration from filename, which must conform the Amptek PX4 configuration file format. This command does not update the hardware configuration. The hardware settings corresponding to the file configuration can be displayed with the "pars" option above. The settings can be transferred to the PX4 using the "set_config" option above.
mca_par("save_config", filename)
Saves the current configuration to filename using the Amptek PX4 configuration file format.
mca_par("preset_time" [, value])
With the optional argument, sets the preset count time to value and sets time-preset mode. When using the "run" mca_par() option, the MCA will run for the specified number of seconds. Set the preset time to zero to run indefinitely. Returns the current preset count time.
mca_par("preset_counts" [, value])
With the optional argument, sets the preset count to value and sets count-preset mode. When using the "run" mca_par() option, the MCA will run until the accumulated number of counts in the region-of-interest (set with "roi" below) is reached. Set the preset counts to zero to run indefinitely. Returns the current preset count value.
mca_par("roi" [, roi_begin, roi_end])
With the optional arguments, sets the region-of-interest to channels from roi_begin to roi_end. When counting to in preset-counts mode, counting continues until the total counts in the region of interest reaches the preset count value. The region-of-interest values are written to SCA 8 when counting in preset-count mode is started. Returns the number of channels in the region of interest.

SEE ALSO

amptek.com mca