From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

6722 Noise

I am currently using the NI PXI 6722 module with LabView 8.2. I connected the output of the DAC to the inputs of 2 audio amplifiers. What I would like to do is to create a frequency sweep (say 10 Hz's to 50 Hz's) and output this waveform to 4 channels of the DAC. I already created the interface that can do this however, when I am sending this command to the DAC, the output waveform is not clean. Each time that I send new data points to the DAC, I observe a slight discontinuity on the waveform. This creates a large problem because it causes a thumping sound on my linear actuators. Does anybody know a way to get a clean output on multiple channels by using the PXI 6722?

0 Kudos
Message 1 of 7
(2,680 Views)

I am not familiar with the PXI 6722.

 

The general recommendation I would suggest is to make sure that every block of data you send to the device contains only complete cycles and starts and ends at zero amplitude.  The number of samples or the time duration at each frequency (or the size of the data blocks you send) may need to vary to achieve this zero crossing behavior.  I do not know how fast you are sweeping, but since you mention linear actuators, I suspect that it is not very fast.

 

Lynn

0 Kudos
Message 2 of 7
(2,673 Views)

In order to transistion between 0 amplitude levels, what would be the best way? I am currently using a general signal generator to send the waveforms to the DAC however, I cannot get real time data from this signal. 

0 Kudos
Message 3 of 7
(2,667 Views)

Is the sweep determined before you start the output? If so, you should be able to calculate the values you need in advance.

 

What is the sampling rate? What are the sweep parameters? How big is the buffer on the 6722?  It is easier to make suggestions when working from realistic numbers.

 

Lynn 

0 Kudos
Message 4 of 7
(2,646 Views)

No, the sweep is not determined before I start the output. According to the datasheet, the buffer size of the 6722 is 2047 samples.  I have attached to this post a copy of the interface that I created. 

0 Kudos
Message 5 of 7
(2,643 Views)

I do not have DAQmx so I cannot tell exactly what some of your code is doing.

 

1. Your diagram is very hard to read. Some cleaning up would go a long way toward making it easier to understand. I cleaned it up so I could follow the flow. I saved back to 8.2 but there may be errors as I am using a newer version.

2. It is generally better to initialize and close the DAQ tasks outside the loop rather than doing it repeatedly inside the loop. This could be part of your problem.  The DAQmx Timing property node needs to be inside since the sample rate can be changed while running.  Does that require the task to stop and restart? Probably. Again, this may cause your thumps.

3. The inner while loop (with Is Task Done?) will always run exactly once. i = 0 on the first iteration, causing the loop to stop.  Is that what you want?

4. If you want to always start and end evey waveform at zero, you will probably need to add some code after the for loop which processes the generated waveforms to force those zeros.  There may be problems with the noise and MLS waveforms, depending on your requirements.

5. If the user makes changes to several parameters during a run, you could get into a siituation where the loop starts the next iteration while the changes are only partially complete.  This could result in some very strange waveforms.

 

I suggest that you look at the Producer/Consumer Design Pattern.  I think it was available in LV 8.2. It uses two while loops in parallel. One loop handles the User Interface with an event structure and sends commands or messages to the other via a queue.  With this approach you could add an "Update" button. That would be pressed after all the parameters have been changed and would update everything at once.  I would also suggest adding an "Idle" or "Standby" mode where nothing is sent to the linear actuator.  Now your code is sending something most of the time.

 

Lynn

0 Kudos
Message 6 of 7
(2,629 Views)

Thanks Lynn for the help. I tried to apply the advice that you gave me in your most recent post however, I am not able to correct my problem. I found out that I have no problem creating a perfect frequency sweep by using a single channel. It seems the problem lies in the fact that when I am trying to send data to 2 or more channels, it creates this problems.

 

Thanks once again

0 Kudos
Message 7 of 7
(2,617 Views)