A Fast Scan Using a Dummy Counter

Simple fast scans use counters and timers only. Dummy counters have been introduced in order to deal with additional signals without leaving the framework of fast scans.

Dummy counters are introduced in the before-file. Table 15.5 shows an example.


Table 15.4: Example: Before_fast_scan.gra with a dummy counter
 
!
! before_fast_scan.gra
!

!
! these symbols are keywords. they select the 
! counters that are to be used during the scan
!
  scan_c1 = c1 
  descr_c1 = "Ioni0"
  scan_c2 = c2 
  scan_c3 = dummy_d1
  scan_c4 = dummy_d2

  d1_name = scan_name"_d1" 
  d2_name = scan_name"_d2" 

!
! display scan_c1, scan_c2, scan_c3 during the scan
!
  scan_display_set = (1, 2, 3)
!
! counter c1 has to have a minimum of 1000 counts per second 
! otherwise the scan is interrupted 
!
  scan_min_c1 = 1000

  scan_timer = t1 

!
! get_offsets() uses scan_timer and scan_ci to 
! measure the offsets 
!
  if !search_symbol( scan_offset_c1) 
    s1 = get_offsets(10) 
  endif

  deactivate scan_name

  end


These are the differences compared to simple fast scans:

 scan_c3 = dummy_d1
scan_c4 = dummy_d2
The string dummy_ makes d1 and d2 dummy counters. That means: Although they do not exist as real devices, they are treated like any other counter as far as space allocation, online display and disk I/O is concerned. The only difference to real counters is that ONLINE does not read them. The corresponding data sets are filled by the user, see below.

 d1_name = scan_name”_d1”
d2_name = scan_name”_d2”
The symbols d1_name and d2_name contain the SCAN name of the GQEs which are allocated for d1 and d2. They are used in the during-file.

This time the during-file contains commands, which fill the SCANs d1_name and d2_name, see table 15.5.


Table 15.5: Example: During_fast_scan.gra with a dummy counter
 
!
! during_fast_scan.gra
!

  do resco(c5)
  s1 = run_adc( mca1, t1, temp_mca, 4096, 5)

  d1_name( sindex) = integral( temp_mca, 1000, 1500)
  d2_name( sindex) = rc(c5)

  deactivate temp_mca.*


The explanations:

 s1 = run_adc(mca1, t1, temp_mca, 4096, 5)
A 13 bit ADC, which is gated by the timer t1, is activated for 5 seconds. The data is histogrammed in MCA1 and read into temp_mca.

 d1_name( sindex) = integral( temp_mca, 1000, 1500)
The SCAN d1_name is filled with an integration of temp_mca between the channels 1000 and 1500. The symbol sindex (scan index) is maintained by ONLINE. It starts at 1 and it is incremented for every call of during_fast_scan.gra.

 do resco(c5)
d2_name( sindex) = rc(c5)
The SCAN d2_name stores the contents of c5, which is fed by a signal that is proportional to the flux. It is assumed that c5 is gated by the same timer as the ADC. This way it is ensured that the ADC and c5 are simultaneously active. Note that the other counters are read after the during-file has been executed.

The after-file is identical to the simple fast scan because the I/O of dummy counters does not differ from real counters.