LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a sweep function

Hey guys, I'm working on a VI that will give me resonance info from a material. I've completed the Free Vibration and XY parts of my program. Now I'm looking for an FFT representation.

Here's my setup:

NI9215 (I'm using 2 AIs, (x,y)

200khz FG

 

I need direction on how to create a sweep function in my VI. I've read a little bit about this but im unclear.

Do I need to use an AO that directly connects to the the sweepIN on my FG?

0 Kudos
Message 1 of 12
(4,562 Views)

So there's easy and there's hard methods.  I made a pretty accurate fequency sweep function using some counters using the BNC connections of a cDAQ chassis.  Not sure if you are using an 8, 4, or 1 slot.

 

https://decibel.ni.com/content/docs/DOC-32352

 

As for using an AO you can.  But it might either have disconnuities, or might not be a very clean step of frequency.  The reason for this is you'll end up with software timing in there somewhere if you don't use an FPGA or Rea-Time system.

 

Don't get me wrong you can generate a 100Hz wave with your card and have it be accurate, that card supports that.  But changing the frequency either means stopping the task, (which sets output to 0) then creating the new task at the new frequency.  Or replacing the buffer points on the card with the new ones for a new frequency.  This won't stop the task, but the buffer size can't change.  So you may find it difficult finding a common frequency with a decent amount of steps to get an accurate output.

 

Oh lastly you could just create one buffer that does the whole sweep for you and do it in one task.  The buffer would be quite large, and you'd need to make sure you have a high enough rate, to make the steps look seemless.  All are a bit of a pain.  

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

I guess my card doesn't have a counter...I've created something using the FFT peak...It allows me to see the half power curve with ease. My only question here is: is this FFT.vi giving me a true representation of the spectrum? I have yet to reduce any data, but the graph (peak) is telling me a certain amplitute, and that is pretty close with what my fluke multimeter is telling me. If I'm on the right track, my only problem now is sampling. My peak seems to rise considerably when increasing the samples to read. (about 40%)

 

Any suggestions?

 

Edit: I have a 4 slot Cdaq with a 9215 and a 9401.

0 Kudos
Message 3 of 12
(4,516 Views)

Oh so sorry, I didn't read your first post clearly enough.  I was suggesting creating a frequency sweep from a counter or analog out.  You are looking to perform a software frequency filter correct?

 

BTW the counter on this hardware is built into the chassis not the card.  Each 8, 4, and newer 1 slots, have 4 counters built into them that are accessible from any module plugged in.

0 Kudos
Message 4 of 12
(4,497 Views)

Software would be ideal, as long as there are no drawbacks...I'm targeting the damping of materials so I would have to reduce the filtered FFT data into something that can coincide with a free vibration reduction.

0 Kudos
Message 5 of 12
(4,493 Views)

So I guess my question now is: If I use a software based frequency measurement, which FFT.vi is best for <100hz and <20v, and if I do go the hardware route, how do I connect to the chassis counter through my 9215?

0 Kudos
Message 6 of 12
(4,484 Views)

So my FG specs say that the SWEEPIN takes 0-10v, So I'm guessing that's an analog signal...If I'm right, the counter signal is a Digital signal +-5v. I was under the assumption that I could use the counter's output to sweep my FG using it's voltage...but they're different (A/G)

 

Can someone clear this up for me?

0 Kudos
Message 7 of 12
(4,440 Views)

glskinner84 wrote:

 

Can someone clear this up for me?


I'm guessing the manual for the FG could help.  I'm guessing the AI to the FG controls the sweep.  Just set it to a static voltage and see what it does.

0 Kudos
Message 8 of 12
(4,422 Views)

the SWEEPIN is voltage in, meaning I would have to use an AO. Is the RT/FPGA neccessary for applications such as mine?

 

Would it be better for me to use a software frequency sweep?

 

 

0 Kudos
Message 9 of 12
(4,384 Views)

@glskinner wrote:

the SWEEPIN is voltage in, meaning I would have to use an AO. Is the RT/FPGA neccessary for applications such as mine?

 

Would it be better for me to use a software frequency sweep? 


That is best answered by you needs, which I don't fully understand because I haven't read your FG manual.  If you are setting a static AO, or creating a predefined wave, the cDAQ can be used with a c-series module.  RT and FPGA aren't required.  

Message 10 of 12
(4,377 Views)