New TECS Version Sept. 2001 M.Z.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
real temp
|
||||
character device*32, init*80, line*80, cmd*16, par*80, response*1024
|
||||
character inst*64, host*64, user*1, pcod*1
|
||||
integer i,j,k,iret,l
|
||||
character cmdpar*128
|
||||
character prompt*32/'tecs>'/
|
||||
@@ -12,20 +13,38 @@
|
||||
|
||||
! functions
|
||||
integer tecs_get_par, tecs_quit_server, tecs_set_par, tecs_watch_log
|
||||
integer tecs_get, show_log
|
||||
integer tecs_get, tecs_rights, show_log, instr_host
|
||||
|
||||
call sys_load_env('cho')
|
||||
call sys_getenv('CHOOSER_GDEV', line)
|
||||
if (line .ne. ' ') then
|
||||
call sys_setenv('PGPLOT_DEV', '/'//line)
|
||||
endif
|
||||
|
||||
call sys_getenv('TECS_INIT', init)
|
||||
|
||||
call sys_get_cmdpar(line, l)
|
||||
|
||||
if (l .ne. 0) then
|
||||
if (line(1:l) .eq. 'off' .or. line(1:l) .eq. 'OFF') then
|
||||
call tecs_open(0, ' ', iret)
|
||||
if (iret .lt. 0) goto 91
|
||||
iret=tecs_quit_server()
|
||||
if (iret .lt. 0) goto 91
|
||||
goto 99
|
||||
endif
|
||||
oneCommand=.true.
|
||||
i=instr_host(line, inst, host, user, pcod)
|
||||
else
|
||||
oneCommand=.false.
|
||||
i=0
|
||||
endif
|
||||
|
||||
if (oneCommand .and. line(1:1) .eq. '#') then
|
||||
call tecs_open(0, line, iret)
|
||||
if (i .ne. 0) then
|
||||
call tecs_open(0, '#'//host, iret)
|
||||
oneCommand=.false.
|
||||
prompt='tecs/'//inst(1:i)//'> '
|
||||
promptlen=i+7
|
||||
else if (init .eq. ' ') then
|
||||
call tecs_open(0, line, iret)
|
||||
else
|
||||
@@ -48,8 +67,10 @@
|
||||
print *,'plot <var> chart for temperature and <var>'
|
||||
1 ,' var = P (default), He, Aux'
|
||||
print *,'log <n> show last n lines of logfile'
|
||||
print *,'kill close TecsServer and exit'
|
||||
print *,'exit,quit exit, but do not close TecsServer'
|
||||
print *,'remote set to remote mode'
|
||||
print *,'kill shut down TecsServer'
|
||||
print *,'restart restart TecsServer'
|
||||
print *,'exit,quit exit tecs client'
|
||||
print *,'help show list of parameters and cryo devices'
|
||||
print *
|
||||
|
||||
@@ -93,20 +114,31 @@
|
||||
|
||||
defcmd='status'
|
||||
|
||||
if (cmd(1:1) .eq. '#') then
|
||||
i=instr_host(line, inst, host, user, pcod)
|
||||
if (i .ne. 0) then
|
||||
call tecs_close
|
||||
call tecs_open(0, cmd, iret)
|
||||
call tecs_open(0, '#'//host, iret)
|
||||
if (iret .lt. 0) goto 91
|
||||
prompt='tecs/'//cmd(2:)
|
||||
promptlen=1
|
||||
do i=1,len(prompt)-2
|
||||
if (prompt(i:i) .ne. ' ') promptlen=i
|
||||
enddo
|
||||
promptlen=promptlen+1
|
||||
prompt(promptlen:promptlen)='>'
|
||||
promptlen=promptlen+1
|
||||
prompt='tecs/'//inst(1:i)//'> '
|
||||
promptlen=i+7
|
||||
else if (cmd .eq. 'kill') then
|
||||
iret=tecs_quit_server()
|
||||
iret=tecs_quit_server(1)
|
||||
if (iret .lt. 0) goto 19
|
||||
if (iret .gt. 0) then
|
||||
print *,'tecs server is not running'
|
||||
endif
|
||||
else if (cmd .eq. 'restart') then
|
||||
iret=tecs_quit_server(0)
|
||||
if (iret .lt. 0) goto 19
|
||||
if (iret .gt. 0) then
|
||||
print *,'tecs server is not running'
|
||||
endif
|
||||
else if (cmd .eq. 'remote') then
|
||||
iret=tecs_set_par('remoteMode', '2', 2)
|
||||
if (iret .lt. 0) goto 19
|
||||
elseif (cmd .eq. 'rwacs') then
|
||||
iret=tecs_rights(1)
|
||||
if (iret .lt. 0) goto 19
|
||||
elseif (cmd .eq. 'exit' .or. cmd .eq. 'quit') then
|
||||
goto 99
|
||||
elseif (cmd .eq. 'status') then
|
||||
@@ -116,7 +148,7 @@
|
||||
l=0
|
||||
goto 11
|
||||
elseif (cmd .eq. 'plot') then
|
||||
call tecs_plot('Tm Ts Tr P', 1)
|
||||
call tecs_plot(' ')
|
||||
elseif (cmd .eq. 'help') then
|
||||
print *
|
||||
print *,'Writeable parameters:'
|
||||
@@ -131,18 +163,18 @@
|
||||
print *,'deriv PID derivation term'
|
||||
print *,'maxShift maximum (set-tempH) for controlMode=2'
|
||||
print *,'int2 integration time (sec) for controlMode=2'
|
||||
print *,'remoteMode 1: local, 2: remote'
|
||||
print *
|
||||
print *,'Read only parameters:'
|
||||
print *
|
||||
print *,'Tm main temperature'
|
||||
print *,'Ts sample temperature'
|
||||
print *,'setH set-point on regulation'
|
||||
print *,'Tr set-point on regulation'
|
||||
print *,'tLimit temperature limit'
|
||||
print *,'helium helium level'
|
||||
print *,'htr heater current percentage'
|
||||
print *,'resist heater resistance'
|
||||
print *,'logfile name of the logfile'
|
||||
print *,'remoteMode 1: local, 2: remote '
|
||||
1 ,'(switch on with device command)'
|
||||
print *
|
||||
print *,'Ta,Tb,Tc,Td values of channels A,B,C,D'
|
||||
print *
|
||||
@@ -152,7 +184,7 @@
|
||||
1 ,'ill5 (maxi)'
|
||||
print *,'cti1, cti2, cti3, cti4, cti5 (maxi), cti6 (focus), apd'
|
||||
print *,'ccr4k (4K closed cycle), hef4c (TriCS 4circle cryo)'
|
||||
print *,'sup4t (supra.magnet 4T)'
|
||||
print *,'sup4t (supra.magnet 4T), ft (tantalum furnace)'
|
||||
print *,'rdr11, rdr12 (LTF dilution 1 & 2, 20kOhm)'
|
||||
print *
|
||||
elseif (cmd .eq. 'log') then
|
||||
@@ -184,7 +216,9 @@
|
||||
endif
|
||||
logarg=' '
|
||||
elseif (cmd .eq. 'plot') then
|
||||
call tecs_plot('Tm Ts Tr '//par, 1)
|
||||
call str_lowcase(par, par)
|
||||
call str_upcase(par(1:1), par(1:1))
|
||||
call tecs_plot(par)
|
||||
elseif (cmd .eq. 'watch') then
|
||||
iret=tecs_watch_log(par)
|
||||
if (iret .lt. 0) goto 19
|
||||
|
||||
Reference in New Issue
Block a user