Lima

# Label: Lima

# saving_mode has to be set to AUTO_FRAME
# saving_directory and saving_suffix have to be set to the desired values
# Possible saving_sufix values: .edf, .raw, .cbf

  if( $method =~ /reset/i)
  {
      Util::log( "VC: scan_name $Spectra::SYM{ scan_name}"); 
      Spectra::tng_attrDoubleWrt( "lima", "acq_expo_time", 
                                  $Spectra::SYM{ sample_time});
      Spectra::tng_attrStringWrt( "lima", "saving_prefix", 
                                $Spectra::SYM{ scan_name});
      Spectra::tng_inout("lima", "prepareAcq");
      Spectra::tng_inout("lima", "startAcq");
      return 1;
   }
 
   if( $method =~ /read/i)
   {
     while( !Spectra::tng_attrBoolRd("lima","ready_for_next_acq"))
     {
        Util::log( "VC: waiting for Lima"); 
        Spectra::wait( 0.5);
        if( $Spectra::SYM{ interrupt_scan})
        {
          Util::log( "VC: wait-for-lima aborted");  
          last;
        }

     } 
     Util::log( "Lima ready for next acq ");
     return 1; 
   }