LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered DAQ from a LabVIEW-compiled DLL

Bit of an obsure one here:

 

I have a DAQmx task on a NI PXI-6052E device that is started by an external hardware trigger (a rising edge on PFI0).  The task commands the acquisition of 200 or so samples at around 3 kS/s, after which it waits for the next rising edge trigger.

 

This works fine when run from the LabVIEW IDE (2010) itself, and also when run from a compiled Windows executable.  But when run from a compiled DLL, it doesn't - it waits until the timeout expires and returns no data.  The trigger pulse is definitely still arriving at the card, so I can only assume that I am doing something wrong, or that it's a bug with LabVIEW.  (Googling and forum searching gets me nowhere, so I'm beginning to think I might be the first person in the world to try this :))

 

Switching out the real DAQ device for a simulated one in MAX makes it work, presumably because simulated devices don't do triggering anyway.  Removing the trigger and making it run freely also gets it to work, but the triggering is essential to my application.

 

Any ideas?

0 Kudos
Message 1 of 3
(2,386 Views)

Hi Ian,

 

I will help you find a solution for this issue you are encountering. Firstly, can I ask you for a few more details regarding your application.

 

Can I check that you are compiling the VI through a build specification in your project explorer. Does this project contain any subVIs or does it just use the one standalone front end VI.

 

Are you then trying to call this DLL function back into a LabVIEW development environment? or are you calling it into a different program, TestStand? Visual basics? If you are using a program other than LabVIEW can your try calling it from the LabVIEW Development Environment where you created it.

 

Also, how are you calling the DLL. DLLs can be called statically and dynamically, the differences have be outlined in this KnowledgeBase article.

 

Could you also refer to this KnowledgeBase which outlines the method for building a DLL in LabVIEW. Check to ensure you followed all the required steps. At the bottom of the article there are useful links which provide details on how to call DLLs.

 

Sorry for asking so many questions but the answers to these will really help me understand your issue.

 

Many Thanks,

Aaron. E
Product Performance Engineer
Dyson
0 Kudos
Message 2 of 3
(2,372 Views)

Hi Ian,

 

Hope your are well. Just wanted to check if you had found a solution to your question. Also have you had a chance to look at the two KnowledgeBased articles I sent you?

 

With some more information on the action you require of the DLL we should be able to find an answer to your question.

 

Many Thanks,

Aaron. E
Product Performance Engineer
Dyson
0 Kudos
Message 3 of 3
(2,357 Views)