02-10-2010 11:45 AM - edited 02-10-2010 11:45 AM
Hi Galli,
The 9403 is SW-timed only (as you have found out). Thus, the software-timed approach that you are trying is the only option without purchasing other hardware. The 9172 provides support for clocked digital outputs (using a HW-timed module in slot 1-4) or for the access to two counters (using a HW-timed module in slot 5-6).
Now... there are quite a few optimizations you can make in your software. For one, I would suggest using a producer/consumer architecture to remove as many steps as possible from your update loop. You also might consider using the lower-level DAQmx VIs to have more explicit control over your tasks.
That being said, the communication to the 9172 is over USB which is going to have a much higher latency than a PCI card would (for example). There is not really anything you can do to reduce this latency, it is simply an inherent limitation with USB. In a feedback-type application, the latency actually hurts you twice (you must transfer data both from and back onto the 9172).
What kind of latency numbers are you seeing? Although there are a few optimizations you could make in your code, I'd imagine the bulk of the latency mostly due to the latency of USB transfers.
Best Regards,
John
02-10-2010 01:21 PM
Hi John
Thanks to your explanation. I'll try to work with my code to still working with th SW timer.
When you say about the counter in the slot 5 or 6, are you saying that is possible to use this counter to control my PWM? In this way I tested my 9403 in the slot 5 and in the "I/O name filtering" I check the box to the "Internal Channels". Now I can see the cDAQ1/_ctr0, cDAQ1/_ctr1, cDAQ1/_freqout but how can I transfer this counter to a physical output of the 9403 card? I'm configuring the internal counter of the 9172 chassi but I don't understand how to put this counter to an output of the 9403 in the slot 5.
Regards
Galli
02-10-2010 02:40 PM
Hi Galli,
Sorry I think my last post was a little unclear. The 9172 chassis itself has the 2 counters (+ freqout). To route these externally, you need to use a HW-timed module in slot 5 or 6. Since the 9403 is a SW-timed module you cannot use it to route the counters.
The following has a list of our cDAQ modules:
Any of the digital modules that say "Hardware Timed" should work for routing out counters in slot 5 or 6, or for performing correlated digital I/O in slots 1-4.
The cDAQ1/_ctr0 syntax indicates that the counter is internal on the chassis. You can use the counters internally if desired in this way.
Best Regards,
02-10-2010 05:30 PM
Hello John
Thanks again. First, I would like to try the possibility to use the internal counter and the 9403 in the slot 5. The problem is that I don't know how can I do this.
How can I connect the cDAQ1/_ctr0 in the software to send the PWM to an output of the 9403???
Please, let me know if you have some news.
Regards
Galli
02-10-2010 05:43 PM
02-10-2010 06:58 PM
Hi John
I understood everything now. I will work to improve my VI to SW timed.
Thanks to support.
Regards
Galli