40m QIL Cryo_Lab CTN SUS_Lab CAML 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: 825     Entry time: Tue Jun 22 19:17:27 2010     In reply to: 824     Reply to this: 826
Author: Dmass 
Type: Computing 
Category: General 
Subject: Oven interfacing 

I asked Vladimir in passing how he preferred to talk to things via the serial port, and he wrote this. It is now contained in /users/dmass/scripts/serial_test.tcl :

 

#!/usr/bin/env tclsh

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?"]

while { 1 } {

    puts "[clock format [clock seconds]]\t[run_query "TEC:T?"]"
    after 100
    }

ELOG V3.1.3-