Automatica​lly decreasing the frequency of a sinwave in a While loop, at a set timing.

Hi,
I am quite new on labview, I just started to use it roughly a month ago.
I am trying to simulate impedance measurement (not connected to any load units yet).
I am struggling to find a proper way to change the frequency of the sinwave, after a certain length of time, to make it describe a full spectra of frequency. I don't want to change it at every iteration, but like every 80 seconds, after the start/stop button has been pressed.
To be more clear, I want to set a Max frequency, a Min frequency, and have the program dividing the frequencies by two (10000, 5000, 2500... Assuming the Max is 10000 for example) every 80 seconds. And stopping at the min frequency.
Here is the vi attached.
If you think of better way to run my .vi, please let me know.
Kentmey.
Kentmey
Attachments:
Sin wave start stop.vi ‏97 KB

The frequency is set by the 'w' parameters in your sine wave function.
So basically, you want a function that reads in the current time and outputs a frequency value starting at 10000 and decreasing by 50% every 80 seconds.
Here is a simple VI that will do exactly that.  It takes the data from Elapsed time (s) and delivers a frequency to w. 
Right now, it's set to start at 10,000 but you can wire Fmax instead. 
Attachments:
Untitled 1.vi ‏6 KB

Similar Messages

  • Is it possible to reinitialise a control value to default each time the program redo his cycle in a while loop ?

    Is it possible to reinitialise a control value to default each time the program redo his cycle in a while loop ?
    My problem is that I have a numeric control (0 or 1) and I want taht wahn the numeric is 1 labview makes the writing process of my data but after that the control must return to 0 to write only one time.
    Is it possible ? I've tried some trials but none of them succeded

    well i'm student and i have to write a program for school i don't know labview very well.
    i post here the part of the program i have to do so you can see what i must do .
    The button pass with datasocket so i can't use boolean and the problem is that the value must be set to 1 only for one cycle (one writing of the values). so when th people set it to 1 in internet explorer for exemple the value must be considered as a impulsion and as it is it always do a lot of cycle until the man set it manualy to 0 what i don't want.
    Attachments:
    exemple.vi ‏9 KB

  • How can I reset the value of an indicator in a while loop, from another synchronous while loop?

    I am running 2 synchronous while loops, one which is keep track of time, and the other is measuring periods. In the while loop that is measuring periods, I have a boolean indicator displaying whether the signal is on or off. My problem is that when the signal is off, the VI I use to measure the periods is waiting for the next signal, and displays the boolean value from the previous period measurement. While this VI is waiting, I want the indicator to display false and not the value from the last iteration of the loop.
    I am using LV 5.1 for MAC.

    Two things you can try:
    In preface to the first, the most common (perhaps ONLY) use of local variables should be in transferring data between parallel loops. This is a matter of discipline, and creates programs that are easier to understand, take less time and memory, and are just plain cleaner. Having said that, to transfer data between loops, use a local variable.
    Second solution: Instead of setting the value to false, just hide the indicator in question by using control references (property nodes for prev. version of LabVIEW). Control references are a great way to control items on a dialog or HMI screen.

  • What is the best way   for writing cursors in while loops

    i just chage my flatform from visual foxpro to sql
    for every report part using query analyser i have to make report on any tables
    suppose : - mastempno wise report
    so i heve to use cursor or store procedure in while loop
    for searching in transaction table
    so sometime i get confunsion of using cursors two times in while loop for fetching the values
    so help me for writing some simple codes for using cusrors in while loop while can fetch all values in transaction table

    Is this what u r looking for
    A Simple Cursor Example Which gives all records
    from Employee table
    Declare
    Cursor Emp is
    Select Empno,Ename
    FRom Employee;
    Begin
    For x in Emp Loop
    :block.empname := x.ename;
    End Loop;
    End;
    Regards,
    Ashutosh

  • Automatica​lly getting the cursor numbers on a histogram plot

    I am tryiong to get to the cursor values on a histogram plot.  I can see them on the screen as part of the plot features but I want to get to those numbers so i can automatically use them.

    Just to add to Jason hill's reply
    If you are using LabVIEW 8.0, then use a Cursor grab event and get the (x,y) point ant which the cursor is resting
    regards
    Dev

  • How to automatica​lly disable the wireless interface when the LAN interface is connected

    Hi,
    Is there a way to automatically disable the wireless interface when the LAN interface is connected on  R61s and X61s?
    Thank you!

    Hi,
    Thanks for the answer. I'm trying to deploy the profile that I've created on all my laptops. But i'm facing an issue for a while.
    When the profile is deployed on a laptop, Access Connections finds a new ethernet port and asks to assign it a profile. But the problem is that Access Connection don't allow me to assign it to my wired profile, only to my wireless profile and that doesn't make sens to me. Besides, it is written in the dialogue box that ethernet profiles are disable for the match of the new port...
    Is there any way to assign the new port to the new profile without human interaction or just how to make the wired profile available when access connection is launched and find a new ethernet connection
    Thanks in advance!

  • Can an Labview Executable file run automatica​lly upon the boot up of a CPU?

    I wanted to use a PC/104 to run a LABView.exe file.  So I have two quetions can a Labview .exe program be written so that it dosent need the start buttn pressed to activate it, it just runs upon execution.  And the second is that once the PC is booted can it be configured so that the .exe automatically starts?

    Hi,
    Here is a KnowledgeBase article that I think will be helpful to you as well. Have a great day!
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • Will using for loop decrease the performance

    Hi,
    Will using for loop with a query decrease the performance.
    for r_row in (select * from table) Loop
    end loop.
    This is done inside another for loop, most of the cases it returns only one value.
    will it decrease the peformance of the procedure.
    kindly advice.......
    Regards,
    Balu

    user575682 wrote:
    Will using for loop with a query decrease the performance.
    for r_row in (select * from table) Loop
    end loop.
    This is done inside another for loop, most of the cases it returns only one value.
    will it decrease the peformance of the procedure.Perhaps it is better to understand just what this PL/SQL loop construct does.
    PL/SQL is two languages. It is PL (programming logic code) like Pascal or C or Java. You can use a 2nd language inside it called SQL. The PL engine is clever enough to recognise when the 2nd language is used. And it compiles all the stuff that is needed for the PL engine to call the SQL engine, pass data to the SQL engine and get data back, etc. (compare this with the complexity of using the SQL language in Pascal or C or Java).
    So what does that loop do? The PL engine recognises the SQL SELECT statement. It creates an implicit cursor by calling the SQL engine to parse it (hopefully a soft parse) and then execute it.
    As part of the PL loop, the PL engine now calls the SQL engine to fetch the data (rows) from the cursor. With 10g and later, the PL engine is smart enough to use implicit bulk processing.
    Prior to 10g it used to fetch a row from the SQL engine, do the loop, fetch the next row, do the loop, etc. This means if there is a 1000 rows to fetch, it will call the SQL engine a 1000 times.
    With 10g and later it will fetch a 100 rows, store that in an internal buffer and then do the loop a 100 times. With a 1000 rows to fetch, it now only requires 10 bulk fetches instead of a 1000 single row fetches.
    These fetches require a context switch - as the PL engine has to step out and into the SQL engine and back, to fetch a row. This is an overhead and thus can become slow the more context switching there is.
    And this is the basics for this loop (and most other cursor loops) construct in PL/SQL.
    The ideal is to reduce the number of context switches. This is an overhead that can impact on performance.
    What about using a loop within a loop. Also "bad". This uses the outer loop to fetch data. This data is then used to drive the fetch in the inner or nested loop. So the outside loop pulls data from the SQL engine into PL variables. The inside loop pushes that very same data back to the SQL engine.
    Why? It would have been a lot faster no to pull and push that data between the loops using PL.
    It will be a lot faster doing it via SQL only. Write both loops as a single SQL statement and have the SQL engine directly drive these loops itself. This is called a JOIN in SQL. And the SQL engine can do it not only faster, but it has some froody algorithms that can be used that are even faster than a nested loop process (called merge joins, hash joins, etc).
    Bottom line. Maximise SQL. Minimise PL.*
    Do as much of your data crunching in SQL as possible. SQL is the best and fastest "place" to process data. Not PL (or Pascal/C/Java).

  • Can we place Analog in Read(AI-RE​AD) Vi inside the while loop for high sample rate like 22ks/s?

    I am using E-series Card for data acquisition.My requirement is to sample the channel, and check the 10 samples for certain condition.both at a time.What should be done can we place the AI-READ vi inside for or while loop for this purpose?

    Hello,
    Yes, you can include the AI Read.vi inside the while loop, you would just need to specify the number of scans to read for every iteration of the loop. Then, after AI Read.vi has read the data, you can do what ever kind of manipulation of the data you would like, before the next iteration of the loop. The one thing to watch out for is what ever manipulation of the data you do, be sure that it doesn't take to long whereas the buffer holding the data starts to back up. That can be checked by looking at the scan backlog output of the AI Read.vi, which will tell you how many scans have been acquired but haven't been read into your program.
    Hope this helps!
    Regards,
    Steven B.
    Applications Engineering, NI

  • The demand of my application is that i can not replace for loop with a while loop.because i need fixed number of iterations and as far as i know fixed iterations could be only with possible with the for loop.

    the demand of my application is that i can not replace for loop with a while loop.because i need fixed number of iterations and as far as i know fixed iterations could be only with possible with the for loop.
    your recommended second option that i could add true/false case.
    this true/false case must be inside the for loop or outside the for loop?if this case is inside the for
    loop, how can i send stop command from outer while
    loop?
    more over do you have any example for this please?
    thanks"

    You can execute a fixed number of iterations using a while loop by comparing the iteration count to the number of iterations you want and wiring the output of that comparison (e.g. Less Than or Equal To) to the continue (or stop) terminal of your while loop. Which comparison you use depends on personal preference, where you wire the desired count and the interation count, and whether you're using the while loop as Continue if True or Stop if True.
    Ben gave you step-by-step instructions in response to your previous question. Look here for Ben's response.
    Ben's response looks pretty good and detailed to me. It certa
    inly deserved better than a 1-star rating.

  • How to change the frequency of a finite/continuous pulse train in the program?

    Hello!...
    I am trying to modify the Finite pulse train vi example to change the frequency with respect of a ratio (1:2) of the data of a spreadsheet file as they are read one by one.
    My aim is to get the pulse train to clock a stepper motor controller, in such way that the speed of the motor increases when the data of the spreadsheet increases and vice-versa.
    I think that if I want to get the clock to change its speed, I must change the frequency and if I want it to increase/decrease like the data in the spreadsheet, I must tell the frequency that the data is increasing or decreasing in value.
    Obviously the program must do it while it is running
    Can anyone see wh
    ere I have gone wrong and/or give any suggestions?
    I have attached my vi and the spreadsheet file.
    Thanks
    Tiano
    Attachments:
    My_VI.vi ‏99 KB
    wave.txt ‏18 KB

    Tiano,
    Try to build the pieces of the program separately. Get a VI running that reads the spreadsheet and reports the data in it sequentially in an indicator (forget about the pulse generation at this time). This indicator will be wired to the frequency input of the pulse generator VI.
    You have read the data and have a transposed array. Now you must learn to use the Index Array function in a For Loop to extract the data sequentially. You will wire the increment output [i] of the For Loop into Index Array to shift from one data point to the next.
    You have a For Loop with no constant wired to [N] to tell it how many times to run. If you use Array Size to extract the number of entries in the spreadsheet data, this can be the constan
    t that tells the For Loop how many times to run.
    You are using the Tab Control in a way I have never seen before (I don't think it will work this way either. Tab Control is for presenting and hiding controls, indicators, labels, etc. on the front panel, before running the VI. They are not used to control the program functionality itself. Typically you would use a Boolean to choose between 2 options for a Case Structure.
    You can also change the path constant which selects the spreadsheet file into a control. This would allow you to browse for any file you want and eleiminate the need for the Case Structure altogether.
    Mike

  • T520 - How to decrease memory frequency

    Hello everyone,
    I am lucky owner of T520 with Intel 2620M processor and 4Gb of memory onboard.
    One day I bought memory kit Kingston "Hyper X" KHX1600C9S3P1K2/8G (2*4Gb) and thought "memory supports 1600 and 1333Mhz, and my laptop needs 1333, so it will select correct frequency automatically".
    But there started problems - processor initiated new memory with frequency 1600Mhz, and all the system now works unstable. I have errors in Windows 7 memory test. By the way, I tried to check memory pieces apart each other, and in single mode they work fine. SO I think that processor's memory controller is loaded too much in 'dual channel'
    So my question is - how can I decrease memory frequency on Lenovo T520 laptop? I was confused, but in BIOS there is no option to change frequencies like it is on Desktop PC...
    Thanks. 

    hey akvamassa,
    with regards to this, we would advice you to contact our support team via :
    http://bit.ly/LNVsuppNum
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    Have you checked out the Community Knowledgebase yet?!
    How to send a private message? --> Check out this article.

  • One of the frequencies on Verizon FIOS TV does not work, and I can't get certain HD channels

    So I've had two techs out to check the box outside my house where the wire comes in from the pole.  The problem is I cannot get HD TBS, TNT, Fox Sports 1, Comedy Central and many other channels.  These channels come in over the frequency that kicks out a fault (I saw when the 2nd tech came in and hooked my coax from the box outside my house directly into the tester)
    The tech confirmed it was not coax in my house, but connections outside.  he changed those connections and then all of a sudden it worked.
    Two days later, not working again.
    Verizon is incapable of figuring this out or setting me up with an appointment that is not in the middle of the work week at 2pm (i've already taken two days off from work to try and get this fixed...shall I just take a week long vacation and devote it to them?)
    Anybody ever run into this and figured out a way to fix it yourself, since Verizon hasn't a clue?
    thanks

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.
    Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions.
    To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

  • When I try to sync my iPad and iPhone it will get within the last 3 pictures then stop giving me an APPCRASH error message. Then iTunes will shut down. No matter what I do to increase or decrease the number of pictures it always stops 3rd from the last.

    When I try to sync my iPad and iPhone it will get within the last 3 pictures then stop giving me an APPCRASH error message. Then iTunes will shut down. No matter what I do to increase or decrease the number of pictures it always stops 3rd from the last.
    Problem Event Name:             APPCRASH
    Application Name:                  iTunes.exe
    Application Version:               10.4.0.80
    Application Timestamp:          4e262cfr
    Fault Module Name:               QuickTime.qts
    Fault Module Version:             7.70.80.34
    Exception Code:                     c0000005
    Exception Offset:                    00146b30
    OS Version                                                            1033
    Locale ID:
    Additional Information 1:          0a9e
    Additional Information 2:          0a9e372d3b4ad19135b953a78882e789
    Additional Information 3:          0a9e
    Additional Information4:          0a9e372d3b4ad19135b953a78882e789
    Any assistance I can get will be greatly appreciated.

    Thank you iTunes for fixing the problem of downloading my pictures to my iPad and iPhone with the update 10.5.0.142

  • How to change the frequency of pulse train on the fly using an array of values?

    Hi all!
    First I want to thank U for the great job you are doing for this forum.
    Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
    1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
    date with each element every 10 millisecond?
    2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
    Please note that I must use the values as they are.
    Can someone please built a good example for me? Your help will be appreciated.
    Regards
    Chris
    Attachments:
    number_of_steps.txt ‏17 KB
    frequency.txt ‏15 KB

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

Maybe you are looking for