From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq problem with NI USB-6212

hey !

 

I've got some problems to generate a sinewave with the module NI usb-6212, i created a task who generate a sinewave at 500hz, and i would like to see it on a graph, but i don't know how to do it.

if i am using the DAQ assistant, it ask me some data input, and i don't understand why, because i want to see the output data. any help ?

thank you

 

ps : i tried the examples but i was not able to make them work.Smiley Sad

0 Kudos
Message 1 of 12
(2,763 Views)

I generally advice against using DAQ Assistant because it works in very small use cases.  That being said post your code and we can take it from there.

0 Kudos
Message 2 of 12
(2,754 Views)

ok, thx for this advice 😉 so i tried without dac assistant but it tells me that the buffer is not big enough, problem is, i don't know how to change the buffer's size 😕

0 Kudos
Message 3 of 12
(2,751 Views)

This VI has little to do with the first post.  You mentioned that you created code that generates an output at 500hz.  This code neither outputs multiple values, nor does it output any value, it is analog read.  You want an analog write, you also want to provide multiple samples to output.

 

The example "Cont Gen Voltage Wfm-Int Clk.vi" found in the example finder allows to output a waveform on an analog out and shows a graph of it.  You should probably start there if you are trying to output a wave.

0 Kudos
Message 4 of 12
(2,747 Views)

ok thx for all the advices, so here i attached some pictures where i'm generating a sinewave of 1 Khz on the AO_0. So, if i put and BNC cable between the AO_0 of the NI 6212, and the AI_0 of my module 5731, and i devellop a little program on my FPGA i should see it right ?

thx again for everything

Download All
0 Kudos
Message 5 of 12
(2,740 Views)

That isn't the VI I mentioned that one has triggering.  Does you application need a trigger?  If this VI runs without error you will have an output that can be seen with a scope, dmm, led, motor, fet, or any other DAQ input device.

0 Kudos
Message 6 of 12
(2,737 Views)

ah yes ! sorry i changed that and now i visualize it on a scope Smiley Happy i will try  to connect to the NI5731 now, to see it on the FPGA

0 Kudos
Message 7 of 12
(2,729 Views)

And if i want to generate 2 sinewaves in the same time, for example, one on AO_0 and one on AO_1 ? i tried to copy and past 2 time the VI into one but when i start an error appear to say that the ressource is reserved Smiley Sad what can i do ?

thx !

0 Kudos
Message 8 of 12
(2,723 Views)
You can create one task with multiple channels in it. Then use the write multiple channels, and multiple samples. Your hardware only has one clock for AO and likely one digital to analog converter so only one task can run at a time.
0 Kudos
Message 9 of 12
(2,719 Views)

alright 😃 but i've got some problems 😕 sorry 😕 first, what do you mean by "the write multiple channels, and multiple samples" is it a VI ? and also, when i create a task with two channels, i choose the frequency for one of them and the other one got the same 😕 (see attached) 

thk you very much

Download All
0 Kudos
Message 10 of 12
(2,714 Views)