esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

#%TITLE% OMEGA.MAC
#%NAME% OMEGA 4-probes thermometer
#
#%CATEGORY% Temperature
#
#%DESCRIPTION%
#Read out the first probe temperature.
#%EXAMPLE%
#%DL%
#%DT% ct 
#%DD% Seconds = 1 %BR%
#%DD% Omega = 25.000 (25.000/sec)
#%XDL%
#%SETUP%
#The first probe has to be defined as counter mnemonic %B%omega%B% in SPEC config.%BR%
#A spec known GPIB interface (e.g. IOtech) must be installed in config and the OMEGA connected to it.
#%END%

#%UU% [talk_address] [listen_address]
#%MDESC%
#Set the macros and the variables useful to control the thermometer up.
def omegasetup '
global OM_ADDR
if ($#) {
  OM_ADDR[0]=$1
  OM_ADDR[1]=$2
  } else {
  OM_ADDR[0]=getval("Address to talk to Omega",OM_ADDR[0])
  OM_ADDR[1]=getval("Address to listen to Omega",OM_ADDR[1])
  }
omega_define
'

#%UI%
#%MDESC% Definition of %B%omega%B% as a pseudo counter in Spec.
def omega_define '
{
local str
str = sprintf("omega none none omega_getcounts none none %d %d",                              OM_ADDR[0],OM_ADDR[1])
cpseudosdef str
}'

#%UI%
#%MDESC% Reads in the 1st probe temperature.
def omega_getcounts '
{
local tra
gpib_put($2,"read? 1, C")
tra = gpib_get($3)
S[$1] = substr(tra,6,7)
}'

#%MACROS%
#%IMACROS%
#%DEPENDENCIES% The file %B%omega.mac%B% has to be read in.
#%AUTHOR% Marie-Claire LAGIER - 01.94
#%TOC%