DataqSdk Control > Properties > TrigMode

Previous | Next

TrigMode

Applies to:

DATAQSDK Active X Control

Description:

When triggering occurs, the hardware device starts sending data to the buffer. The hardware device is still sampling data when triggering is off - it is simply not storing it in the buffer.

TrigMode you to specify no triggering, single scan triggering, software triggering, or level triggering. Visual Basic allows you to choose this setting in the properties window with a dropdown list.

Mode 0 - None (no triggering - the default) allows data to be continuously acquired to your buffer the instant the Start method is called. Data acquisition does not stop when the buffer is full, the buffer simply gets overwritten.

Mode 1 - AnalogSlopeTrigger (for analog trigger signals) and Mode 2 - DigitalTrigger (for digital trigger signals) are single scan trigger modes. The single scan mode is used when it is only necessary to retrieve one trigger event. For example, a buffer is allocated, scanning is started, the trigger condition occurs (as set in TrigLevel), n (the number specified in the TrigPreLength property) pre-trigger data samples and m (the number specified in the TrigPostLength property) post-trigger data samples are collected in the buffer (if pre-and/or post-trigger data is desired), and scanning is stopped.

Mode 5 - SoftwareTrigger (software triggering) is similar to mode 0 in that data is acquired to your buffer the instant the Start method is called, but differs from mode 0 in that you can specify the number of data points (using TrigPostLength) that will be acquired. When the buffer contains the desired number of data points, scanning is stopped. This mode does not support pre-trigger data.

Mode 6 - AnalogLevelTrigger (level triggering) allows data to be acquired to your buffer only when a certain waveform value occurs and then only on the proper slope, as shown in the following graphic:

Generate/trigmode_(dataqsdk).gif

This property is not available when using DI-145, DI-149, DI-155, DI-194, DI-154, DI-195B, DI-148, DI-158, DI-245, DI-1100, DI-1110, DI-1120, DI-2008, DI-2108, DI-2108-P, DI-4108, DI-4208, DI-4718B, and all DI-71x series devices.

Syntax:

DataqSdk1.TrigMode=variable

Variable:

Integer

Example:

Private Sub Start_Click()

With DataqSdk1

     . ADChannelCount = 1

     . SampleRate = Val(Text1.Text)

     . TrigLevel = 11469

     . TrigScnChnIdx = 0

     . TrigHysteresisIdx = Hysteresis15

     'sets TrigMode to mode 6 AnalogSlopeTrigger

     .TrigMode = AnalogSlopeTrigger

     . TrigSlope = SlopePositive

     . TrigPreLength = 100

     . TrigPostLength = DQChart1. Xmax - 100

End With

DataqSdk1. Start

Text1.Text = Format(DataqSdk1. SampleRate, "0.00")

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Private Sub Timer1_Timer()

If DataqSdk1. AvailableData >= DQChart1. Xmax Then

     DQChart1. Chart (DataqSdk1. GetData)

     DataqSdk1. Start

End If

End Sub

 

Reference Materials | Top