LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog output to analog input

Hi,

 

I use the X-series multi-function USB: USB- 6341.

 

in the analog output channel I need a sine wave at the frequency of 20 kHz. in the analog input channel I need to acquire the data at 100 kHz.

I have modified an existing vi from the NI example programs that it's overview: This VI outputs a waveform on an analog output channel and bring the signal back into an analog input channel.

 

 

the problem is that I need the analog output to make a sine wave for as long as the VI runs, but it's stops after one sec (even though the analog input channel keeps acquire data)

 

Please, any thought?

thanks in advanced.

 

0 Kudos
Message 1 of 18
(4,297 Views)

You have 2 options:

1. Keep writing the same waveform to the AO.

2. Use a DAQmx Write property node and set the Regeneration Mode property to Allow Regeneration.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 18
(4,274 Views)

Hi Crossrulz!

thank you for your response. 

I am quite new with LabVIEW, could you please elaborate? 

again thanks in advanced,

Naama

0 Kudos
Message 3 of 18
(4,261 Views)

I have tried to use the daqmx write node but it's still dosn't work...

 

any thought?

thanks in advanced

0 Kudos
Message 4 of 18
(4,235 Views)

Hi,

 

I use the X-series multi-function USB: USB- 6341.

 

in the analog output channel I need a sine wave at the frequency of 20 kHz. in the analog input channel I need to acquire the data at 100 kHz.

I have modified an existing vi from the NI example programs that it's overview: This VI outputs a waveform on an analog output channel and bring the signal back into an analog input channel.

 

 

the problem is that I need the analog output to make a sine wave for as long as the VI runs, but it's stops after one sec (even though the analog input channel keeps acquire data). I have tried to use the DAQmx write node but it's still doesn't work...

 

Please, any thought?

thanks in advanced.

0 Kudos
Message 5 of 18
(4,239 Views)

Hi,

 

I use the X-series multi-function USB: USB- 6341.

 

in the analog output channel I need a sine wave at the frequency of 20 kHz. in the analog input channel I need to acquire the data at 100 kHz.

I have modified an existing vi from the NI example programs that it's overview: This VI outputs a waveform on an analog output channel and bring the signal back into an analog input channel.

 Then I need the analog input (inquired data) to go through a Band Pass Filter-->absolute value--> Low Pass Filter. 

In the original program (before the filters and absolute values) it works but after I have added it I get an error.

the final graph doesn't make sense, it also seems like the analog output stops even though I have added the property node and defined "allow regeneration"

 

I have attached both VI (with filter, no filter)

 

Please, any thought?

thanks in advanced.

Download All
0 Kudos
Message 6 of 18
(4,188 Views)

Hi Naama,

 

why did you create a new thread instead of sticking with your original one?

I moved your message…

 

In the original program (before the filters and absolute values) it works but after I have added it I get an error.

So the problem is (most probably) in the changes made to your "BPF" VI!

You changed the sample rate and the number of requested samples. And you added the filters…

Error 200279 means: you didn't read the sample data fast enough from DAQmxRead: something in your loop requires more time than you expect it…

 

it also seems like…

Do you check the error wires inside the loop? When does the error occur?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 18
(4,184 Views)

 

 

Hi GerdW,

 

thank you for your response. 

 

Error 200279 means: you didn't read the sample data fast enough from DAQmxRead: something in your loop requires more time than you expect it…I don't know how to fix it.. The USB-6341 is supposed to be able to work in those rates but I don't understand how I can solve this.

 

 

Do you check the error wires inside the loop? When does the error occur? Yes, it's ok

 

please if you can help me?

Naama

0 Kudos
Message 8 of 18
(4,179 Views)

Hi Naama,

 

disable the filters and graphs in your loop and check if the error still occurs.

When the VI runs without problems: enable the first filter and check again.

When the VI still runs errorless: enable the next filter.

Repeat until you found the problem…

Keep in mind: we don't have your hardware so YOU have to do the testing and debugging!

 

Do you check the error wires inside the loop? When does the error occur? Yes, it's ok

What is ok? When does the error occur?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 18
(4,175 Views)

Hi,

again thank you for your help.

 

I don't know why even without the filters there is a problem. When I have first built this program I did it step by step as you mentioned. 

So without the filter I have 2 problams:

1) error 200272- which I don't know how to solve (increase buffer size et cetera)

2) I don't know why it only do one cycle of analog output (hence the sine wave at the frequency 20KHz)

 

thank you!

Naama

0 Kudos
Message 10 of 18
(4,173 Views)