Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
These macros allow you to read out the Stanford Research SR830 Lockin-Amplifier via GPIB interface and to define its two channels as "software counters". SETUP Configure SPEC for GPIB: Make sure that the GPIB-ENET software is correctly installed. Run the diagnostics program "/usr/bin/ibtsta". In "config", press "c" to go to the "Interface Configuration" menu. Under GPIB enter "y" for YES. Under TYPE press "+" and choose "Nat Inst GPIB-ENET (shared)" for the menu. DEVICE should be "gpib0". After saving with "w" and exiting with "Control-C" you shoud se the message "Using National Instruments GPIB." Define a new counter in "config". Type "c" until you to get to the "Scaler (Counter) Configuration" menu. Increment "Number of counters" by 1 and rename "counter n" by "adc1". "Device" should be NONE, "Unit" and "Chan" 0, "Ase As" should be "counter" and "Scale factor" 1. After exiting the "config" editor type "setup" and include into your setup file a line like the following: lockin_define gpib=8 channel=1 adc1The factory preset GPIB address is 8. You can chage it via the SETUP button on the front panel. INTERNALS The following GPIB command is used: | ||||||
Macros:
Usage: lockin_define gpib=n channel=1|2 counter associates a SPEC counter mnemonic to one of the channels channels A or B of the ADC module. Use this macro in your "setup" file. lockin_delcnt Usage: lockin_delcnt clear lockin parameter structure lockin_info Usage: lockin_info print status info lockin_undefine Usage: lockin_undefine undo "lockin_define" lockin_off Usage: lockin_off disable all Lock-in amplifier software counters lockin_on Usage: lockin_on undo "lockin_off" - re-enable all Lock-in amplifier software counters | ||||||
Internal Macros: | ||||||
Usage: lockin_check counter Hook macro for "reconfig" checks whether device is accessible on the GPIB bus and clears the error status, if necessary. lockin_getpangles Usage: lockin_getpangles hook macro for "user_getpangles" lockin_checkall Usage: lockin_checkall hook macro for "user_checkall" lockin_precount Usage: lockin_precount counter hook macro for "user_precount" , called implicitly when you use "ct", "count" or a scan macro. Initialize Reads the lock-in amplifier output via GPIB. lockin_getcounts Usage: lockin_getcounts counter hook macro for "user_getcounts" , called implicitly when you use "ct", "count" or a scan macro. Reads the lock-in amplifier output via GPIB. The result is stored in the global array S in S[counter]. lockin_read Usage: lockin_read (gpib_address,channel) Reads the lock-in amplifier output via GPIB and returns the result. Channel can be "A" or "B". Which parameter is read (X,Y,R,theta) is detemined by the front panel settings. The result can be a voltage in units of V, a current in units of A or a phase in deg. If an error occurrs NaN (not a number) is returned. NaN Usage: NaN %MDESC% "Not a Number" - placeholder for invalid numeric value isNaN Usage: isNaN (x) check whether x is an ivalid numeric value, "Not a Number" lockin_talk Usage: lockin_talk lockin_scan_on Usage: lockin_scan_on lockin_scan_off Usage: lockin_scan_off lockin_scan_setup Usage: lockin_scan_setup lockin_getparam Usage: lockin_getparam lockin_scan Usage: lockin_scan lockin_scan_start Usage: lockin_scan_start lockin_scan_read Usage: lockin_scan_read | ||||||
|