beautypg.com

Measurement Computing TempScan/1100 User Manual

Page 288

background image

C-18 Program Examples in Quick Basic

879696

TempScan / MultiScan, Appendix C

The following program is

ALARM2.BAS

in the

\EXAMPLES\

subdirectory. It will set up the alarm system

of the MultiScan/1200.

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.

Line 11: The Configure Channels (

C

) command will be used once to configure a range of channels

from 1 to 24 as Type T thermocouples, where levels above 18 or below 1 will cause a system alarm.

Line 12: In addition to causing an internal system alarm state, the alarm conditions can also be

attached to any one of the 32 digital output lines. The Assign Digital Alarm Output (

A

) command will

be used to assign input Channels 1 and 2 to digital alarm Output 1 in an ORed fashion.

Lines 13-14: 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 15-36: The Set Digital Outputs (

O

) command

O?

will be used to query the status of the digital

output lines. The alarm state can be detected since digital alarm Output 1 was mapped into input
Channels 1 and 2. This example shows alarm detection handling when two or more channels have to
be muxed into one single digital output bit.

The User Status (

U

) command

U11

will be used to show each individual channel alarm status.

This manual is related to the following products: