LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous signal generation and acquisition - need help!

I'm writing a vi to output continuously a sine wave and at the same time continuously acquire two signals and extract their magnitudes and phases. The output frequencies are about 0.1 Hz up to 2 kHz and the input frequencies are the same so I guess I'll use sampling frequencies >20 kHz to get a smooth waveform. I've been looking carefully at the example vi's, especially "Multi-Function-Synch AI-AO" but I'm a bit confused. This vi seems to set up the input and output channels and waveform and then loop continuously to output the data but there is no way of changing anything once the vi has started. However, what if I want to be able to vary parameters online whilst the vi is running? For example what if I wish to change the output waveform type or frequency or DC offset? Should I run an event driven loop which regenerates the data to the bufer to output from the DAC when the user changes a setting? I'm not sure the best way to do this and would appreciate your advice. Thanks,

Dave

 

0 Kudos
Message 1 of 5
(3,891 Views)

Hi,

 

I have looked at your concern about being able to vary values on your front panel and consequently seeing a regenerative output.

 

If you have studied VI's such as the "Multi-Function-Synch AI-AO" but find them confusing then maybe links about Master/Slave tasks will give you more insight. Also this thread might help, it's about multifunctional Data Acquisition (DAQ).

 

Using an event-driven loop would work with this system but be sure to include a "wait" function in it to break up processing tasks. It would also be good to check your task manager whilst it's running to monitor your CPU usage.

I hope this helps, if you have any further questions regarding this topic I'd be happy to help.

 

Regards,

John

 

 

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 2 of 5
(3,854 Views)

Hi again,

 

I've done more research into this topic and found that there is a handy DAQmx write property node thats will allow you to continuously update an analog output.

This link on Analog Output Regeneration should be helpful.

Let me know if you have any more queries, I'll be happy to advise.

 

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 3 of 5
(3,826 Views)

hi

i`va been writing the same program. i want to measure the impedance , and i want to generate and acquire signal simultaneously to calculate the impedance. its important for me that the two generat&acquire signals will be simultaneously. i have capacitor in my circuit and to measure its size i need to be sure that the two signal begin at the same time. ive read the sample examples of labview carefully , but i still have problam since the two signal dont begin same time. i want to ask if u please help me or send me your programs which seems to like what i want
tanx in advance

0 Kudos
Message 4 of 5
(3,348 Views)

Hi,

 

Have you been able to get a solution to your problem? I am asking because I have a similar problem, I am trying to generate and measure a voltage into/out of an ultrasound transducer simultaneously.  Could you help me?

 

Thanks.

0 Kudos
Message 5 of 5
(3,251 Views)