Jump to content

how to subtract 2 different 2-D arrays depend on state and save


Recommended Posts

Please refer to the experimental setup picture to know what I'm about to ask.

I have a vi that is designed to acquired the signal from the Tektronik 420A oscilloscope. When the transducer is in the air, it would generate some signal, let's call it the natural frequency (or noise). I wired into an array and save it to a file, called it ARRAY A. I only need to collect this data once before running the test.

When the transducer touches the teflon [called it testing state], it would generate a different signal, and I save this to ARRAY B. I want to run this for 30 seconds, and save a waveform data for every 1 second.

So here's the question: How do I automate LabVIEW such that when the "Natural Frequency" is selected in the testing state, labview would temporary save it to an array [ARRAY A].... and when "testing" is selected, labview would save it into an ARRAY B, then take ARRAY B substracts ARRAY A and save the output?

I tried to do this (as shown in the .llb file attached), but when I switch the state from "Natrual Frequency" to "testing", the information doesn't get store in the array. Please help.

Thank you very much. I'm doing this for my senior project.

Experimental Setup:

post-11146-1206485706.jpg?width=400

Labview llb file:

Download File:post-11146-1206485356.llb

Link to comment

Anders,

Thank you very much for the reply!

I haven't test your method yet because I'm currently on spring break. However, I have a question. Does the shift register store 500 data points (voltage & time) at once or does it retain only one value at a time?

I attach the Teflon.txt file (pls rename it to .xls file) so that you can better understand what I'm trying to do.

Download File:post-11146-1206560269.txt

Link to comment

QUOTE (Anders Björk @ Mar 26 2008, 08:59 AM)

How about storing your natural freq. array using shiftregister placed on the while loop?

I agree with Anders that a shift-register could hold the background noise, but from what I can see in the picture posted, the shift-register value will change at every iteration, regardless of the measurement type.

To get this working you would have to feed the case structure, that selects running state, with the old shift-register data.

I would also suggest that the shift register is initialized by reading a previously saved background noise file.

Then there is a question whether a real measurement should be possible if there is no "natural freq" data present?

/J

Link to comment

The problem I'm having is that the substraction process takes place before the real signal is acquired. Is there any way to fix this?

What I want is to acquire the noise, store it into the shift register (if it works), then wait until the real signal is acquired before the substraction process. Please help. thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.