This commit is contained in:
cvs
2000-04-11 11:07:06 +00:00
parent f77ba1cc71
commit e23f19f2f8
7 changed files with 229 additions and 123 deletions

View File

@@ -36,6 +36,8 @@ c Define the dummy arguments
character RESPONSE*(*) !! response from temperature controller
c------------------------------------------------------------------------------
integer iret, l
character startcmd*80
common /tecs_init_com/startcmd
integer*8 conn/0/
save conn ! not needed for initialized variables
@@ -46,8 +48,8 @@ c------------------------------------------------------------------------------
c------------------------------------------------------------------------------
stop 'TECS_TAS: do not call module header'
entry TECS_INIT (ERRLUN)
!! ========================
entry TECS_INIT (ERRLUN, CMD)
!! =============================
if (conn .eq. 0) call tecs_open(conn, errlun)
return
@@ -66,6 +68,8 @@ c------------------------------------------------------------------------------
iret=tecc_wait(conn)
if (iret .lt. 0) goto 9
write(errlun, *) '... done'
iret=tecc_get3(conn, temp(1), temp(3), temp(2)) ! temp(2) and temp(3) are exchanged in MSHOWT
if (iret .lt. 0) goto 9
endif
2 temp(4)=0.0 ! no auxilliary sensor
return
@@ -140,8 +144,11 @@ c Define the dummy arguments
integer*8 conn
integer errlun
c--------------------------------------------------------------
integer lun, port, ios
character startcmd*80/' '/
integer lun, port, ios, i
character startcmd*80
common /tecs_init_com/startcmd
data startcmd/' '/
integer*8 tecc_init
external tecc_init, tecs_err_routine
@@ -149,15 +156,20 @@ c--------------------------------------------------------------
c If MAD_TECS:TECS.INIT exists, read it to get the port number and start command
call ErrSetOutRtn(tecs_err_routine, errlun)
call lib$get_lun (lun)
open (lun, file='mad_tecs:tecs.init', status='old',
port=0
if (startcmd .eq. ' ') then
call lib$get_lun (lun)
open (lun, file='mad_tecs:tecs.init', status='old',
+ readonly, iostat=ios)
if (ios .eq. 0) read (lun, *, iostat=ios) port
if (ios .eq. 0) read (lun, '(a)', iostat=ios) startcmd
close(lun)
call lib$free_lun(lun)
if (ios .ne. 0) port = 9753 ! Otherwise, use default
if (ios .eq. 0) read (lun, '(a)', iostat=ios) startcmd
close(lun)
call lib$free_lun(lun)
endif
i=index(startcmd, '-p ')
if (i .ne. 0) then
read(startcmd(i+2:),*,iostat=ios) port
endif
if (port .eq. 0) port=9753
c--------------------------------------------------------------
conn = tecc_init(startcmd, port)