I have been struggling with this for quite a while and really need to get to a resolution. Using a USB-1608FS board, I am simply trying to reproduce programmatically what I've been able to do easily withTracerDAQ: initiate an ADC scan with AInScan() based on a rising edge trigger (from either the analog channel from the signal itself or the external digital trigger). As per the documentation, there are 2 trigger setup commands, ATrig() and SetTrigger() that somehow together should be able to accomplish this.
From the manual:
ATrig()
Waits for a specified analog input channel to go above or below a specified value. ATrig continuously reads
the specified channel and compares its value to trigValue. Depending on whether trigType is set to
TrigAbove or TrigBelow, it waits for the first A/D sample that is above or below trigValue. The first sample
that meets the trigger criteria is returned to dataValue.
SetTrigger()
Selects the trigger source and sets up its parameters. This trigger is used to initiate analog to digital
conversions using the following Universal Library for .NET methods:
AInScan(), if the ExTrigger option is selected.
I've used the following in VB.Net and indeed it only triggers when the trigger is above 0, but not on the rising edge, so the signal is randomly moving around (I check the status in a timer in the standard way after AInScan). Note that there are no options for TrigPosEdge with ATrig, only TrigAbove or TrigBelow:
Dim dataval As Short
Dim threshold As Short = 32767
ULStat = DaqBoard.ATrig(0, MccDaq.TriggerType.TrigAbove, threshold, Range, dataval)
were also not having any impact on the trigger, and I've tried multiple combinations to no avail. If anyone could provide a simple example on how to do this most basic analog input, I would very much appreciate it (there are no examples in the example files provided).
Question
Walid
Hi,
I have been struggling with this for quite a while and really need to get to a resolution. Using a USB-1608FS board, I am simply trying to reproduce programmatically what I've been able to do easily withTracerDAQ: initiate an ADC scan with AInScan() based on a rising edge trigger (from either the analog channel from the signal itself or the external digital trigger). As per the documentation, there are 2 trigger setup commands, ATrig() and SetTrigger() that somehow together should be able to accomplish this.
From the manual:
ATrig()
Waits for a specified analog input channel to go above or below a specified value. ATrig continuously reads
the specified channel and compares its value to trigValue. Depending on whether trigType is set to
TrigAbove or TrigBelow, it waits for the first A/D sample that is above or below trigValue. The first sample
that meets the trigger criteria is returned to dataValue.
SetTrigger()
Selects the trigger source and sets up its parameters. This trigger is used to initiate analog to digital
conversions using the following Universal Library for .NET methods:
AInScan(), if the ExTrigger option is selected.
I've used the following in VB.Net and indeed it only triggers when the trigger is above 0, but not on the rising edge, so the signal is randomly moving around (I check the status in a timer in the standard way after AInScan). Note that there are no options for TrigPosEdge with ATrig, only TrigAbove or TrigBelow:
Dim dataval As Short
Dim threshold As Short = 32767
ULStat = DaqBoard.ATrig(0, MccDaq.TriggerType.TrigAbove, threshold, Range, dataval)
ULStat = DaqBoard.AInScan(LowChan, HighChan, Count, Rate, Range, MemHandle, Options)
All attempts to use SetTrigger(), such as
ULStat = DaqBoard.SetTrigger(MccDaq.TriggerType.TrigPosEdge, threshold, threshold)
were also not having any impact on the trigger, and I've tried multiple combinations to no avail. If anyone could provide a simple example on how to do this most basic analog input, I would very much appreciate it (there are no examples in the example files provided).
Thanks,
Walid
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now