beautypg.com

Measurement Computing TempScan/1100 User Manual

Page 286

background image

C-16 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 TempScan/1100.

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 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.

Line 9: The Configure Channels (

C

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

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

Line 10: 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 11-12: 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 13-34: 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: