Jump to content
jives

DAQmx Task State Checking/Monitoring

Recommended Posts

I am currently working on a program to control data acquisition on a PXIe-6363 with tight timings.

 

I need continuous sampling with a start and stop trigger, which I managed to get by using a reference trigger and by re-arming the task in software once it's done (i.e. if DAQmx Is Task Done returns True, I call DAQmx Stop Task and DAQmx Start Task in one go). Since the re-arming may take a while (easily tens of milliseconds) and I may only have 200ms before the next start trigger, I'd like to check for this issue by informing an external system that my application has successfully re-started/re-armed the trigger and is ready to go (the external system is kind of a watchdog).

 

My problem now is that I don't know if the DAQmx Start/Stop Task VIs actually wait until the hardware is really ready (i.e. wait for the hardware to acknowledge), or just issue the command to the hardware and return immediately. I'd also like to monitor the state the task is in (with DAQmx Is Task Done), but again I don't know if that just queries some local state or if this VI actually checks if the hardware has finished starting the task (arming triggers, ...). I've read through all forum posts and DAQmx examples I could find, and the C reference, but couldn't find anything helpful.

 

In short: Could I end up in a situation where I call DAQmx Start and then DAQmx Is Task Done and it returns False, but my hardware is actually not yet armed and ready? Do these VIs actually wait for the hardware to acknowledge the new state, or do they operate on some local state machine?

 

Share this post


Link to post
Share on other sites

You may want to test this with the hardware and a scope using the PPS pulse that is available as a wired output on a GPS. The PPS (pulse per second) is a 1 microsecond pulse that is nano second accurate. Run it in a loop and you'll know!

Share this post


Link to post
Share on other sites

I know this post is old, but I may as well contribute. I'm not sure of your but there's a different approach you could try. The "DAQmx Is Task Done" VI I've seen it mostly in AO (analog output) operations, and for the looks of things, you're doing AI (analog input). Even though 200 ms seems a fairly long time for querying / software re-arming, I'd advise you to use a Pause trigger, taking into account your X Series can handle analog triggering (not sure if that's the case, but it can also handle digital triggering, as well).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.