Measurement Computing TempScan/1100 User Manual

Page 300

Advertising
background image

C-30 Program Examples in Quick Basic

879696

TempScan / MultiScan, Appendix C

The following program is

BIN_HLL.BAS

in the

\EXAMPLES\

subdirectory. It will configure 24

thermocouple and 12 volts channels, set up the MultiScan/1200 for acquisition, and then after the
acquisition is complete, collect the High/Last/Low (HLL) channel readings in a Binary format rather than
the default ASCII format. The Binary format is inherently faster than ASCII format, but the data must be
deciphered after it is collected in order to yield the temperature values.

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-8: To be certain that the reset was successful and the device is ready, Serial Poll the device

until the proper status is returned.

Lines 9-10: 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 11-12: The Configure Channels (

C

) command will be used once to configure a range of

channels from 1 to 24 as Type J thermocouples, and used again to configure a range of channels from
25 to 36 as 10-Volt DC inputs.

Lines 13-31: For sample acquisition program lines, refer to the previous MultiScan/1200 program

example. For convenience, lines 13-31 from that example are identical to lines 13-31 in this example.

Line 32: Before reading the data, the Set Data Format (

F

) command is sent, instructing the

MultiScan/1200 to return the data in Binary format where every value will be 2 bytes in length. This
command can be issued anytime after the initial reset, and stays in effect until the unit is reset again or
another

F

command is issued.

Lines 33-40: This example will now use DMA (Direct Memory Access) to transfer the HLL data into

the controller. For this purpose, an array is dimensioned, then the offset and segment pointers are
supplied to the IEEE 488 driver. After the

ENTER

command has completed, the Binary data will be in

the string

READS

.

Lines 41-61: To convert the data into integer form, the string must be parsed and decoded.
Lines 62-63: To convert the integer data into temperatures and into voltages, simple calculations are

performed.

Advertising
This manual is related to the following products: