Professional Documents
Culture Documents
Problem Description:
How to setup the ExtTrigger in VB.net?
The USB-1608HS has some interesting features for the external trigger.
You can do analog triggering or digital triggering. Here is an excerpt
from the document ULHELP.CHM regarding triggering for this device:
To turn on the external trigger feature, you need to add the option to
the function call:
daqboard.AinScan() in the Options parameter, and you can only use
external triggering when in the background mode, or atleast not in the
foreground mode since that would lock up your computer until the
trigger event occurred. So if you were in background you could also do
background + countinuous + exttrigger for example if that was your
desire (using the proper syntax of course).
if you were to stop there and just use this much of the code, you could
execute your program, the type of external trigger you would have would
be the default which would be digital, rising edge. To have access to
the other types of triggers, you would need to add more code prior to
calling the ulstat = daqboard.AInScan() function, this would be the
Ulstat = Daqboard.SetTrigger() function where you would set some
additional parameters such as TriggerType, LowThreshold and
HighThreshold for the analog trigger.
If you do wish to use the analog trigger, you want to set an additional
paramter of the low or high threshold. You set this by using one more
function call, Daqboard.FromEngUnits() which will help you convert from
the voltage level you want to use to "counts" which is what the
paramter of SetTrigger() wants to use. This function call is used
before SetTrigger.
AInScan() 'to call the scan with the option set of EXTTrigger with all
the other parameters you need to set.