Graph of Variables elegant vs time

Just to prove how much of an absolute gumby I, I'll post this very basic question.

See attached VI.  It is a graphical vs variable of time.  Delta t varies, so I can't use a unique value for the delta time.  I'm guessing that there is a simpler and more elegant way to accomplish what I'm doing.  If you know of one, your help would be much appreciated.

Thank you!

The image above shows how to use a table, but the ideas are the same for charts.

This image came from this thread.

Ben

Tags: NI Software

Similar Questions

  • Set a Variable for a timer with a cursor

    ... In a previous post, I got a big hint of kglad.

    I had thought to be closer to the final solution, but I need a little more distance (certainly the last) of my script.

    It covers how to have a variable for a timer.

    I need to get the variable from a cursor.

    I tried the script below, look to MyVar (line 5, 9, 16), but it does not work,

    The timer is always 1000.

    1 import fl.controls.Slider;

    2 import fl.events.SliderEvent;

    3 import fl.controls.Label;

    var MyVar = 1000 4;

    5 aSlider.addEventListener (SliderEvent.CHANGE, changeHandler);

    ___SLIDER

    function 6 changeHandler(event: SliderEvent): void {}

    7 MyText.text = event.value;

    8 track (event.value);

    9 MyVar = (event.value);

    10}

    11 //__________________________________________

    12 var myNum: number;

    13 var mySound: Sound = new Click1();

    14 var mySound2: Sound = new Click2();

    15

    16 var fl_TimerInstance: Timer = new Timer (MyVar, 8);

    17 fl_TimerInstance.addEventListener (TimerEvent.TIMER, fl_TimerHandler);

    18

    Button.addEventListener (MouseEvent.CLICK, ButtonCount) 19.

    20 ButtonCount(event: MouseEvent) function: void {}

    21 fl_TimerInstance.reset ();

    22 fl_TimerInstance.start ();

    23

    24 //trace ("trascorsi secondi:" + fl_SecondsElapsed);

    25 //fl_SecondsElapsed++;

    26}

    27 fl_TimerHandler(event: TimerEvent) function: void {}

    28 if (event.currentTarget.currentCount % 2 == 1) {}

    29 myNum = Math.ceil (Math.random () * 8);

    30 record (myNum);

    31 / / mySound.play ();

    32} else {}

    33 / / mySound2.play ();

    34 trace (myNum);

    35}

    36}

    use:

    1 import fl.controls.Slider;

    2 import fl.events.SliderEvent;

    3 import fl.controls.Label;

    var MyVar = 1000 4;

    5 aSlider.addEventListener (SliderEvent.CHANGE, changeHandler);

    ___SLIDER

    function 6 changeHandler(event: SliderEvent): void {}

    7 MyText.text = event.value;

    8 track (event.value);

    9 MyVar = (event.value);

    fl_TimerInstance.delay = MyVar;

    10}

    11 //__________________________________________

    12 var myNum: number;

    13 var mySound: Sound = new Click1();

    14 var mySound2: Sound = new Click2();

    15

    16 var fl_TimerInstance: Timer = new Timer (myVar, 8);

    17 fl_TimerInstance.addEventListener (TimerEvent.TIMER, fl_TimerHandler);

    18

    Button.addEventListener (MouseEvent.CLICK, ButtonCount) 19.

    20 ButtonCount(event: MouseEvent) function: void {}

    21 fl_TimerInstance.reset ();

    22 fl_TimerInstance.start ();

    23

    24 //trace ("trascorsi secondi:" + fl_SecondsElapsed);

    25 //fl_SecondsElapsed++;

    26}

    27 fl_TimerHandler(event: TimerEvent) function: void {}

    28 if (event.currentTarget.currentCount % 2 == 1) {}

    29 myNum = Math.ceil (Math.random () * 8);

    30 record (myNum);

    31 / / mySound.play ();

    32} else {}

    33 / / mySound2.play ();

    34 trace (myNum);

    35}

    36}

  • How to insert as an entry within the formula variable, the total time on the scope window?

    How to insert, as an entry within the formula variable, the window of total time on the scope (i.e. of 20ms/div x 10 div = 200ms)?

    HERE'S A SAMPLE QUESTION:

    FORMULA FOR INTEGRAL ACTION:

    STATISTICS:

    Input variable: DPO4034 (CH1);

    Box: number of samples.

    FORMULA

    Input variable 0: DPO4034 (CH1); alias: x 0

    Input variable 1: 'time window Total out of scope?. " alias: x 1

    Input variable 2: number of samples (CH1); alias: x 2

    Under the operation Configuration: formula

    Y = (x 0 ^ 2) *(x1/x2)

    Output: Data 1 (CH1)

    THEN, WITH THE HELP OF STATISTICS:

    Input signal: data processing 1 (CH1)

    Checkbox: SUM

    Output: CH1 integral Action [has ^ 2s].


  • Why it takes so long to open a connection to a shared variable, the first time?

    Hello

    I have an application to large scale developed with LabVIEW DSC, which covers multiple computers on a LAN.  In one of the VI I open variable connection shared by using the "open Datasocket' VI.  I notice that after restarting my computer and execution of this VI into the source code (I have not tried with an executable file yet) it takes about 20 seconds to get a successful connection to a variable share located on another computer.  The later 'Datasocket Open' claims the same computer to the same shared variable takes much less time, about 100 ms.  I reproduce this with 3 different computer, so the behavior seems to be reproducible, but it's not to do it every time but very often.  This scenario may occur also when I did not open a connection to another computer for awhile.

    Anyone have this experience? Is there something I can do all this to avoid this 20 seconds delay problem? Anyone have an explanation?

    All of my computers running Windows 8.1.  I'm using LabVIEW 2012.  All my firewalls are 'off '.

    Thank you

    Michel

    Here is a picture of my open VI.

    Recently, I did this for another client. You can emulate a timeout (and actually connect faster) by using the function "open in background" and then checking the variable.connected? property.

  • XY graph sometimes takes a long time to update legend

    Hello

    I wrote a small piece of code that highlights (changes line width) the plot on the graph when we click a mouse on its name in the legend of the plot. The code works well except when I the legend scroll bar is visible and its position is not 0, then when I click on the name of the parcel, the chart takes a long time(>4s) to change the width of the plot on the legend. The plot on the graph is updated instantly. Its only the legend of the plot that takes a long time to get updated.

    I enclose the code here... Please, run it and see if you also see the same behavior.

    Thank you

    Ritesh

    Hi Ritesh,

    The patch of f2 is already released. http://www.NI.com/download/LabVIEW-development-system-2015/5656/en/

    We will inform you of the R & D of your first question, but unfoturnately we cannot provide information on future products releases.

    Kind regards

  • BPEL variable, take the time to 1 min just for the assignment of value in the Assign activity

    Hi all

    We get a strange question in BPEL production environment.
    In the assign activity, there are 3 variable hardcoded with some default values.
    At runtime, a variable is to take more time from 1 minute to initialize just this default value.
    We do not get this problem of time in Dev and Test environments, so we are not able to test this.
    Please look in the Audit trail for the BPEL instance in the Production environment.
    Request to let me know if them work around or fix for this issue.



    Thanks in advance,
    Kumar

    Hello

    Yes, you can get to know the time for the verification that frm trail... u can also make use of activity sensors to calculate the exact time.

  • How to pass a value to a variable at the time of the execution of the script

    Hi all

    I need to establish an ODI scenario, with below requriments.

    I have to move the data from flat file to target DB.

    flat file name is not consistent, it must pass the file at the time of the excution of scenario name.

    All could help me how to build this ODI scenario.

    Appreciate your help.

    In the data store where the filename in the "name of the resource', you enter a variable #myVar

    You must recompile your script after that this change was made.

    And when you run the script, follow the «-Project.myVar=c:\filename.txt settings.

    Probably, this link may help you http://blogs.oracle.com/dataintegration/2009/04/using_parameters_in_odi_the_dy_1.html

  • How a class can access a variable on the time line of MovieClip?

    in my class, I declare a linked clip:

    a_mc = new LinkedMC ();

    trace (a_mc.testString);

    and on the time line of LinkedMC:

    testString var = "test string";

    but I can't access test string.

    clues?

    Thank you!

    you try to access the variable before it is defined.  have your LinkedMC send a rental event your knowledge the variable has been set and assign a listener to a_mc to detect this event.  in the listener function, use your trace() function.

  • Problems with the use of variables at the time of the SV - Loudness.vi

    Hello

    I'm rather new to Labview and will have questions, get my Time-Varying Loudness calcuations out correctly. Attached is my current VI and a .csv file of my data set (calibrated in PA. sampling frequency = 50 kHz for 5 seconds). It does not produce what I expected when I run the VI. Here are my questions:

    Time-Varying Loudness:

    (1) what are the signals so much? There are hundreds of lines, but I only expect one.

    (2) why my category axis are not a range from 1 to 24 years as bark should be?

    1/3 octave Band Analsysis:

    (1) why is it incorrect? Them should not be a linear increase the frequency...

    Data on the one hand be hurry and make a squeek. It is a transient noise that happens about 2 seconds. But, how could I go do a waterfall (Time (s), Frequency (Hz), Amplidtude (sones)) of this signal? Is there an easy way? or do I have to do all three signals and add to make a parcel?

    Thank you very much for your help! Let me know if you need more infromation,

    -Troy

    p.s. I have included a picture of the results as well.

    Hi Troy,

    (1) the SV specific volume VI 'chunks' given in blocks of 2 ms and returns then these as individual plots specific Loudness vs. Sone.  The colored lines that you see in your chart are representative of the 2 500 2 periods of time ms in your acquisition of five seconds.  Each of these plots contains 241 points, however they are ten sample "gradually", one for each sone.  The digital filter buffer takes a bit to fill and kick in properly, however, so you can give your first rows (0-. 02 seconds or more) scrutiny before using them - you can see a number of unexpected zeros around the lower sones.

    2) since you use a chart, the x-axis will be increments every race following (the previous data is stored.)  If you only want to display the most recent data, I would recommend switching to a chart, which is found in the chart controls palette.  Also, see above (#1) why the x axis are longer than 24 points.

    (3) remember that dB is a unitless measure and cannot be used in reference to another value. A typical reference for sound is 20 uPa, but you will probably need even out your data entry and determine/set dB reference.  You can take a look at the voltage from the snout to the Cloaca EU.vi scale (EU means equalized units) and from the snout to the Cloaca Set dB reference.vi.  In your case, I think the plot of Octave shows your dB from a default value of 1.  The values should be accurate with respect to the other, but you must provide a reference value to calibrate the scale.

    (4) I think that this VI is a good example how to do to create a cascade:

    Display cascading for Octave (DAQmx)

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/5562

    You will need to break up of your waveform into pieces, just like the specific volume VI, but the basic concept is roughly the same (take piece of waveform, take octave measure of the piece, add octave output measure cluster to cluster table, repeat for the rest of the waveform display)

    Phew!  It was a bit of information.  Let me know if this makes sense and don't be intimidated by the detail and/or unknown functions or methods - you're definitely on the right track, or to ask it to at least the right questions.

  • How to see the variable data in time debugging the procedure in Toad oracle 9.1

    Hi all

    I'm not able to see the data variable at the procedure of debugging in Toad oracle 9.1.
    Any help would be appreciated.



    Kind regards
    Prakash P

    Published by: prakash on May 30, 2011 01:37

    Published by: prakash on May 30, 2011 01:37

    Published by: prakash on May 30, 2011 01:37

    You might be aware toad is not a product of Oracle, so you need this post on the forums of quest, http://www.questsoftware.com

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • Variable results on timer

    I used the following code for a function for monitoring the progress of the playhead to images where I propose a delay...

    function to stop the playhead to a frame with the script below...

    function freezeTimeline(howLong:Number):void {}

    Stop();

    var t:Timer = new Timer (howLong, 1);

    t.addEventListener)

    TimerEvent.TIMER,

    {function(Event:TimerEvent):void}

    Play();

    }

    );

    t.Start ();

    };

    script to add to the image where you want to the playback head to stop

    the value in parentheses is in milliseconds (4 seconds in this case)

    freezeTimeline (4000);

    It works fine when it is in a separate file with no other code.

    However, when I do a number of clips containing this code and incorporate it into a movie, sometimes they'll delay OK and other times they play totally ignoring the delay and even the final "stop();" is ignored and the clip starts from the beginning again.

    It has left me speechless!

    Asked for an opinion.

    Kind regards

    Tom

    There are two issues I see with your code.

    The first is that you create instances in the front, then add to the form later.  While they are sitting there as they run in spite of do not add to the display list.  You don't want to instantiate them until you need them.  Then move all your: var copy # = new text # (); with the code where you addChild(copy#) on the screen.

    The second is that your code is nested and it must break bad habits like that.  If you must keep a reference to something for a handler there are other ways to deal with such as how I show below, stating t outside of functions...  Try to change your first code of chassis for...

    var t:Timer;

    function freezeTimeline(howLong:Number):void {}
    Stop();
    t = new Timer (howLong, 1);
    t.addEventListener (TimerEvent.TIMER, playOn);
    t.Start ();
    }

    function playOn(event:TimerEvent):void {}
    t.removeEventListener (TimerEvent.TIMER, playOn);
    t = null;
    Play();
    }

    freezeTimeline (1000);

    And your following frames does not have the function call, not stop(); with the exception of the last image.

    Please note that I can't test your file, so I could easily be missing something.  In any case, I'll be closing shortly.  If you continue to have problems, maybe someone else will come along and things of the give a look.

  • How to get the value of the variable at run time

    Hello Experts,

    I have a select statement where one of the column name is a variable I need to assign to the execution.

    How can I do and is this really possible?

    For example
    x = 3
    
    select
    x,
    a,
    b,
    c
    from xxx

    The OP wrote: "where one of the column name is variable."

    To the OP... to do this, you MUST use dynamic SQL statements.

    Your choice is:
    Native dynamic SQL: http://www.morganslibrary.org/reference/nds.html
    DBMS_SQL package: http://www.morganslibrary.org/reference/dbms_sql.html
    Weakly typed Ref Cursor: http://www.morganslibrary.org/reference/ref_cursors.html

  • Generate graphic output of the formula variable entry in the time

    Hello

    I'm new to labview but I have some knowledge of basic and I have a month to carry out a project with labview. So, please guide me how to do the following.

    Currently, what I want to do is to generate the graph of output of a formula that has variable contribution on time.

    Please find the attached photo for my excel sheet.

    the value of X and Y which are entered and Z are out. for example. Z = X + Y (X and there vary in time)

    I want to show the value of Z output graphics over time in column A. RELLY APPRECIATE YOUR HELP... tthanks

    Try this...

  • How do I either set channel name of a graph of cluster or get a 1 d waveform chart to start different time (t0) for each line of the waveform?

    I have a chart single 2D out a conditional of a loop indexing output such that over the rows of the table are not the same size. -Basically, they have different starting and ending points and sizes. -Not so concerned by the endpoints, because as soon as I get correctly starting points, everything shows fall in place.

    The challenge is that when I try to have the variable t0 (start time) for each line, the wave of construction vi form would always keep each line at the same starting point.

    I used the approach bundled with success (the cluster approach ensures that each waveform starts at different times according to the guidelines of my t0 defined for each line) but then I'm not able to get in the channel names I could make using the graphical approach (wave generation) waveform.

    In essence what I get here, I'm losing here.

    Because I don't want one of my mentors, Bob and Altenbach have fed up with me I have attached a vi this time

    Attached VI shows a combination of the two attempts (first with the waveform graph) and then with the graph of cluster

    1. with the first (graphical waveform), I get my channel names as you wish, but the alignment of the wave is not correct.

    2. with the second (graphical cluster), the alignment is good, but I can't do the names of channel in the chart, even if they are present in the cluster.

    I read some reviews that mentions that attributes can be displayed with waveform and data Dynamics (not clsuters) so I guess that's why.

    I saw another report indicating the start time for a waveform 1 d will always remain the same for the rest lines defined for the first line even if changed for the following lines in a loop.

    So I guess my question is: what is the way around questions like that?

    First of all, let me be the first to the congratulate and thank you for finally posting a code!  I'm not 100% certain I understand your question or your code, but I have an idea, perhaps, of what you want to do, so I wrote a little VI who made something simple that could be relevant.

    You mention waveforms of different lengths and beginning at different times.  You also want everyone to have a unique attribute (although I'm not sure what you want to do with the attribute).  So, I did the following:

    1. Generated an array of 100-sample random to represent one second of a waveform.
    2. Created 4 waveforms on this 100-sample basis.  The first waveform (channel 0) is just these 100 points.  The second, 1 channel, is the concatenation of string 0 with the base of 100 samples, or a waveform "double".  Channel 2 is 1 string concatenated with the base, and channel 3 is 2 string concatenated with the base.
    3. In order to trace the four channels that they rest 'on' the other, the waveform has the number of the channel added to it.  Channel 3 is 3 + (4 copies of the basis of 100 points), a waveform 400-point random centered around a shift of 3.
    4. All channels have dt value 0.01 (but I guess I could have varied, as well).
    5. To make the channels start at different times, I started channel N N seconds before channel 0 (by subtracting the index of the loop, I, T0).
    6. For each channel, I created an attribute called "Chan" equal to "Channel N" (where N = 0, 1, 2 or 3, as the case may be).

    This is the plot that results. Scale X is the absolute time value (no Date) using the 24-hour HH: mmS format.  You can see that the plots are 1, 2, 3 and 4 seconds of time, and are offset from each other by a second.  I used the trace attributes to change the name to the respective attribute.

    The code to do this is very simple - I almost don't need to show it, because I think it is completely described by the text above, but this is here:

    Now, it was not that much faster that some of your previous posts, when you refused to your postcode, "guess us" what you wanted (but not to not correctly guess), you tried to "push" us in the right direction (still refuses to post code), and no one seemed very happy?

    Bob Schor

  • How to create a graph in time real LabVIEW 6.1?

    I am new to programming in LabVIEW (6.1). I wonder to create a LabVIEW interface that can operate the multimeter Keithley 6487, allowing us to apply a voltage and nth measures. With the measures that we have create a chart (V curve i) I find the XY graph, but it only allows to send all the measures at the same time (indexing) to generate the graph and not whenever we take the action so the graph build inn in real-time. I need to know how to create a chart or change the XY graph, so I can generate the i - V curve with each step we take in real time. Whenever we take the action and not once the program ends. Thanks in advance.

    You must place the graphic inside the loop and the use of shift registers to accumulate the X and Y in the form of tables. I do not have 6.1 right now in the process of execution, but it would basically look like this:

    Note that the above is for demonstration (the code is in fact a greedy loop). You can consider putting Scripture on file inside the loop. In this way, if the program crashes, you will not lose your data.

    WARNING: Using table build as indicated above will result in continued growth of memory. If your program is running for a long time, this can become a problem. One thing you may need to watch must have a limit on the size of the array. I know there is an example of "Table of XY" comes with LabVIEW, and I'm sure that this is with 6.1. You should take a look at this example, which implements a fixed buffer for the data in the chart size. You should be able to use the VI "graphic buffer XY"directly in your code. "

Maybe you are looking for