Fluke Hydra Series II User Manual page 163

Data bucket
Table of Contents

Advertisement

' 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
' 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
PRINT #1, "ECHO 0"
'-----
' 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 = (NumChannels + 1) TO 20
PRINT #1, "FUNC " + STR$(Index) + ",OFF"
GOSUB CheckResponse
NEXT Index
' Switch keyboard event trapping off
' Open data file
' Turn off command echo on Hydra
Figure 4-5. Sample Program (QBASIC) (1 of 3)
Computer Operations
Computer Interface Commands and Operation
4
op52_1f.eps
4-59

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

2635a

Table of Contents