Measurement Computing TempScan/1100 User Manual

Page 284

Advertising
background image

C-14 Program Examples in Quick Basic

879696

TempScan / MultiScan, Appendix C

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 T thermocouples, and used again to configure a range of channels from
25 to 48 as Type K thermocouples.

Line 13: The Set Counts (

Y

) command is used to configure the number of scans to take while in the

different acquisition states. In this example, 50 scans will be taken while in the Pre-Trigger state, 100
while in the Post-Trigger state, and 200 while in the Post-Stop state. The Post-Trigger count is only
valid when the Stop (trigger stop event) is set to Count via the Set Trigger Configuration (

T

)

command. This example does not use Count, so this parameter is ignored.

Line 14: The Set Scan Interval (

I

) command sets the time period between scans in hours-minutes-

seconds format. The MultiScan/1200 can have two different scan intervals, one for the Post-Trigger
state (acquisition scan interval), and one for the Pre-Trigger and Post-Stop states (normal scan
interval). This example sets up the Post-Trigger, Pre-Trigger and Post-Stop scan intervals to the same
value of 0.0 second, which defaults the MultiScan/1200 acquisition to fast mode.

Line 15: The Set Trigger Level (

L

) command specifies the channel as Channel 1 at a level of 20

°C

with a hysteresis of 0

°C (where the default units is degrees Celsius). This command is relevant only

when the Trigger (trigger start event ) or Stop (trigger stop event) is a channel level, as specified on
the next line.

Line 16: The Set Trigger Configuration (

T

) command sets up the Trigger (trigger start event ) and

Stop (trigger stop event) parameters for the acquisition. In this example, the Trigger and Stop are
assigned the rising level and falling level, respectively, of an input channel as specified via the Set
Trigger Level
(

L

) command. The Auto Re-arm flag is disabled, so that the MultiScan/1200 will not re-

arm itself for another acquisition after the first acquisition is complete. The synchronization flag is
also disabled, so the MultiScan/1200 will not re-synchronize itself to the Trigger point when the
Trigger (trigger start event) begins. When the MultiScan/1200 encounters the Execute (

X

) command,

it will be armed and will start the collection of the Pre-Trigger data.

Lines 17-24: After the Execute (

X

) command has been received, the MultiScan/1200 arms itself and

then waits for the Trigger (trigger start event) of Channel 1 rising above 20

°C. The IEEE 488 Serial

Poll (

SPOLL

) command is used to query the acquisition status of the MultiScan/1200. A

SPOLL

value

of 2 signifies that Channel 1 has in fact risen above 20°C.

Lines 25-30: Using the User Status (

U

) command

U0

to query the Event Status Register (

ESR

), we now

wait until the Acquisition Complete event is reached.

Lines 31-38: During the acquisition or after the acquisition has been completed, the Acquisition

Buffer can be queried for the data that is available for transfer. The User Status (

U

) command

U6

can

be used to query the Buffer Status String, which includes the following eight fields of information: (1)
Number of Trigger Blocks Available, (2) Number of Scans Available, (3) Current Position of Read
Pointer, (4) Time/Date Stamping of Trigger Event, (5) Position of Stop Event Pointer, (6) Time/Date
Stamping of Stop Event, (7) Position of End Scan Pointer, and (8) Status of Current Trigger Block.
For more Acquisition Buffer information, see chapter System Operation.

This example uses the last parameter in the return string as an indicator of how much data is available
to transfer to the IEEE 488 controller. The function

MID$

extracts 7 characters from the string

U$

starting at character 9.

Lines 39-45: The Read Buffered Data (

R

) command

R1

is used to request the oldest scan from the unit.

Using the variable

UA%

calculated from the previous step, all of the oldest scan data is transferred to

the controller.

Advertising
This manual is related to the following products: