DataqSdk Control > Properties > TrigLevel

Previous | Next

TrigLevel

Applies to:

DATAQSDK Active X Control

Description:

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.

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.

TrigLevel allows you to specify the point at which the trigger level occurs. The TrigScnChnIdx property lets you determine which channel to designate as the trigger channel. If you wish to trigger on an analog signal, specify a 12-bit, 14-bit or 16-bit (depending on your instrument’s capability), 2’s complement, left-justified value. Using the Simplified formula in Converting Counts to Volts to determine what this value should be would give us the following example. Say the desired trigger level is 3.5 Volts and your full-scale range is +/-10Volts:

3.5 = 10* TrigLevel/32768

TrigLevel = 11469

If you are triggering on a digital signal, specify one of the eight digital input bits as the trigger according to the following table:

 

TrigLevelValue

128

64

32

16

8

4

2

0

 

Digital Input bits

7

6

5

4

3

2

1

0

Syntax:

DataqSdk1.TrigLevel=variable

Variable:

Integer

Example:

Private Sub Start_Click()

With DataqSdk1

     . ADChannelCount = 1

     . SampleRate = Val(Text1.Text)

     'sets TrigLevel to 11469

     .TrigLevel = 11469

     . TrigScnChnIdx = 0

     . TrigHysteresisIdx = Hysteresis15

     . 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