LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need some guidance: Looking to capture periodic signal

Hi guys,

 

I am trying to build a VI that acquires a 5-10 minute signal, once per hour. I know this sounds odd, but there is some sort of random electrical noise associated with the amplifier I am using, and I am trying to determine where and when the noise is occurring.

 

I have a VI that successfully records the input signal, but I looking for the best way to periodically turn on and off the data acquisition. I was thinking a case structure with a timing range might work... or possibly a secquence structure?

 

Any recommendations would be greatly appreciated. I am fairly new to labview and am still unfamiliar with the best methods.

 

Thanks in advance!

 

Ben

0 Kudos
Message 1 of 5
(2,757 Views)

Without seeing any code, here are some comments based on LabVIEW itself.

  1. Take your code that "works" to take some data (at whatever data rate, and for however long you find useful).  Have it write that data to a file, and consider giving the file a name that includes, say, the time the data were saved.
  2. Make that code a sub-VI.  This is easy -- it is already a VI, all you have to do is provide an Error Line In and Out (the usual way to tie LabVIEW VIs together) and make sure the original VI can run without requiring "manual intervention" (i.e. you don't have to push a Start or Stop button).  If you do have a Start button, just change the VI so it starts without waiting for the button, and if you have a Stop, replace that by stopping after N samples (you determine N).
  3. Now write a second VI that has a "Do until I tell you to Stop" (or "Until an hour is up") loop.  Inside the loop put a call to your Sample sub-VI and a Wait function to govern how long you want to wait before taking another set of samples.

Note that if you look at the VI you wrote in Step 3, there's nothing there that says anything about writing files, sampling data, etc. -- it has all been "buried" (or, as is more proper to say, "encapsulated") in the sub-VI.  This way, you can look at the top level VI, which is concerned only with taking the multiple readings you want, while the lower sub-VI doesn't care about repetitive readings, it only is concerned about its little sampling task.  Divide and Conquer!

 

BS

Message 2 of 5
(2,745 Views)

Ben,

 

Do you have a way to identify when the interferring signal occurs? Is it known timing or some characteristic of the signal, such as high amplitude or a different frequency spectrum?

 

My first thought would be to set up a continuous acquisition and only record the data when the interference occurs (plus a bit before or after for comparison).

 

Lynn

0 Kudos
Message 3 of 5
(2,744 Views)

Hi John,

 

I the interference seems to be completely random. I work in an engineering building on my campus, so options include the amp's power being drawn when something else in the building is activated, or possibly just a faulty amp.

0 Kudos
Message 4 of 5
(2,732 Views)

Bob

 

Thanks for the detailed response! I never even thought of using my current code as a subVI.

 

I will give this a shot and post here if I have anymore questions!

 

0 Kudos
Message 5 of 5
(2,731 Views)