Another MCA example

#!/bin/perl

use Spectra; 

$bank = 0; 
$ret = Clear_mca( "mca1", $bank); 
$ret = Start_mca( "mca1", $bank); 
#
# start-and-wait-for-timer, 1 second
#
$ret = Sawft( "t1", 1); 
$ret = Stop_mca( "mca1", $bank); 
$ret = Read_mca( "mca1", $bank, "testname", 8192); 

Autoscale(); 
display();

If it is not necessary to issue the start and stop commands explicitly, the above code can be written in a compact way:

#!/bin/perl

use Spectra; 

$ret = Run_adc( "mca1", "t1", "testname", 8192, 5);

Autoscale(); 
display();