EasyManua.ls Logo

Fluke Hydra Series II - Page 164

Fluke Hydra Series II
268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2635A
Users Manual
4-60
'Configure Hydra Channels
' First, initialize screen and display Hydra identification info
CLS
LOCATE 1, 25: PRINT "Sample Program for Hydra"
PRINT #1, "*IDN?": GOSUB CheckResponse: LINE INPUT #1, Result$
LOCATE 2, 20: PRINT Result$
WHILE (1)
'Print banner line at bottom of screen
LOCATE 25, 1
PRINT "1 = VDC 2 = VAC 3 = OHMS 4 = FREQ 5 = TEMP 6 = Quit";
' Get channel configurations
Func$ = "0"
WHILE (Func$ < "1") OR (Func$ > "6")
LOCATE 23, 1: INPUT " Selection: ", Func$
WEND
' Exit and clean up if choice is "Quit"
IF Func$ = "6" THEN CLOSE 1, 2: CLS : KEY ON: END
' Set up the common channel configuration string (function and range)
SELECT CASE Func$
CASE "1"
Config$ = "VDC, 1"
CASE "2"
Config$ = "VAC, 1"
CASE "3"
Config$ = "OHMS, 1, 2" ' Assuming 2-terminal channel
CASE "4"
Config$ = "FREQ, 1"
CASE "5"
Config$ = "TEMP, K" ' Assuming K thermocouple
END SELECT
'Set up Hydra / Configure channels
LOCATE 23, 1: PRINT "Programming Hydra...";
FOR Index = 1 TO NumChannels
PRINT #1, "FUNC " + STR$(Index) + "," + Config$
GOSUB CheckResponse
NEXT Index
LOCATE 23, 1: PRINT "Measuring " + Config$ + " "
' Scan three times
FOR Index = 1 TO 3
PRINT #1, "*TRG" ' Start a single scan
GOSUB CheckResponse ' Get prompt back from Hydra
PRINT #1, "SCAN_TIME?": GOSUB CheckResponse
LINE INPUT #1, Result$ ' Get scan time stamp
PRINT #2, Result$ ' Save time stamp to data file
FOR ChannelIndex = 1 TO NumChannels ' Get scan data
PRINT #1, "LAST? " + STR$(ChannelIndex) ' Request channel data
GOSUB CheckResponse
INPUT #1, Result$ ' Get channel result
LOCATE ChannelIndex + 2, 25
PRINT "Chan " + STR$(ChannelIndex) + ": ";
PRINT Result$ ' Print results to screen
PRINT #2, Result$ + ","; ' Print results to data
file
NEXT ChannelIndex
PRINT #2, "" ' End of line to data file
NEXT Index
WEND
END
op52_2f.eps
Figure 4-6. Sample Program (QBASIC)(2 of 3)

Table of Contents

Related product manuals