Computer Operations
Computer Interface Commands and Operation
4
4-59
' HYDRALOG.BAS Hydra Program to scan VDC, VAC, OHMS, FREQ or TEMP
' - initializes RS-232 Communications between PC and Hydra
' - configures a number of Hydra channels for one type
' of measurement (e.g., VDC, VAC, temperature, etc.)
' - scan channels 3 times, and display and record measurement
' data in file "TESTDATA.PRN"
' NOTE: Hydra must be set up for RS-232 communications, 9600 baud,
' no parity, 8 bit data
KEY OFF ' Switch keyboard event trapping off
' NOTE: Error message checking is not done here -- QBasic will notify the
' user and exit if there is a problem
' Open Communications port with 9600 baud, no parity, 8 it data,
' ignore Clear to Send, Data Set Ready, and Carrier Detect.
OPEN "COM2:9600,N,8,,cs0,ds0,cd0" FOR RANDOM AS #1
OPEN "testdata.PRN" FOR OUTPUT AS #2 ' Open data file
PRINT #1, "ECHO 0" ' Turn off command echo on Hydra
'-----
' Find out the number of channels the user wants to configure
' NOTE: Channel 0 will not be used
NumChannels = 0
WHILE (NumChannels < 1) OR (NumChannels > 20)
INPUT "Enter the number of channels to be scanned (1-20): ", NumChannels
WEND
'Turn unused channels off
PRINT "(Wait...)"
FOR Index = (NumCh 1) TO 20
PRINT #1, "FUNC " + STR$(Index) + ",OFF"
GOSUB CheckResponse
NEXT Index
op52_1f.eps
Figure 4-5. Sample Program (QBASIC) (1 of 3)
Содержание 2635A
Страница 8: ...2635A Users Manual vi...
Страница 26: ...2635A Users Manual xxiv...
Страница 29: ...Preparation for Use Introduction 1 1 3...
Страница 50: ...2635A Users Manual 1 24...
Страница 53: ...Front Panel Operations Summary of Front Panel Operations 2 2 3...
Страница 88: ...2635A Users Manual 2 38...
Страница 180: ...2635A Users Manual 5 10...
Страница 212: ......
Страница 234: ...2635A Users Manual B 4...
Страница 250: ...2635A Users Manual D 8...
Страница 251: ...E 1 Appendix E 8 Bit Binary Coded Decimal Table...
Страница 264: ...Hydra Memory Card Record DATA FILES SET UP FILES DATxx Application Note SETxx Application Note...
Страница 268: ...2635A Users Manual 4...