Suppose you need to read-out three counters (c1, c2, c3) which are gated by a timer (t1). In this case, the following symbol definitions are to be included in before_type_scan.gra:
scan_c1 = c1
scan_descr_c1 = “Ioni0”
scan_c2 = c2
scan_c3 = c3
scan_timer = t1
If ONLINE finds these symbols, it creates the SCANS scan_name_c1, scan_name_c2 and scan_name_c3, unless they have already been created by the user. The string scan_name is replaced by the scan name. Up to 20 counters can be used in such a way.
By default, fast scans involve counter readings only. But is possible to include other devices. The best way to do it, is to define dummy counters, e.g.:
scan_c4 = dummy_f1After such an assignment of scan_c4, ONLINE allocates space as for a real counter but performs no measurement with the F1 (in this case). The display of the data and the output is done as for every other counter. The symbol f1name is used in the during file:
f1name = scan_name”_f1”
f1name(sindex) = whatever
Up to eight counters are displayed during the measurment. The user may select a display subset by assigning the symbol scan_display_set, e.g.:
scan_display_set = (1, 4, 5)In this example scan_c1, scan_c4 and scan_c5 are monitored. The symbol scan_display_set affects only the display, not the counter reading or the disk I/O.
VME: Heidenhain encoder readings may also be performed during fast scans, e.g.:
scan_hhe1 = hhe1The symbol assignment above directs ONLINE to create scan_name_hhe
The file during_type_scan.gra is called for every stop, although it may be empty. But this way the user has the opportunity to interact, like performing an additional move, before the counters are read out.
After the during_type_scan.gra has been executed, the counters c1, c2 and c3 are reset and the timer t1 is started using the symbol sample_time (from the menu). The sample time is not limited by the hardware. If necessary, the timer is started repeatedly. ONLINE waits for the timer and reads the counters. The values are stored in the SCANs and the current indices of the SCANs are updated. The x-values of the SCANs are set to position. In addition scan_name is filled with the contents of the first counter.
The counter offsets are stored in the symbols scan_offset_c1, etc. They have to be determined before the measurement starts. The values correspond to a sample time of 1 second. The offsets are automatically subtracted from the counter contents.
The symbol scan_min_c1 contains the minimum count rate for
scan_c1 (I). If I
falls below this value the
user is prompted whether the scan should continue.
During fast scans ONLINE behaves as if the user supplied the /display qualifier on the command line, unless /nodisplay is specified. Before the display command is executed, ONLINE does an auto/y.
Fast scans can turn into very fast scans, if the autoscale-display sequence is not performed for every stop, e.g.:
ONLINE>
scan/update=5/energy
This command tells ONLINE that the graphic and alphanumeric screen
has to be updated after every fifth stop. Mind that the qualifier
/time_check directs ONLINE to display where the
time is spent (section 8.1.1).
Mind that the alternative choice to make things faster is the wft_command, e.g.: wft_command = “auto/y;display". The symbol wft_command is executed whenever ONLINE waits for a timer. If your sample time is sufficiently large, there will be no overhead caused by the autoscale-display sequence. The best place for defining the wft_command is the before_type_scan.gra file. Don't forget to supply the /nodisplay qualifier on the command line, if you are using the wft_command. After equipping the experiments with Linux PCs, the wft_command feature is no longer recommended.
The SCANs scan_name_c1, ... are NOT automatically written to disk. This can be done by the following command in after_type_scan.gra:
if yesno(" Write to disk ") write/fio/scan scan_name endif
Note that the qualifier /scan writes all SCAN GQEs that match scan_name to the disk file.
An example for a fast scan can be found in section 15.4.