04-29-2010 07:06 AM
Hello,
I'm using DAQmx NI-USB-6259
I have problem with with parallel
execute writing analogue signal (for example 1000 points
per 1second) on physical channel Dev1/ao0 and at the same time read
1000 points per 1second from physical channel Dev1/ai0
how to do this?
I've tried to use DAQmxExportSignal but it doesn't work well or simply I
don't know how to do it
properly Maybe should I use another
function?
Best regards,
AndrzejS
Solved! Go to Solution.
05-03-2010 04:29 AM
Hi Andrzej,
You should be able to find DAQmx examples for VB6 under the following folders:
Windows Vista examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...
Windows XP or 2000 examples are located at:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...
Examples are located at:
C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\..
Synchronizing an analog output and analog input task using the DAQmx driver API should be done same way as in LabVIEW, thus check this link to see the synchronization concept.
I hope this helps!
Regards,
Barna
National Instruments
05-06-2010 02:24 AM
05-06-2010 04:54 AM
Hi Andrzej,
I am glad you managed to synchronize the analog output and analog input tasks.
Can you be more specific on what it means "doesn't work". Do you receive an error? Or the delay is not there? How do you trigger the two tasks? Try to triggering the AO task than start the AI task with either a different trigger type (i.e. Analog edge and set level to close to stabilized value) or with the Start.Trigger.delay function calls.
Let me know how it works.
Regards,
Barna Dobai
National Instruments
PS. Have you checked this page: Getting Started with NI-DAQmx: Main Page
05-06-2010 06:48 AM
05-10-2010 07:18 AM
Hi Andrzej,
You've found a great example actually. Now you just need to implement it in VB6 :). Basically what you'll have to make sure is that you configure the analog output task first than the analog input task. Thank you'll have to trigger the analog output task than configure the analog input task trigger to start with delay, as you can see in the picture below. Try to implement the trigger delay in the same way as in the screenshot below (note: the dark green wire - error wire - will indicate the order of calling the DAQmx functions in the Labview VI)
I hope this helps.
Regards,
Barna D.
National Instruments
05-09-2011 12:53 AM
Hi Barna,
one year ago you helped me with synchronization of the analog output and analog input tasks. Your help was very useful.
During this time my project groves and now, I have similar (but more complicated) problem 😞 and I hope that again you give me a smart solution...
I'm using DAQmx NI-USB-6259. I have to read not one but three AI voltage at the same time (or with very small delay) triggered by the analog output task.
Could you help me with this problem?
It is possible to read and storage three independent voltages at the same time (or with very small delay)?
Best regards,
Andrzej
05-10-2011 10:10 AM
Hi Andrzej,
Yes it's possible, but with your device not at the same time, just with a small delay (about 1 us).
The way is almost the same, you have to add 2 more analog input channels to your task, and use the read function for multiple samples. Just check the Acq-Int Clk VB example.
I can't help with particular code, because I'm not familiar with VB, but daqmx functions are very similar, so if this modification is 3 click in LabVIEW, then it must be very easy in VB too. You handle tasks, if your task contains more ai channels you will get back samples for all channels.
I hope this helps, or just let me know if I misunderstood something.
Gabor