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

7 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

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...