Multiscan/1200 – Measurement Computing TempScan/1100 User Manual
Page 276

C-6 Program Examples in Quick Basic
879696
TempScan / MultiScan, Appendix C
MultiScan/1200
Example 15d. HLL48.BAS Program
(1)
…… 15-CLS : PRINT “The MultiScan/1200 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;M#0X”
(9)
…… 15-PRINT #1, “OUTPUT 07;W#32X”
(10)
…… 15-PRINT #1, “OUTPUT 07;C1-24,3X”
(11)
…… 15-PRINT #1, “OUTPUT 07;C25-48,14X”
(12)
…… 15-PRINT #1, “OUTPUT07;Y1,0,0X”
(13)
…… 15-PRINT #1, “OUTPUT07;T1,1,0,0X"
(14)
…… 15-PRINT “The MultiScan/1200 is collecting HLL data for all 48 channels”
…… 15-PRINT “Hit a key to start or stop retrieving HLL data...”
(16)
…… 15-WHILE INKEY$ = “”: WEND
(17)
…… 15-WHILE INKEY$ = “”
…… 15-PRINT #1, “OUTPUT 07;U4X”
…… 15-PRINT #1, “ENTER 07"
…… 15-LINE INPUT #2, U$
(21)
…… 15- …… 15-FOR i = 1 TO 24
…… 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
(25)
…… 15- …… 15-FOR i = 1 TO 24
…… 15- …… 15- …… 15-PRINT “High, Low and Last readings of Channel”; i + 24
…… 15- …… 15- …… 15-PRINT MID$(U$, (24 * 66) + (i * 78) - 77, 78)
…… 15- …… 15-NEXT i
(29)
…… 15-WEND
This program is
HLL48.BAS
in the
\EXAMPLES\
subdirectory. It will configure 24 thermocouple and 24
volts 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 MultiScan/1200 at the start of your
application by sending the Reset Power-On (
*R
) command. Wait a 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.
• Lines 8-9: The first thing necessary to start scanning is to setup the measuring mode. In this case, the
MultiScan/1200 will be setup for line-cycle integration / high-speed multi-channel mode.
• Lines 10-11: The Configure Channels (
C
) command will be used once to configure a range of
channels from 1 to 24 as Type T thermocouples, and used again to configure a range of channels from
25 to 48 as
±10 volts DC inputs.
• Lines 12-13: 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. Telling the MultiScan/1200 to start acquiring data is the last thing
necessary to start scanning. Since the MultiScan/1200 does not scan channels until an acquisition is
armed, arming an acquisition with one Pre-Trigger scan allows valid HLL data to be read.
• Lines 14-16: The next three lines tell you to hit a key to start the acquisition. The program will not
proceed until a key is pressed.