Dai Posted March 27, 2008 Report Share Posted March 27, 2008 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: Labview llb file: Download File:post-11146-1206485356.llb Quote Link to comment
Anders Björk Posted March 27, 2008 Report Share Posted March 27, 2008 How about storing your natural freq. array using shiftregister placed on the while loop? Then will be stored there until a new natural frequency test is done. Quote Link to comment
Dai Posted March 27, 2008 Author Report Share Posted March 27, 2008 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 Quote Link to comment
Anders Björk Posted March 28, 2008 Report Share Posted March 28, 2008 What you wire to shift-register is what is hold by the register,unless you have broken wires (this happen if it not the same datatype on left and right side). It is an array that is save in register in this case. Quote Link to comment
Mellroth Posted March 28, 2008 Report Share Posted March 28, 2008 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 Quote Link to comment
Dai Posted April 2, 2008 Author Report Share Posted April 2, 2008 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! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.