11-03-2008 05:06 AM
Hi,
I am using a NI DAQ Pad-6015 (usb) with Labview 8.5 and XP, to generate 2 Digital Ouputs (500ms high for the first one and 600ms high for the second one). The timing doesn't need to be very accurate so I am not using the 2 hardware clocks outputs. When runing the VI, and measuring the duration of the outputs with an oscilloscope, I get 520ms and 640ms. This is not too much of a problem, but I would still like to know, if I am doing the right thing in my program, and/or if it is possible de improve it?
Thanks for your help,
Regards,
Marc
Solved! Go to Solution.
11-03-2008 06:21 AM
hi marc,
Try this Vi,
11-03-2008 06:47 AM
Hi Santhosh,
Thank you very much for taking some time for anwsering my Question.
In reality I want to generate only one pulse (of 500ms for the first signal, and 600 ms for the second one) every minute (my 1000 ms while loop was only used to enable me to make a quick check on the oscilloscope.
I need a 500ms and 600 ms signal generation (not 2 signals of 500ms). This is way I introduced 2 wait Icons. I suppose this contributes to making the timing not very accurate. But I don't really know how to improve the programming ...
Marc
11-03-2008 09:26 AM
11-05-2008 09:21 AM
Thanks for your help Dennis,
Regards,
Marc
11-05-2008 04:30 PM
Marc,
I am not that familiar with the 6015, it is listed as a legacy device.
Santhosh and Dennis have the simple answers, The DAqmx Create task VI is sluggish at best, the fewer times you use it, the better off you are.
Make sure you are on a USB 2.0 Port. USB is the critical section.
Option Alpha: Pre-load the write (auto-start = false). Run the start VI when the timer expires. (I think this works on uncorrelated if you use a single sample)
Option Beta: If your DO's are Correlated you can use one of your timers to create a Clock, Use the counter internaloutput as your clock source for DO (Plenty of examples).use the regernerate value in the trigger property node if you want it to cycle. You can also use your AI sample clock if you you want to syncronise it with Acquisition.
Option Delta: Use your counters to create a pulse train (this is probably the simplest one to code),
11-06-2008 05:03 AM
Hi,
Using all your advices I get accurate measures now : only 0 to 4ms time difference over the 500 and 600 ms signals using the NI DAQPad-6015.
PS : Timmer was right concerning the usb advice.With my previous program when using a 6229 PCI card I had only a 10 ms différence instead of 20 ms with the usb one.
Thansk for your help,
Regards,
Marc
11-06-2008 04:23 PM
I am surprised about the PCI device being so slow.
I havent actively used one yet (I have a PCI-e 6259 for a future project) and was expecting sub-milisecond respose from it.
Thanks for the heads up!
Looks like I will stick with my OEM USB devices (6255,6259) and do more coding on Multi-Device Triggering and Syncronisation.
The correlated DIO Lines are very powerful for acurate timing. The PFI lines are good for Sync.
I am still confused as to why they didn't allow Correlated DIO on the PFI lines as well, it has made my coding life difficult.
Good luck with your future coding endeavours.
As closing advice to DAQmx Users:
Use as Few Daqmx Blocks as you have to, they have overheads.
For digital channels, it is much faster to build a channel from combined lines (Add Channel port0/line0:31) than to run a for loop adding them 1 at a time (Add Channel port0/line0..loop..Add Channel port0/line1..Loop.........)
Analogue doesn't seem to make much difference.
01-09-2009 09:59 AM
Can anyone convert the vi's in this thread to labview 8?... I am trying to solve a digital on/off timing problem and i think these might help.
Thanks for your help in advance.
Abhishek
01-12-2009 03:30 AM
This VI can be convert to labview 8.0 because subvi are not compatible with old version.
I post a screenshot.
Aurélien J.
National Instruments France