|
|
DataqSdk Control > Properties > TrigHysteresisIdx |
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. The TrigHysteresisIdx allows you to specify a hysteresis index that will dictate the hysteresis applied to the trigger level. This is a good approach when dealing with noise and TrigMode is AnalogLevelTrigger. If you have noise near the trigger level and no hysteresis it could cause the trigger condition to toggle on and off rapidly. The hysteresis index corresponds to a value shown in the following table: |
||
|
Hysteresis Index |
Hysteresis + and - from level in LSB of 12-bit ADC |
|
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
0 1 2 3 4 6 7 13 19 28 40 58 84 122 176 255 |
|
|
For example, for a negative slope, if your TrigLevel is 100 and you set TrigHysteresisIdx to 4, the trigger condition will not occur until the waveform breaks the plane at 96 AND 104. For a positive slope, if your trigger level is 100 and your set TrigHysteresisIdx equal to 4, the trigger condition will not occur until the waveform breaks the plane at 96 AND 104. The properties window in Visual Basic allows you to use a dropdown box to select this setting. Default is 0. To convert to Volts see Converting Counts to Volts. For example, say you are using a DI-720 USB with a gain setting of one and a trigger level of 5 Volts (see TrigLevel). Setting Hysteresis Index to 15 would give us the following formula (see Simplified): Volts = 10*ADReading/32768 Volts = 10*255/32768 So the Hysteresis Index would allow +/-0.0778 volts before triggering (i.e., the waveform must break the plane of both 5.0778 Volts and 4.9222 Volts for trigger condition to occur). 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.TrigHysteresisIdx=variable (where variable is the hysteresis index setting) |
||
Variable: |
|||
Example: |
Private Sub Start_Click() With DataqSdk1 . ADChannelCount = 1 . SampleRate = Val(Text1.Text) . TrigLevel = 0 . TrigScnChnIdx = 0 'sets Hysteresis index to 15 .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 |