#define SCRIPTNAME "FocLogCall" #define SCRIPTMAJORVERSION 0 #define SCRIPTMINORVERSION 1 #define BATCH_MODE 1 #define INTERACTIVE_MODE 0 #include "tii_foclog.spt" /***************************************************************************** * * foclogcall.txt 0.1 2004:03:09 Smythies * Change the name for inclusion in the FocLog.spt help files. * Eliminate forcing MPC verbose to off since FocLog can now eat some * lines in the data stream. * You MUST have the above types of lines so that the standard tii * includes will know where to put the data. in this case the data will be * at: $drive\result\FocLogCall\XXXX\*.* where XXXX starts from wherever * you left off last time and incrments for each call. * * MantaExample.spt 0.1 2003:12:16 Smythies * Make a simple example that can be used by the Manta Project as a * building block for whatever they want to do. * The basic tool here is the tii_FocLogbatch.spt include file that * allows a non-interactive (batch) run of FocLog. Troy Tyler has done * the work on FocLog. * * tii_foclogbatch(int batchmode, long log_percent, long log_offset) * * If batchmode = 0 then interactive, otherwise batch * * I am not sure at the time of writting this how the catch terminate * functions, if needed, are handled. * * This example is NOT written for TH2 1.04 head firmware in terms of * managing log sample 19. * * The stupid MPC tells us the laser is being turned off at a stupid time * This script turns off MPC verbose. * *****************************************************************************/ main(){ /* set up the logger */ if( !TalkToHead()) FAIL( "FocLogCall - TalkToHeadd()", EXE_ACTION_RETF); transmit("eng"); waitfor("Command Success", 60); transmit("log sample 0 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 1 enable"); waitfor("*** Command Success ***", 20); transmit("log sample 2 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 3 enable"); waitfor("*** Command Success ***", 20); transmit("log sample 4 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 5 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 6 enable"); waitfor("*** Command Success ***", 20); transmit("log sample 7 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 8 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 9 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 10 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 11 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 12 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 13 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 14 enable"); waitfor("*** Command Success ***", 20); transmit("log sample 15 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 16 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 17 disable"); waitfor("*** Command Success ***", 20); transmit("log sample 18 enable"); waitfor("*** Command Success ***", 20); transmit("log trigger 4"); waitfor("*** Command Success ***", 20); while(1){ /* forever */ transmit("log mode sample"); waitfor("*** Command Success ***", 20); if( !TalkToMPE()) FAIL( "FocLogcall - TalkToMPE()", EXE_ACTION_RETF) transmit("plot 1 200"); waitfor("*** Command Complete", 300); tii_foclog(BATCH_MODE, 27, 0); // run foclog in batch mode, 27 percent of log, no offset } /* endwhile */ } /* End procedure */