DataqSdk Control > Properties > TrigPreLength

Previous | Next

TrigPreLength

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.

TrigPreLength allows you to specify how many data samples to acquire before the trigger condition occurs. If any amount of pre-trigger information is requested, data is automatically acquired to your buffer when the start method is issued in anticipation of the trigger. If no pre-trigger information is requested (TrigPreLength=0), no data is acquired in the buffer until the trigger condition occurs. Default is 100.

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:      

DataqSdk.TrigPreLength=variable (where variable is the number of data samples the user would like acquired before the trigger condition occurs)

Variable:

Integer

Example:

Private Sub Start_Click()

With DataqSdk1

     . ADChannelCount = 1

     . SampleRate = Val(Text1.Text)

     . TrigLevel = 11469

     . TrigScnChnIdx = 0

     . TrigHysteresisIdx = Hysteresis15

     . TrigMode = AnalogSlopeTrigger

     . TrigSlope = SlopePositive

     'these post- and pre-length properties collect enough data to fill DQChart1

     .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