40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  ATF eLog  Not logged in ELOG logo
Entry  Mon Jun 21 20:46:40 2010, Dmass, Computing, General, Oven interfacing 
    Reply  Tue Jun 22 19:17:27 2010, Dmass, Computing, General, Oven interfacing 
       Reply  Tue Jun 22 21:53:24 2010, Dmass, Computing, General, Oven interfacing 
          Reply  Wed Jun 23 15:59:13 2010, Dmass, Computing, General, Oven interfacing OvenOLMeas.pdf
             Reply  Wed Jun 23 21:53:50 2010, Dmass, Computing, General, Oven interfacing 
                Reply  Thu Jun 24 21:18:49 2010, Dmass, Computing, General, Oven interfacing OvenLoopTesting.pdf
                   Reply  Sun Jun 27 18:02:51 2010, Dmass, Computing, General, Oven interfacing 
Message ID: 826     Entry time: Tue Jun 22 21:53:24 2010     In reply to: 825     Reply to this: 828
Author: Dmass 
Type: Computing 
Category: General 
Subject: Oven interfacing 

edited the code to the following. This will save the data ~ 1x / second (I don't really care about a slight cumalative error in this since it's constant - it'll just be a systematic error in my frequency scaling)

 

global SERPORT
set SERPORT [open "/dev/ttyS0" "w+"]

fconfigure $SERPORT -mode 9600,n,8,1 -handshake none -buffering line

proc run_query { command } {
global SERPORT

puts $SERPORT "$command"
flush $SERPORT
gets $SERPORT line

return $line
}

#@puts [run_query "BEEP?"]

         set filename "/users/dmass/scripts/test.txt"
         set fileId [open $filename "w"]

 for { set i 1 } { $i <= 2000 } { incr i } {
#       puts "[clock format [clock seconds]]\t[run_query "TEC:T?"]"
                puts $fileId [run_query "TEC:T?"]
        after 1000
        }
close $fileId

ELOG V3.1.3-