Use sics_config.ini to configure LS370, oxford ITC, oxford Mercury, and oxford labview drivers.
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
# Author: Douglas Clowes
|
||||
# Date: September 2011
|
||||
#
|
||||
# Baud: 9600, Data: 7, Stop: 1, Parity: Odd, Flow: XON/XOFF
|
||||
# Line terminator = CRLF
|
||||
|
||||
if { "[lindex [split [info nameofexecutable] "/"] end]" == "tclsh"} {
|
||||
set catch_status [ catch {
|
||||
puts "TCLSH"
|
||||
@@ -912,7 +915,7 @@ namespace eval ::scobj::[set vendor]_[set device] {
|
||||
handle_exception $catch_status $catch_message "in [ns]::mk_sct_driver"
|
||||
}
|
||||
|
||||
proc add_[set vendor]_[set device] {name IP port {_tol 5.0}} {
|
||||
proc add_[set vendor]_[set device] {name IP port {_tol 5.0} {terminator "\r\n"} } {
|
||||
###puts "Namespace: [ns]"
|
||||
###puts "::vendor $::vendor"
|
||||
###puts "::device $::device"
|
||||
@@ -945,3 +948,13 @@ namespace import ::scobj::[set vendor]_[set device]::*
|
||||
# add_lakeshore_370 "tc371" 127.0.0.1 7371 2.0
|
||||
|
||||
|
||||
if { [ info exists ::config_dict ] && [ dict get $::config_dict ls370_2 enabled ] } {
|
||||
puts "ADD LAKESHORE 370"
|
||||
set IP [dict get $::config_dict ls370_2 ip]
|
||||
set PORT [dict get $::config_dict ls370_2 port]
|
||||
set NAME [dict get $::config_dict ls370_2 name]
|
||||
set TOL [dict get $::config_dict ls370_2 tol]
|
||||
set TERM [dict get $::config_dict ls370_2 terminator]
|
||||
add_lakeshore_370 $NAME $IP $PORT $TOL
|
||||
}
|
||||
|
||||
|
||||
@@ -546,3 +546,12 @@ namespace import ::scobj::itc500::*
|
||||
|
||||
#add_itc500 itc500 137.157.201.213 502 5
|
||||
#add_itc500 itc500 localhost 30509 5
|
||||
if { [ info exists ::config_dict ] && [ dict get $::config_dict mercury_itc500 enabled ] } {
|
||||
puts "ADD MERCURY ITC500 MODE"
|
||||
set IP [dict get $::config_dict mercury_itc500 ip]
|
||||
set PORT [dict get $::config_dict mercury_itc500 port]
|
||||
set NAME [dict get $::config_dict mercury_itc500 name]
|
||||
set TOL [dict get $::config_dict mercury_itc500 tol]
|
||||
set ADDR [dict get $::config_dict mercury_itc500 addr]
|
||||
add_itc500 $NAME $IP $PORT $TOL $ADDR
|
||||
}
|
||||
|
||||
@@ -886,4 +886,12 @@ namespace import ::scobj::[set vendor]_[set device]::*
|
||||
|
||||
# add_[set vendor]_[set device] "tc4" 127.0.0.1 7371 2.0
|
||||
|
||||
if { [ info exists ::config_dict ] && [ dict get $::config_dict mercury_scipi enabled ] } {
|
||||
puts "ADD MERCURY SCIPI MODE"
|
||||
set IP [dict get $::config_dict mercury_scipi ip]
|
||||
set PORT [dict get $::config_dict mercury_scipi port]
|
||||
set NAME [dict get $::config_dict mercury_scipi name]
|
||||
set TOL [dict get $::config_dict mercury_scipi tol]
|
||||
add_oxford_mercury $NAME $IP $PORT 2.0 "\r"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
fileeval $cfPath(environment)/magnetic/sct_oxford_labview.tcl
|
||||
fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl
|
||||
|
||||
# PORT 22
|
||||
|
||||
::scobj::magnetic::mkMagnetic {
|
||||
name "magnetic"
|
||||
IP 137.157.201.91
|
||||
PORT 55001
|
||||
tuning 0
|
||||
interval 10
|
||||
if { [ info exists ::config_dict ] && [ dict get $::config_dict 12tmagnet enabled ] } {
|
||||
set IP [dict get $::config_dict 12tmagnet ip]
|
||||
set PORT [dict get $::config_dict 12tmagnet port]
|
||||
set NAME [dict get $::config_dict 12tmagnet name]
|
||||
puts "MAGNET: add_oxmag $NAME $IP $PORT"
|
||||
add_oxmag $NAME $IP $PORT
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user