Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
Wavelength Dispersive Xray spectrometer macros set | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
set of macros to control the Wavelength Dispersive Xray spectrometer on ID26 beamline and to get control of the WDX crystal position (in keV) as a spec speudo motor. The WDX ratemeter can be associated to a spec pseudo counter, see the wdxsetup macro. WDX sotware controller unit (SCU) is driven through a serial connection (RS232), with high communication speed (up to 115k baud). By default the SCU is set to 9600 baud. SETUP Call first the wdxsetup macro to set the spec serial port as well as the pseudo motor and counter to be used. The pseudo devices (motor and counter) are activated within the call of the wdxon macro and can be set off by calling the wdxoff macro. You can call both wdxsetup and wdxon macros from the spec setup file. EXAMPLE wdx_getcrystal return the current crystal wdx_getslitsize return the slit size in mm | ||||||
Macros:
Usage: wdxsetup <serial device number> [<motor-mnemonic>] [<counter-mnemonic>] set up parameter to control the WDX. spec serial port has to be specified first, then optional parameters can be passed to configure pseudo motor and counter to get a useful control of the spectrometer. Use a direct serial connection by using the workstation serial port instead of the VME serial ports board (IBAM). You will get everything working smoothly. wdxmenu Usage: wdxmenu Main menu to set the WDX up. play with it ... wdxon Usage: wdxon define chained macros for wdx pseudo counter and motor This should be moved in wdx_setup !!! wdxoff Usage: wdxoff undefine chained macros for wdx pseudo counter and motor This should be moved in wdx_unsetup !!! wdx_init Usage: wdx_init Intialize the spectrometer, take a while wdx_testcom Usage: wdx_testcom Test if the serial communication with WDX SCU is ready. wdx_setkev Usage: wdx_setkev <energy-keV> change the energy in position wdx_setwave Usage: wdx_setwave <Ang.> change the wavelength in position wdx_readkev Usage: wdx_readkev print the wdx energy position in keV wdx_setcrystal Usage: wdx_setcrystal [crystal-number (1-6)] change the crystal in position wdx_getcrystal Usage: wdx_getcrystal return the crystal name, positionned behind the window wdx_setdetspc Usage: wdx_setdetspc [0-1] set on/off amplifier of the SPC (sealed proportional counter). wdx_setdetfpc Usage: wdx_setdetfpc [0-1] set on/off amplifier of the FPC (flow proportinal counter). wdx_getdetspc Usage: wdx_getdetspc read state of the SPC (sealed proportinal counter) amplifier. wdx_getdetfpc Usage: wdx_getdetfpc read state of the FPC (flow proportinal counter) amplifier. wdx_getslitpos Usage: wdx_getslitpos return the slit position wdx_getcps Usage: wdx_getcps return the ratemeter count rate wdx_getslitsize Usage: wdx_getslitsize print the slit size wdx_setslitpos Usage: wdx_setslitpos change the slit position wdx_setslitsize Usage: wdx_setslitsize return the slit position wdx_import Usage: wdx_import "spm file" Read the spm file (WDX data format) and plot the spectrum. wdx_export Usage: wdx_export "spm file" Read the spm file (WDX data format) and plot the spectrum, then save the data in a text format file, same prefix and suffix = .txt wdx_exportall Usage: wdx_exportall <directory-path> import and export all the files from the specified directory. | ||||||
Internal Macros: | ||||||
Usage: _wdx_menu [parma] wdx_cleanup Usage: wdx_cleanup macro chained to Ctrl-C to finish properly the communicatin with the SCU. It clears the serial buffer until the last command finishes. A started command cannot be stopped but just finished !! wdx_move Usage: wdx_move wdx_slit_s_move Usage: wdx_slit_s_move wdx_slit_p_move Usage: wdx_slit_p_move wdx_slit_s_getangle Usage: wdx_slit_s_getangle wdx_slit_p_getangle Usage: wdx_slit_p_getangle wdx_getangle Usage: wdx_getangle wdx_getcounts Usage: wdx_getcounts wdx_getconfig Usage: wdx_getconfig get the WDX configuation parameters and store them into the WDX_PAR[] array. _wdx_testcom Usage: _wdx_testcom() test the serial communication wdx_checkenergy Usage: wdx_checkenergy(kev) check energy is in range and then change crystal if necessary _wdx_readkev Usage: _wdx_readkev() return the energy position _wdx_getcrystal Usage: _wdx_getcrystal() get set crystal in position _wdx_gethv Usage: _wdx_gethv() get _wdx_getslitpos Usage: _wdx_getslitpos() return the slit position _wdx_getcps Usage: _wdx_getcps() return the slit position _wdx_getslitsize Usage: _wdx_getslitsize() return the slit position wdx_ackcmd Usage: wdx_ackcmd ("cmdstring") send a command to the spectrometer, with "ACK" status if success. -1 is return if it failed. wdx_datacmd Usage: wdx_datacmd ("cmdstring") send a data command to the spectrometer, and data are return if sucess otherwise -1 _show_wait Usage: _show_wait() draw a bar while action goin on global _WDX_M _wdx_read Usage: _wdx_read ("filename") read an .spm (wdx data format) file and return 1 if it successes otherwise -1 _wdx_write Usage: _wdx_write ("inputfile", "outputfile") write in text format the data previously read with the _wdx_read() function, return 1 if it successes otherwise -1 | ||||||
|