program test real*4 temp(4) character device*32, line*80, cmd*16, par*80, response*80 integer i,j,k call tecs_init(6, ' ') print * print *,'Tecs Client' print *,'-----------' print * print *,' show temperature and device' print *,'set set temperature' print *,'send direct command to LSC340' print *,'device set cryo device' print *,' show parameter' print *,' set parameter' print *,'kill close TecsServer and exit' print *,'exit exit, but do not close TecsServer' print *,'help show list of parameters and cryo devices' print * 1 print '(x,a,$)','tecs> ' read(*,'(a)',end=9) line cmd=' ' k=0 do j=1,len(line) if (line(j:j) .gt. ' ') then k=k+1 cmd(k:k)=line(j:j) if (cmd(k:k) .ge. 'A' .and. cmd(k:k) .le. 'Z') then ! set to lowercase cmd(k:k)=char(ichar(cmd(k:k))+32) endif elseif (k .gt. 0) then ! end of command goto 2 endif enddo if (k .eq. 0) then ! empty line call tecs_get_temp(6, temp) call tecs_get_par(6, 'device', device) print '(x,3(a,f8.3),2a)','tempX=', temp(3),', tempP=',temp(2) 1 ,', set=',temp(1), ', device=',device goto 1 endif print *,'command too long' goto 1 2 par=' ' do i=j,len(line) if (line(i:i) .gt. ' ') then par=line(i:) goto 3 endif enddo ! simple query if (cmd .eq. 'kill') then call tecs_quit(6) goto 9 elseif (cmd .eq. 'exit') then goto 9 elseif (cmd .eq. 'help') then print * print *,'Writeable parameters:' print * print *,'tempC temperature set-point' print *,'device temperature device' print *,'controlMode control on: 0: heat exchanger, ' 1 ,'1: sample, 2: second loop' print * print *,'Read only parameters:' print * print *,'tempX heat exchanger temperature' print *,'tempP sample temperature' print *,'tempH set-point on regulation' print *,'tLimit temperature limit' print *,'htr heater current percentage' print *,'power heater max. power' print *,'resist heater resistance' print * print *,'Temperature devices:' print * print *,'ill1, ill2, ill3 (cryofurnace), ill4 (focus-cryo), ' 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 *,'rdrn (LTF dilution, 20kOhm), rdrn2 (2kOhm)' print * else call tecs_get_par(6, cmd, response) print '(7x,3a)',cmd(1:k),'=',response endif goto 1 3 if (cmd .eq. 'send') then call tecs_send_cmd(6, par, response) print '(7x,2a)','response: ',response else call tecs_set_par(6, cmd, par) print '(7x,3a)',cmd(1:k),':=',par endif goto 1 9 end