Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating fast analogue ramps simultaneously

Solved!
Go to solution

Using DAQ-mx, I am trying to output two fast and simultaneous analog ramps.  I have created the attached .vi and know that if I try to output just one ramp, my method works.  However, when I add the second ramp one channel outputs a ramp and when it is finished the other ramp is output on the second channel.  Can you spot my error?

waveforms2vi.jpg

0 Kudos
Message 1 of 11
(5,046 Views)

Hello,

 

Could you post the waveforms2.vi for us to try?

 

Thanks

0 Kudos
Message 2 of 11
(5,044 Views)
Here it is, Thanks
0 Kudos
Message 3 of 11
(5,040 Views)

Hello,

 

I would suggest having a look at the Cont Gen Voltage Wfm-Int Clk VI. This VI is located in the Example Finder under Hardware Input and Output » DAQmx » Analog Generation.

 

Using a similar approach will give you something like the modified VI I have posted. I don't have any hardware to test this on so please let me know if it works or not!

 

0 Kudos
Message 4 of 11
(5,033 Views)
Unfortunately, I'm using v8.5, so can't open your .vi.  Can you post a screenshot? Thanks again
0 Kudos
Message 5 of 11
(5,020 Views)

Hello,

 

I have attached an 8.5 version, I hope it works.

 

0 Kudos
Message 6 of 11
(5,017 Views)
No joy, I'm afraid.  The channels now both immediately switch to their initial values (which is an improvement on my effort), but then remain at that voltage.  Thanks again anyway
0 Kudos
Message 7 of 11
(5,009 Views)
0 Kudos
Message 8 of 11
(5,007 Views)
Hello again. This now works nicely.  I'll possibly add another condition to stop the while loop after a certain time, as the loop does not seem to exit.  One issue I still have is the speed.  The ramp is nice and smooth on long timescales, but if I want to ramp in, e.g, 2ms it essentially becomes a double-step.  Is there anyway to smooth out the ramps on this sort of timescale (which is actually what I'm aiming to use)?  Thanks again
0 Kudos
Message 9 of 11
(5,004 Views)
Solution
Accepted by topic author GDBruce

Try increasing the rate constant to something appropriate for your hardware (i.e. within the maximum sample rate for your hardware). You could try 50000. You will also need to change the waveform generator sample speeds too (they are all set at 1000hz). Maybe make a front panel control and replace all the 1000 constants with a wire to the control.

 

samplerate.PNG

 

 I hope this works!

Message Edited by macaba on 07-23-2009 09:10 AM
Message 10 of 11
(5,001 Views)