added test client

This commit is contained in:
cvs
2000-04-10 15:38:21 +00:00
parent ceb27b8fe5
commit f77ba1cc71
3 changed files with 238 additions and 0 deletions

40
tecs/test.for Normal file
View File

@@ -0,0 +1,40 @@
program test
real*4 temp(4)
character device*32, cmd*80, response*80
integer i
call tecs_init(6)
print *
print *,'s <temp> set temperature'
print *,'device <device> set cryo device'
print *,'<command> direct command to LSC340'
print *,'"empty line" show temperature and device'
1 read(*,'(a)',end=9) cmd
if (cmd(1:2) .eq. 's') then
read(cmd(3:),*) temp(1)
call tecs_set_temp(6, temp(1))
elseif (cmd(1:2) .eq. 'c') then
call tecs_send_cmd(6, cmd(3:), response)
print *,response
elseif (cmd(1:2) .eq. 'q') then
call tecs_quit(6)
goto 9
elseif (cmd .ne. ' ') then
i=index(cmd,' ')
if (i .gt. 1) then
if (cmd(i+1:) .eq. ' ') then
call tecs_get_par(6, cmd(1:i-1), response)
print *,response
else
call tecs_set_par(6, cmd(1:i-1), cmd(i+1:))
endif
endif
else
call tecs_get_temp(6, temp)
print *,' x ', temp(2),' p ',temp(3),' set ',temp(1)
call tecs_get_par(6, 'device', device)
print *,'device=',device
endif
goto 1
9 end