DECLARE SUB dac488savev (ctrl%, v!) DECLARE SUB dac488savev (ctrl%, v!) 'Open the parameter file REM $INCLUDE: 'param.inc' SUB hp3457cf (cf%, freq!) freq! = 64! * 2! END SUB SUB hp3457cmon (c%) '**************************************************************************** 'This routine displays the voltage applied to a specified channel of the 'HP3457 DVM on the front panel. Voltages can be monitored while the 'program is running. ' ' 'Zachary Wolf '5/23/94 '**************************************************************************** END SUB SUB hp3457cnvtrig (c%, n%, v!()) '**************************************************************************** 'This subroutine calls the simulator to simulate a coil voltage. ' 'Input: ' c%, the DVM channel to read ' n%, the number of voltage samples ' 'Output: ' v!(0 to n%-1), the measured voltages ' 'Zachary Wolf '5/21/94 '**************************************************************************** 'Define the parameters pi! = 3.141593 phi! = pi! / 4! ns% = nsampleP% 'Message PRINT "HP3457CNVTRIG generating test data" 'Decide whether to return coil or tach voltage samples GOTO coil1 'IF c% = 1 THEN GOTO coil1 'IF c% = 3 THEN GOTO tach1 'Generate the samples FOR i% = 0 TO n% - 1 v!(i%) = 0! v!(i%) = v!(i%) + .005 v!(i%) = v!(i%) + .001 * COS(1! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + 10! * COS(2! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .003 * COS(3! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .004 * COS(4! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .005 * COS(5! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .006 * COS(6! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .007 * COS(7! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .008 * COS(8! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .009 * COS(9! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .01 * COS(10! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .011 * COS(11! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .012 * COS(12! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .013 * COS(13! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .014 * COS(14! * 2! * pi! * i% / ns% + phi!) v!(i%) = v!(i%) + .015 * COS(15! * 2! * pi! * i% / ns% + phi!) NEXT i% GOTO done 'Generate the tachometer voltage samples tach: FOR i% = 0 TO n% - 1 ' v!(i%) = 1! v!(i%) = 1! v!(i%) = v!(i%) + .01 * COS(1! * 2! * pi! * i% / ns% - 90! * pi / 180!) NEXT i% GOTO done 'Another coil voltage generator coil1: 'v = N vth Br L ' = N R omega G R sin(2 theta) L ' = N GL R^2 2 pi f sin(2 theta) gl! = 1! f0! = 2! FOR i% = 0 TO n% - 1 f! = f0! * (1! + .01 * SIN(2! * pi! * i% / ns%)) v!(i%) = nturnscoilP% * gl! * rcoilP! ^ 2 * 2 * pi! * f! * SIN(2! * 2! * pi! * i% / ns%) NEXT i% GOTO done 'Another tach voltage generator tach1: FOR i% = 0 TO n% - 1 v!(i%) = 1! * (1! + .01 * SIN(2! * pi! * i% / ns%)) NEXT i% GOTO done done: END SUB SUB hp3457ctc (c%, tc!) tc! = 50! END SUB SUB hp3457cv (c%, v!) '**************************************************************************** 'This is a dummy routine for testing. ' 'Input: c%, the DVM channel to read ' 'Output: v!, the measured voltage ' 'Zachary Wolf '5/21/94 '**************************************************************************** 'Return the DAC voltage 'CALL dac488savev(0, v!) v! = 1! END SUB SUB hp3457init '**************************************************************************** 'This is a dummy routine for testing. ' 'Zachary Wolf '5/21/94 '**************************************************************************** 'Message PRINT PRINT "Resetting the HP3457 routine" END SUB SUB hp3457preset END SUB SUB hp3457readtc (twin!) END SUB SUB hp3457readv (vmag!) END SUB SUB hp3457setuptc (mxhpchan%) END SUB SUB hp3457setupv (mxhpchan%) END SUB