home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / microcrn / issue_37.arc / PCDADS-2.FIG < prev    next >
Text File  |  2000-01-06  |  3KB  |  56 lines

  1. 100 REM PC-DADS Ver. 2.0 for two floppy drive system with NO hard disk
  2. 101 REM PCDADS2C.BAS 1/7/87 Russ Eberhart  4-channel version
  3. 110 CLS:KEY OFF:ST=0:SNT%=0
  4. 120 PRINT:PRINT "PC Data Acquisition, Display and Storage (PC-DADS) v. 2.0"
  5. 130 PRINT:PRINT "Copyright 1986, JHU Applied Physics Laboratory":PRINT
  6. 140 PRINT:PRINT "NOTE: This program version requires RAM disk on drive C"
  7. 150 PRINT       "      Data are recorded on diskette in drive B:"
  8. 160 PRINT:PRINT
  9. 170 PRINT "Connect first calibration voltage to all input channels, then press any key..."
  10. 180 IF INKEY$="" THEN 180
  11. 190 R1(1)=1/STICK(0):R1(2)=1/STICK(1):R1(3)=1/STICK(2):R1(4)=1/STICK(3)
  12. 200 PRINT:PRINT "First set of calibration readings taken"
  13. 210 INPUT "Enter value in volts of first calibration voltage";V1:PRINT
  14. 220 PRINT "Connect second calibration voltage to all input channels, then press any key..."
  15. 230 IF INKEY$="" THEN 230
  16. 240 R2(1)=1/STICK(0):R2(2)=1/STICK(1):R2(3)=1/STICK(2):R2(4)=1/STICK(3)
  17. 250 PRINT:PRINT "Second set of calibration readings taken"
  18. 260 INPUT "Enter value in volts of second calibration voltage";V2
  19. 270 DV=V2-V1
  20. 280 FOR I=1 TO 4:F(I)=(R2(I)-R1(I))/DV:OF(I)=R2(I)-(V2*F(I))
  21. 300 NEXT
  22. 302 FF=65535!*.72
  23. 304 FAC1%=FF*F(1):FAC2%=FF*F(2):FAC3%=FF*F(3):FAC4%=FF*F(4)
  24. 306 OFF1%=FF*OF(1):OFF2%=FF*OF(2):OFF3%=FF*OF(3):OFF4%=FF*OF(4)
  25. 310 PRINT:PRINT "PC-PADS System is now calibrated"
  26. 320 PRINT:PRINT "                    *****     MAIN MENU     *****"
  27. 330 PRINT:PRINT "     1. Four-channel data display, single screen at a time"
  28. 340 PRINT:PRINT "     2. Continuous four-channel data display"
  29. 350 PRINT:PRINT "     3. Acquire and display one data set, then save to disk."
  30. 370 PRINT:PRINT "     4. Acquire and display data sets continually, save each"
  31. 380 PRINT       "        to disk automatically"
  32. 390 PRINT:PRINT "     5. Execute SHELL command to operating system; type EXIT"
  33. 400 PRINT       "        to return to PC-DADS Main Menu"
  34. 410 PRINT
  35. 420 INPUT "Enter choice:";MC
  36. 430 ON MC GOTO 450, 460, 600, 610, 670
  37. 440 GOTO 320
  38. 450 ST=1:SNT%=1
  39. 460 PRINT "Channels one and two will appear in the lower half of the screen,"
  40. 470 PRINT "Channels three and four will appear in the upper half."
  41. 480 PRINT "A beep will signal that a trace is complete; if you are in single"
  42. 490 PRINT "trace mode, you may then press any key to start another trace."
  43. 495 PRINT "Press ESCAPE to return to the Main Menu."
  44. 500 PRINT "Press CRTL-BRK to exit program."
  45. 510 PRINT:PRINT "Press any key to start data display..."
  46. 535 IF INKEY$="" THEN 535
  47. 540 CALL SCNDRAW (FAC1%,FAC2%,FAC3%,FAC4%,OFF1%,OFF2%,OFF3%,OFF4%,SNT%)
  48. 570 SNT%=0:CLS:GOTO 320
  49. 600 SNT%=1
  50. 610 CLS:PRINT"Press any key to start taking data..."
  51. 620 IF INKEY$="" THEN 620 ELSE 630
  52. 630 SNT%=SNT%+2
  53. 640 GOTO 540
  54. 670 CLS:SHELL
  55. 680 CLS:GOTO 320
  56.