Extract Signal Tone Information in Control & Simulation Loop

Hi,
I have a simple Block Diagram to try Control & Simulation Loop. I added a Sine Wave signal and a Waveform Chart connected to it. They work just fine.
I tried to add a Extract Single Tone Information , from Signal Processing, and connect it to the output of the Sine Wave generator but I do not know how to create a proper Time Signal.
I thought of storing the output of the Sine Wave in an array but I was unsuccessful since I could not add any shift register to this type of control loops.
Any help or suggestions?
Thanks
Attachments:
Control_n_Sim_Test.PNG ‏9 KB

Hi Siamak,
Thanks for your reply mate.
However, when I built a same BD as you posted on, it somehow didn't work. I also attached a photo of my BD here.  I used the gauge to measure when I run the programme. The gauge shows there is no signal output after the "collector"VI (gauge no.13). would you please check it for me? Many thanks!
BR
Floyd
Attachments:
tone info extraction.png ‏134 KB

Similar Messages

  • Extract Single Tone Information using Flat Top Windowing

    Beginner here - Does anyone have any ideas on what would be the easiest way to create a function that would essentially perform the same function as the built in "Extract Single Tone Information.vi" only that instead of using Hanning windowing (as I noticed that this Vi does) I would be able to use Flat Top (or selectable windowing)? I basicly need to set something up that will accept an incoming Sine wave and apply FFT using Flat Top windowing then output the measured frequency and the amplitude of that frequency. I need to still be able to input the "advanced search" criteria into the VI and give it a frequency and tolerence to look for as I don't want to just look for the peak signal but at specific frequencies. 

    I am running Labview 7.1.1 (that's what my company uses and they refuse to upgrade). I can't open files built under anything newer than LV7.1.1.
    I really don't want to just do a peak search of the entire spectrum and would rather enter a specific frequency to look for and the tolerance window (find peak at say +/- 2% tolerance away from known recorded frequency. This test is targeted as a production test we will be shipping to several parteners around the world to use in production. This will be a test fixture to perform testing on electret boom microphones. The fact that it will be used in a production environment there is potential for high levels of background noise (radios, floresent lights, people talking, etc) and therefore I need as much filtering as possible to only the frequency i am trying to measure. I will be outputting a specific frequency from a speaker and recording it back through the microphone under test via a NI USB-6211 DAQ.
    Can anyone tell me if "Extract Single Tone Information fron Hann Spectrum.vi" has anything in it which would limit me to only inputting a Hann windowed FFT into the signal input of that VI? This is the VI which is password protected in my 7.1.1. copy of Labview. If it doesn't and I could feed it a Flat Top windowed FFT signal into it without problem I am golden. I can modify the other sub-vi ("FFT with Hanning") and the main "Extract Single Tone Information 1CH.vi".
    Thanks for you continued input. 
    P.S. I am fairly new to Labview (<2yrs)

  • Référence de phase de la fonction "Extract single tone information"

     Bonjour !
    J'utilise actuellement la fonction "Extract single tone information" pour calculer la phase d'un signal acquis avec un DAQ 6211. J'aimerai donc savoir quelle est la référence pour calculer la phase du signal ? J'ai ouvert la fonction et les sous VI qui la compose mais je vous avoue que la compréhension de cette fonction dépasse mes compétences (je suis étudiant à la fac en L3). 
    J'utilise notamment cette fonction pour réaliser un phasemètre donc j'ai récupéré la phase de 2 signaux déphasé (par l'intermédiaire d'un DAQ 6211) avec cette fonction et j'ai soustrait "phase2-phase1" pour avoir le déphasage, mais le résultats rendu est tantôt une valeur "phi", tantôt "phi-360". 
    Merci par avance de vos réponses !

    Bonjour,
    Pour vous aider à utiliser le VI "Extract Single Tone Information", vous pouvez consulter les exemples qui permettent d'illustrer le fonctionnement du bloc dans son contexte.
    La localisation de ces exemples se situe dans l'aide (tout en bas). Voici le lien direct : Extract Single Tone Information VI
    Cordialement,
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Extract Single Tone Information - phase step

    Hello!
    I am using Extract Single Tone Information to measure amplitude, frequency and phase of a slowly varying signal.
    But sometimes the phase jumps ~350 degrees for no apparent reason. I have made a small vi (in LabView 8.5 professional) to demonstrate this, see attachment.
    Seems like the shift occurs when the ends of the input signal cross each others level, in opposite directions.
    Guess I should start looking for an alternative method for doing the measurements.
    Any suggestions or ideas are most welcome.
    Attachments:
    phase_test.vi ‏30 KB

    Hi Thomas
    It jumps 360 degrees to be exact. -180 degrees and +180 degrees is basically the same thing so the phase you are seeing is correct. It does not look very good in a chart though. To improve the looks you can use the subVI called "Unwrap phase".
    Regards
    Øyvind Ø 

  • Control & Simulation Loop failed to compile

    Dear Forum Members,
    I have a problem with a Control & Simulation Loop program (attached) that just doesn't compile & run.  I believe that the problem is associated with the 'Feedback Node' at the bottom of this Control & Simulation Frame since if this is taken out the program will run ok.
    Can anyone please advise me if this 'Feedback Node' is incorrectly used or in violation of anything.  I have tried various ways to overcome the problem i.e. initialising it at the start but nothing works.  The error message that I received just says "VI failed to compile".
    Appreciate any help with this.

    Hello bunnykins, 
    The Feedback node really isn't a supported function in control design and simulation. The behavior you're reporting, and the work around are both documented in the know issues of the module here: 
    201449
    Return
    A Feedback Node on a Simulation Diagram causes the VI to fail to compile
    The Feedback Node does not make sense semantically within a Simulation Diagram, due to the fact that most ODE Solvers will execute the diagram multiple times per iteration and may need to reject steps and try again, filling the Feedback Node with bad data.
    Workaround: Use the Memory block from the Simulation Utility palette. If a delay of greater than 1 is desired you can chain multiple memory blocks in sequence.
    Reported Version: 8.5
    Resolved Version: N/A
    Added: 07/31/2010
    Applications Engineer
    National Instruments
    CLD Certified

  • Simple counter within Control & Simulation Loop

    Does anyone know a simple way of creating an incremental counter within the Control & Simulation Loop ? It's not possible to have a For loop within the Control & Simulation Loop hence the shift register method is out.

    The "simulation parameters" function on the utilities pallete outputs a "Timestep Index" that is incremented each step. That's the simplest option. Alternatively, you could use a sub VI that executes on major steps and contains a for loop.

  • Extract Single Tone Information.vi configuration help

    Hello.
    I am trying to measure speed from a sensor that outputs the speed directly to
    frequency (i.e. 500 Hz = 500 RPM).
    I am using the Scaled Window.vi with Hanning and the Extract Single Tone
    Information.vi to get the frequency.
    I successfully measured to about 500 Hz with the default settings.
    My range is from 0 to 2500 Hz.
    The only settings I can find that seem to let me configure sampling is the
    approximate frequency and search (+/- % of Fsampl.)
    These defualt to -1 and 5 respectively.
    I assume this means no default frequency, or 0 and the sampling rate is 10000
    (500 / 0.05).
    I changed the approximate frequency to 1250 (my center frequency) and the
    percent to 12.5 (10000 / 1250 ).
    This resulted in labView only reading one seemingly random value or not updating
    this measurement.
    After putting -1 in the approximate frequency again, I was able to read values
    higher than 500, but they folded around 500 (i.e. aliasing).
    How do I change the settings or use another vi to get the range that I need?
    Thank you,
    Electro-Frog

    Thank you very much mfitzsimo…,
    That did the trick. It has been so long since I changed the sampling rate, that I forgot it was there.
    Apparently the Extract Single Tone Information does all the calculations for you, based off the sampling rate of course.
    I bumped it up to 10000 samples/sec from 1000 (where the 500 folding came from) and I could read everything my function generator could put out.
    Electro-Frog

  • Using Extract Single Tone Information to detect phase

    Dear all,
    I have problem using Extract Single Tone Information vi to detect phase angle of a sine wave. 
    I posted similar question a few days ago regarding using the same vi to determine phase angle of a square wave and realised it couldn't be done because square wave is not single tone. I modified my program slightly and use it to examine a sine wave but I still couldn't get reliable results. 
    Please find the attached for the program code. When I set frequency to 5 Hz, everything worked fine but when I set it to 5.17 Hz with 20 degree phase, the detected phase value keeps changing.  Appreciate if you could help me on this matter. Thank you very much!
    Best regards
    Attachments:
    SineWavePhaseAngleTest.vi ‏28 KB

    Hi looloo,
          Sorry for slow response!  Here's the VI back-saved to LV8.2
    (in case It's not too late to help...) 
    The "phase" output reflects the "angle" associated with the beginning value in the Y-array (when Y = amplitude, Phase is 90deg.)
    Phase is changing because sine-wave (Y-input) is shifting each time single-tone is called...
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    SineWavePhaseAngleTest[1,LV8.21].vi ‏38 KB

  • Extract Single Tone Information from Hann Spectrum

    I need to examine the details of "Extract Single Tone Information from Hann Spectrum.vi" but i couldn't because it is password protected. How can i remove this password?Is it NIs strategy to set the password to some vi's?.Or is there any other function behaving like "Extract Single Tone Information from Hann Spectrum.vi" so that i can see inside?
    Regards.

    I have attached a Power-Point presentation from NI-Week 1999 that describes the algorithm concept and performances. Note that the function shipping with LabVIEW is more complex (and more accurate) than the one described, but I hope this will give you a good idea on how things are implemented.
    Attachments:
    tm3bb.ppt ‏1174 KB

  • Does the Extract Single Tone Information.vi only find the fundamental harmonic?

    I capture a waveform that only has 1 frequency.  If I use the Extract Single Tone Information.vi to extract a single tone, is this single tone the fundamental harmonic?  And if I feed the residual portion of the waveform into the Extract Single Tone Information.vi, will the next tone be the second harmonic?  And so on?  Is it possible to compute the total harmonic distortion just by feeding the the waveform into the Extract Single Tone Information.vi over and over again (only feed the residual waveform into the vi continously)?
    Message Edited by solitude on 08-18-2005 09:28 AM

    Notice the title of the vi:  Extract SINGLE Tone.  It is expecting only one frequency.  This vi is not intended to handle a carrier frequency or audio with harmonics.  You say that you capture a waveform that has 1 frequency.  If this is so, then there should be no harmonics.  To measure harmonic frequencies, you must perform spectral analysis.  To measure total harmonic distortion, there exists a THD vi in the Waveform Analysis palette.
    - tbob
    Inventor of the WORM Global

  • Control & simulation loop, VI failed to compile

    hi!
    I want to simulate asynchronous generater. but I cant run my VI. It failed to compile. I have read some reason in this forum but I cant fix It. who can help me!
    the name of main VI is: mpdb_2.vi
    thanks you!
    Attachments:
    MPDB_2.zip ‏1951 KB

    Which version of LabVIEW are you using?
    In 2013, the error says: Tmech_Ef_1.vi 'Tmechc_Ef':subsystem has illegal term names. And in analyzing the subsystem, I noticed that the Enum where you choose "EF or Tmech" has a "2 <space>" as a label.
    To fix this, just put simple name without spaces in the beginning or the end of the name. In doing this, the VI is runnable.
    Now, another note: I noticed you are trying to pass paraemters between Mathscript and Control Design and Simulation. We have a feature called Parameter Hierarchy that you can just transfer information between both Models of Computation without going through the wires. Also, we do have a plug-in for Mathscript that you can just use for this purpose. Please see shipping examples in the links below and documentation for more information:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Mathscript Integration
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Get-Set Model Parameters
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • How to connect meter to o/p of extract single tone information

    plz tell me how to do this....
       thanks in advance

    Just wire it. Your (poor) question speaks volumes about your lack of experience. Have you taken the basic tutorial?

  • Memory function in Control and Simulation loop - ODE solver problem

    Hello,
    I am currectly using the control & simulation loop to simulate the behaviour of what is essentially a spring-damper-mass system. In the process the change in time (dt) is being used to integrate an arbitrary value. I am using a built in memory function to store the time, to calculate the time change (dt).
    The simulation is rather complex, due to the necessary accuracy needed, not all the ODE solvers can handle it. Currently I am using Adams-Moulton method, this works fine for the simulation. However it cannot detect the change in time, the change is constantly zero. This problem worked it self out by using another ODE solver, but then the simulation was rather messed up (even when I tuned the step sizes and tolerances). So I am quite confident that Adams-Moulton is one of the best suited ODE solver for the problem at hand.
    Is there another way to store the previous time and use it calculate the time difference, than using the memory function? Has anyone experienced such problems before?
    I have been doing alot of error searching using the probe, but I am quite sure that there is a problem with the ODE solver and the memory function. See picture below, showing in basic how the change in time is being calculated.
    I am rather new to LabVIEW, so if there could be something else I have missed I will be glad to hear it.
    PS! I have tuned the minimum step size/relative and absolute tolerances for the Adams-Moulton to simulate the behaviour of the system correctly.
    Solved!
    Go to Solution.

    Hi Willy,
    I am sorry, I can not upload the VI some of the content is confidential. I have attached a larger picture of the section were the change in volume and time is calculated, dV and dt. Also I have marked the two memory functions used. Hopefully this can help.
    My parameters:
    - ODE solver Adams-Moulton
    - Relative tolerance      1e-8
    - Absolute tolerance     1e-7
    - Minimum step size     0,0005
    - Maximum step size    0,01
    - Initial step size           0,01
    - Auto discrete time      On
    - Decimation                 0
    - Synz loop to timing source off
    Attachments:
    06-05-2014 21-20-00.png ‏52 KB

  • DAQ Assistant with multichannels causing Simulation Loop slow?

    Hi, another LabView newbie here.
    I have in a Real Time Target (NI 9132)  a Control & Simulation Loop with DAQ Assistant block inside, whose signals are fed into a Discrete State Space block. The discrete state space model has 1 second time step. I have set the Simulation Loop parameters so that it executes every 1 second as well (see Fig. A below). *sorry for the big white gap under the figures..
    The DAQ assistant acquisition mode is set as "1 Sampe (On Demand)".
    However, when I run the VI, the plot seemed to be updated much slower than 1 second rate. To confirm this, I put an "Elapsed Time" block inside the Simulation Loop. The "elapsed time" shows the actual time in seconds while the simulation plot show slower time (see Fig. B below).
    I tried to isolate the problem by removing the block one by one. Finally, I found out that this problem was caused by (at least) the DAQ Assistant which acquires multichannels data of NI 9214. When I remove some channels and leave one or two channels, the VI runs at the actual time (see Fig. C below). But when I added more channels reading, it became slower again. 
    Here is the snippet of the block diagram (after all other blocks were removed):
    What am I doing wrong here? I'm going to use all of NI 9214 channels so how not to have similar problem like this?
    I look forward to hearing any relevant comments from the members. Thanks in advance.
    Tian

    Hi Tian,
    why do you need a Sim loop anyway?
    - When it comes to speed you shouldn't use the DAQAssistent. Use basic DAQmx functions…
    - Use parallel running loops for each task. Put DAQmx functions in their own loop, running in parallel to your Sim loop…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Measuring frequency or amplitude using extract single tone informatio​n

    Hi All,
    I'm trying to read speed of a drill and was hoping that I could use the information extracted from Extract Single Tone Information to get to the speed.  However, when I run the attached code while the drill is still off I get Inf for frequency and 0 for amplitude (the waveform chart shows numbers in the 0.21 range - see attached picture).  When I turn on the drill the signal amplitude as viewed on the waveform chart jumps to ~4 range, but the frequency continues to read Inf and the amplitude 0.  Am I missing something, or using the Extract Single Tone Information incorrectly?
    Thanks!
    Attachments:
    Drill Encoder Test.vi ‏21 KB
    Drill Turned Off.JPG ‏38 KB
    Drill Turned On.JPG ‏40 KB

    Hi,
    Thanks so much for your quick response.
    As to point 1, I actually see data come in, over time.  I could only capture a snapshot of it, hence the photo, but if I continue the run data continues to come in over time.  I believe I've fixed the array vs waveform issue (see my modified code).  I ended up with that because I was trying (out of desperation) different Analog Wave form function.  I'm seeing lots of data, but no actual numberical values for frequency of amplitude.
    Thanks again!
    Attachments:
    Drill Turned Off 2.JPG ‏42 KB
    Drill Turned On 2.JPG ‏40 KB
    Drill Encoder Test.vi ‏21 KB

Maybe you are looking for