Jump to content
  • 0

Triggered Analog Readout on DT9816 with DataAcq SDK


Wolfram.T

Question

Hello everyone,

I've got a question regarding the DT9816. I'm accessing it via the DataAcq Win32 SDK in C++.
I want to trigger a readout of the analog input channels using a pulse on the "Ext Trigger" input. I've got it working for normal continuous operation (without the trigger) by using olDaSetDataFlow(OL_DF_CONTINUOUS) and a callback function to receive the data via olDaSetNotificationProcedure().
In the manual for the DT9816 (page 77) it states the AD unit has "External Negative TTL Trigger Support" for acquisition start, and I can see it working that way in the QuickDAC 3.7.0 software. But when I try to setup the trigger in my software (using olDaSetTrigger()) I always get "Not supported". Querying the AD unit capabilities using olDaGetSSCaps() seems to confirm that it doesn't support any trigger except software trigger:

OLSSC_NUMEXTRATRIGGERS 1
OLSSC_SUP_SOFTTRIG 1
OLSSC_SUP_EXTERNTRIG 0
OLSSC_SUP_THRESHTRIGPOS 0
OLSSC_SUP_THRESHTRIGNEG 0
OLSSC_SUP_ANALOGEVENTTRIG 0
OLSSC_SUP_DIGITALEVENTTRIG 0
OLSSC_SUP_TIMEREVENTTRIG 0
OLSSC_SUP_TRIGSCAN 0
OLSSCE_MAXRETRIGGER 63
OLSSCE_MINRETRIGGER 64
OLSS_SUP_RETRIGGER_INTERNAL 0
OLSS_SUP_RETRIGGER_SCAN_PER_TRIGGER 0
OLSSC_SUP_CONTINUOUS_PRETRIG 0
OLSSC_SUP_CONTINUOUS_ABOUTTRIG 0
OLSSC_SUP_RETRIGGER_EXTRA 0
OLSSC_SUP_SV_POS_EXTERN_TTLTRIG 0
OLSSC_SUP_SV_NEG_EXTERN_TTLTRIG 0
OLSSC_SUP_EXTERNTTLPOS_REFERENCE_TRIG 0
OLSSC_SUP_EXTERNTTLNEG_REFERENCE_TRIG 0
OLSSC_SUP_THRESHPOS_REFERENCE_TRIG 0
OLSSC_SUP_THRESHNEG_REFERENCE_TRIG 0
OLSSC_SUP_POST_REFERENCE_TRIG_SCANCOUNT 0
OLSSC_SUP_SYNCBUS_REFERENCE_TRIG 0

What am I missing here?

Thank you very much for your time,
Wolfram

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hello John,

thanks for your suggestion.

When I run the CExample (in Visual Studio) it doesn't allow me to select the external trigger.
CExample.jpg.6cf27cf517c991d08d13080ebe0f34ee.jpg

 

When I try to enable it in my code (in Qt - MinGW compiler) I get ECODE 36 (Not supported).

HDEV Board_Handle; // Initialized elsewhere.
HDASS AD_Handle = nullptr;

olDaGetDASS(Board_Handle, OLSS_AD, 0, &AD_Handle); // ==> 0 (No Error)
olDaSetDataFlow(AD_Handle, OL_DF_CONTINUOUS); // ==> 0 (No Error)
olDaSetTrigger(AD_Handle, OL_TRG_EXTERN); // ==> 36 (Not supported)

 

Only in QuickDAC (3.7.0.49) I can select "External TTL Neg Edge" as trigger source (which then works as expected).
QuickDAC.jpg.c3976d93554cad4a061240039051ba88.jpg


As far as I understand QuickDAC uses the DotNet SDK, whereas the CExample and my Code use the Win32 SDK.
Is this possibly a limitation of the Win32 SDK?

Best regards,
Wolfram

 

Link to comment
Share on other sites

  • 0

Hello John,

sadly, no change (just as the queried capabilities in my first post suggest).

olDaSetTrigger(AD_Handle, OL_TRG_THRESHNEG); // ==> 36 (Not supported)
olDaSetTrigger(AD_Handle, OL_REFERENCE_TRG_THRESHNEG); // ==> 36 (Not supported)

Maybe this has something to do with the "OLSSC_NUMEXTRATRIGGERS" capability?

Best regards,
Wolfram

Link to comment
Share on other sites

  • 0

Hello again,

out of curiosity I tried the DotNET C# example "ReadBufferedDataAsRawDigTrigger" and it works just fine with trigger type "TTLNeg". Problem is, our whole code base is C/C++ so I can't just switch to C# with DotNET. 

Could this be a version problem with my Win32 libraries and DLLs? I downloaded them just a couple of days ago.

DLLVersion.jpg.a072d56e45a4cbcc23600d3d5741f2c5.jpg

Best regards,
Wolfram

Link to comment
Share on other sites

  • 0

So it turned out John didn't follow up.  Or the engineering department doesn't exist anymore?  This "support" is a shame, since those devices are not cheap.

Anyways, the documentation has been wrong regarding this trigger issue at least since "Nineteenth Edition September, 2012" (DT9816Um.pdf).  There it says on page 61:

Quote

The external trigger is initiated by a falling-edge
transition on the A/D external TTL trigger input. Using software, specify the trigger
source as an external, negative digital (TTL) trigger.

Then, in Table 18 "Start Trigger Options" on page 74:

Quote

External Negative TTL Trigger Support SupportsNegExternalTTLTrigger: Yes

And finally on page 90 (Appendix A, "External Trigger Specifications"):

Quote

Input type: HCT rising-edge sensitive

We see, the documentation contradicts itself, whether the trigger input is rising- or falling-edge sensitive.

Additionally, the API doesn't have a constant OL_TRG_* to specify a TTL start trigger.

I tried what Wolfram suspected:

olDaSetTrigger(AD_Handle, OL_TRG_EXTRA);

And it worked!  It reacts on falling edges.

But we have to use other devices for the next projects.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...