12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Counting Macrosct [time]count [time]show_cntsuct [time]# Count, then show_cnts# Count for time# Count, then display results# Updated countingWhen time is positive, counting is to seconds. When time is negative, counting is tomonitor counts. If the counting macros are invoked without an argument, the counttime used is that contained in the global variable COUNT .Counting in <strong>spec</strong> combines timing generators and scalers. Three scaler channels arenormally used in the standard macros. The first channel takes an accurate clockinput (normally at 1 KHz), the second takes the monitor input, and the third takesthe detector.The scaler channels identifying the various inputs are determined by the values ofthe global constants, sec , mon and det . Their default values are 0, 1 and 2, re<strong>spec</strong>tively,matching the recommended hardware cabling. If you do not connect yourcounting sources to the default scaler channels, you must explicitly assign new valuesto sec , mon and det for the standard counting macros to work properly.The additional global variables MON and DET are then set to the channels that are tobe treated as the monitor and detector for particular scans, normally mon and det .If, while doing a line-up scan of a motor on which the monitor is mounted, you wouldwant the monitor counts to be plotted as a function of the motor position, enterDET=mon before doing the scan. Do not forget to reassign DET=det at the end of thescan.The global variable COUNT is set to a default count time (normally 1 second). If themacro ct is invoked without arguments, counting will last for the duration given byCOUNT .# A user calls "ct" to count for some interval and display resultsdef ct ’{rdef cleanup \’undef cleanuponp; show_cnts; offp\’waitmovecount_em $*waitcountundef cleanuponp; show_cnts; offp}’140 STANDARD MACRO GUIDE INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!