beautypg.com

Reading hll status, Tempscan/1100, Reading hll status …… c-3 – Measurement Computing TempScan/1100 User Manual

Page 273

background image

TempScan / MultiScan, Appendix C

879696

Program Examples in Quick Basic C-3

Reading HLL Status

TempScan/1100

Example 15a. HLL32.BAS Program

(1)

…… 15-CLS : PRINT “The TempScan/1100 is resetting...”

…… 15-PRINT #1, “OUTPUT 07;*RX”

(3)

…… 15-SLEEP 4

(4)

…… 15-WHILE (S% AND 4) = 0

…… 15-PRINT #1, “SPOLL 07"
…… 15-INPUT #2, S%

(7)

…… 15-WEND

(8)

…… 15-PRINT #1, “OUTPUT 07;C1-32,3X”

(9)

…… 15-PRINT #1, “OUTPUT07;Y1,0,0X”

(10)

…… 15-PRINT #1, “OUTPUT07;T1,1,0,0X"

(11)

…… 15-PRINT “The TempScan/1100 is collecting HLL data for all 32 channels”

…… 15-PRINT “Hit a key to start or stop retrieving HLL data...”

(13)

…… 15-WHILE INKEY$ = “”: WEND

(14)

…… 15-WHILE INKEY$ = “”

…… 15-PRINT #1, “OUTPUT 07;U4X”
…… 15-PRINT #1, “ENTER 07"
…… 15-LINE INPUT #2, U$

(18)

…… 15- …… 15-FOR i = 1 TO 32

…… 15- …… 15- …… 15-PRINT “High, Low and Last readings of Channel”; i
…… 15- …… 15- …… 15-PRINT MID$(U$, (i * 66) - 65, 66)
…… 15- …… 15-NEXT i

(22)

…… 15-WEND

This program is

HLL32.BAS

in the

\EXAMPLES\

subdirectory. It will configure 32 channels, collect the

High/Low/Last (HLL) Registers data, and post it on the screen.

Lines 1- 3: Although not necessary, it is good practice to reset the TempScan/1100 at the start of your

application by sending the Reset Power-On (

*R

) command. Wait few seconds.

Lines 4-7: To be certain that the reset was successful and the device is ready, Serial Poll the device

until the proper status is returned.

Line 8: The Configure Channels (

C

) command will be used to configure a range of channels from 1 to

32 as Type T thermocouples.

Lines 9-10: Program for one Pre-Trigger scan via the Set Counts (

Y

) command. Then program the

Trigger (trigger start event) and Stop (trigger stop event) via the Set Trigger Configuration (

T

)

command to arm the acquisition.

Lines 11-13: The next three lines tell you to hit a key to start the acquisition. The program will not

proceed until a key is pressed.

Lines 14-22: Until another key is pressed to exit the loop, the

U4

command is issued and the HLL data

is collected. The IEEE 488 controller command

OUTPUT

sends

U4

to the TempScan/1100, the

command

ENTER

requests the data, then the command

LINE INPUT

gets the data from the IEEE 488

driver and places it in the variable

U$

. The

FOR

loop extracts the data for the individual channels from

the string

U$

and places them on the screen. Time and date information is also available in the HLL

data.

This manual is related to the following products: