11-08-2013
06:53 PM
- last edited on
05-03-2024
06:41 PM
by
Content Cleaner
I am using a USB-6216; I'd like to synchronize a hardware-timed digital output stream with a hardware-timed analog output stream. I understand that there is no dedicated digital I/O clock on the USB-6216, but this (very helpful!) page suggests that on an M-series device, I can use one of the analog clocks - e.g. "ao/SampleClock" - to clock out digital data:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHlCCAW&l=en-US
However, when I try to configure a digital task to clock along with "ao/SampleClock" (or "Dev4/ao/SampleClock", or "/Dev4/ao/SampleClock") using DAQmxCfgSampClkTiming, I get an error suggesting that I cannot use a sample clock for digital output tasks on this device:
DAQmx Error: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_SampTimingType
Requested Value: DAQmx_Val_SampClk
You Can Select: DAQmx_Val_OnDemand
I'm specifically trying to synchronize digital output and analog output, but the above page links to a very similar example doing the same thing for input:
http://zone.ni.com/devzone/cda/epd/p/id/4488
This example uses the same approach:
DAQmxErrChk (DAQmxCfgSampClkTiming (taskHandleDig,"/Dev4/ai/SampleClock",rate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,sampsPerChanToAcquire));
When I run this with my USB-6216 (code unmodified other than changing the device name), I get exactly the same error.
Does the page above that talks about using this approach for M-series devices not apply to the USB-6216? If so, what terms should I be looking for in specifications to understand whether this is supported or not?
Thanks!
-Dan
Solved! Go to Solution.
11-11-2013
11:52 AM
- last edited on
05-03-2024
06:42 PM
by
Content Cleaner
Hi Dan,
This appears to be a limitation of the device. The USB 6216 is a software timed device and can only run in On Demand mode. Here is a similar forum post to this one:
Nick
11-11-2013 11:55 AM
Thanks.
So on the page that talks about using the analog sample clock to drive digital I/O, which M-series devices is it referring to? How would I know before buying a device whether it can do this?
Thanks!
-Dan
11-12-2013
10:47 AM
- last edited on
05-03-2024
06:42 PM
by
Content Cleaner
Dan,
You will want to check the Specifications page. A device will need to be "hardware" timed, instead of just "software" timed.
Another way you can be sure to check is to use Measurement and Automation Explorer (NI MAX) to simulate a device, then create a task to try a type of sampling that you are interested in. Here is an article on how to do this:
https://www.ni.com/docs/en-US/bundle/ni-daqmx/page/simdev.html
Nick
11-12-2013 11:34 AM
Thanks... I think I was a little confused by the fact that the page I linked to above is specifically about the case where you have a hardware-timed analog path with a dedicated clock but you don't have a dedicated digital clock on an M-series device. That sounds *exactly* like my situation, and the digital lines are not described as "software-timed" in the specs, but now I see that "static" means "software-timed" and that some other devices specifically say "hardware-timed". All is clear now (though FWIW, if the term "static" just means "software-timed", it would be great to see that terminology rev'd for a clearer comparison with "hardware-timed").
Thanks!
-Dan
11-12-2013
11:38 AM
- last edited on
05-03-2024
06:43 PM
by
Content Cleaner
Actually one more question... some devices refer to the digital I/O as "clocked"... is this another word for "hardware-timed"?
The 6281, for example, says "clocked":
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209153
...but the 6341 says "hardware-timed":
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209069
What's the difference?
Thanks!
-Dan
11-12-2013 05:28 PM - edited 11-12-2013 05:35 PM
As far as timing goes, digital I/O lines on NI's Multifunction DAQ devices fall into one of three categories:
I. Software-timed only
II. Hardware-timed with no internal timing engine (you'll see this referred to as "correlated" in some places on NI's website).
III. Hardware-timed with an internal timing engine.
I have no explanation for the inconsistent terminology used across various NI marketing pages, "hardware-timed" and "clocked" are synonyms in my book.
It would have been nice to have more of a distinction in product naming between the 621x and the 622x/625x/628x M Series devices. I'd imagine a good deal of documentation was written referring to general "M Series" devices before the 621x came into existence and now is misleading and needs an update (they have been out for years though so that's not exactly an excuse...).
Best Regards,
11-12-2013 06:32 PM
Super-helpful. This is exactly what I needed. Thanks!