calculation using the formula node needs two clicks

Hello

I want to use this piece of code for a larger program. My goal is to take 10 values and calculate two values using a formula. I used the formula node as the calculation functions digital ordinary would be too heavy. If I click on save, it saves two values to a file.

The problem that I am facing is that when I start the program, it works very well for the first time. The second time however, if I change the values, and then click on save, it still displays the previous values, or some altered values. I have to click on save twice to get the correct values. I don't understand the reason why this happens. Can anyone help?

File attachment: Capture screen and VI.

P.S. If the solution can help with the problem, I'm ready to change any part, but please, not irrelevant to suggestions on how to * improve my code *, because I've worked hard to make it work with another major project.

I don't completely understand the description of your problem.  But I see two problems.

1. the "Save" button actually belongs to the event that handles the record button.  And the case of the event should really be Jean-Claude Value Change of mouse down?

2. your STOP at the bad mechanical action.  Since it happened so this just released, it is only true while you're pressing it.  It stops the upper loop, but can't stop low loop because your loop will also be waiting to save button to press.  Stop will always be false because you cannot press two buttons at the same time.

Try to make your action to stop button to be changed when released.  You must return the button to false programmatically born of two loops.  In fact, it would be better to have a case of events for the stop button to stop the lower loop.

I don't understand what you're trying to do in the upper loop.  You read a file as soon as possible, and it seems to be the same file that you create in the lower loop.  Why?

Tags: NI Software

Similar Questions

  • Initialization of an array to match another size of array using the formula node.

    I want to get a few different pictures of the same length and constants in the formula node and output a table corresponding to their length after some minor calculations. Another post, I discovered that I can simply initialize the table as such:

    float pp [100];

    The problem is that I find myself with a much bigger picture than what I need. I want to do is something like:

    float [n] pp.;

    where n represents the entry of an array size in the form node or is something like:

    n = sizeOfDim(td0,0);    Here I use a table 1 d

    None of these methods seem to work. How do I initialize my picture 'pp' such that it matches the length of array 1 d of "td0?

    The more likely your initialization externally.  Create an entry named pp and wire td0 inside as well.  Now create an output with the pp even name and it will contain an array of the desired length.  Of course, this assumes that you want to edit all items in pp.  Otherwise, just use initialize the array to create a new table and feed in the length of td0, and whatever default value you want (ie. 0 or NaN).  The blank values will keep this value after the node of the formula.

  • using the formula node array index

    Hello

    I'm new to labview...

    I am creating a vi that takes a number n and out the primes from 0 to n (i.e. including 1).

    My approach to do, he uses a formula node, but I can't understand how the table index or for each number first output.

    It seems that my indexing algorithm works very well, but I'm just pushing it into the array as an element.

    It'll will be great if someone could take a look at my vi and give me a hint on how to index properly.

    Thank you

    AA

    your output should be a table and index first use [index]

    also you have to declare the index and Prime]

  • whites in the data in the table using the formula node

    I have 2 tables 1 d of data go into a loop. Inside the loop, there is a formula node that combines the 2 sets numbers and did a little math for them. If the result of the calculation is 0, it means that the value is not valid. Nothing other than 0 is good value. The result of the calculation comes out the knot of the formula and leaves the loop becomes a table 1 d. Then my table is saved in a spreadsheet. 0 really screw up my graphics, and I want them to just be white instead. I tried to use NaN instead of 0, but who also live up to my graphics. How can I place white on the output instead of 0 array?

    It seems that your real problem is to define what will make Excel leave gaps.  For LV NaNs graphics to do what you want.

    You can also consider getting the output array an array of strings. There may be string values (NO?) that cause Excel jump.

    Lynn

  • Sorting table 2D using the formula node

    Hello

    • What l am trying to do is kind of numbers in groups.
    • A group consists of the numbers that are equal, or step upwards or downwards by a single value. Each group must be assigned to a column. E.g. O column of the table of entry test would consist of 5, 4 and 3, but not the 9 and 10. These values belong to column 1. However if the adjacent cell in the column was not empty then 9 and 10 would stay in column 0
    1. To better understand the programming formula node went to 1 d. I found that each cell is not treated individually with my code.
    • The final table of the orange entry test is that the data type l want to sort a 2D picture that ends up the same size chart.
    • In the code l provided my goal to compare each cell of each column line to determine if a cell is equal for example a = b, a + 1 = b or a-1 = b If Yes, then these values are in the right column. If this is not the case, a sort must be made to put a value in the right column it is.

    This is my first shot with node formula and l must admit others examples l found a bit confusing how a result has been obtained. I prefer to do any programming in labview instead of going to another program for results l am after. I tried to picture of programming just for this problem and found to grow big and very complicated then stopped l. For me the road to node formula should be simpler and more compact. My last resort is to use Excel but l still hope to do all the programming in Labview l you end up with a more dynamic program.

    Concerning

    Michael

    Hello

    You are brilliant... bloody!

    I just couldn't she would repeatedly using tables, l have been on it for weeks. I never thought about how you solved this problem.

    I hate excel and text. I am graphically spirit therefore l such as labview.

    I had a solution in Excel yesterday, but your solution is much better than what l came with

    I'm very grateful

    Thank you

    Michael

  • XY graph using the formula node

    In a formula node, there is a (x) input and two outputs (y1, y2).

    Plot y1, y2 on a single graph XY for x 1 different values (from 100-200). Please answer...

    Kind regards

    Jugurtha

    Please send your code, regardless of its State.

  • Need help on how to create the transformation of the Park by using the MathScript node?

    Hello

    I want to generate a transformation of the Park by using the MathScript node. But there is an error message which confused me. Please can someone help me to have a look of my program? Thank you!

    The error message is "error-90011 occurred in error in the function mail to line 1.  The sizes of the input matrices are incompatible.
    Check that the matrices have the same size or one is a scalar.

    Possible reasons:

    LabVIEW: Sizes of the input matrices are incompatible.  Check that the matrices have the same size or that one is a scalar".

    Hello

    The problem is that all of your entries to the MathScript node are vectors.  All entries of the vector to the MathScript node becomes vector lines.  A multiplication of two vectors lines generates a size mismatch error.  If you really want a scalar of this multiplication of output (by calculating the dot product of vectors), then you have to bring your 'a', 'b' and 'c' vectors or your vector of 'x '.  If you want everything just multiply your elementwise vectors and produce an output vector, you must use the elementwise multiplication operator '. *' (time point).  Use this operator between your 'a', 'b' and 'c' vectors and your calculation of fishing.  For example, on your first line,
    d = (2/3)*a.*(sin(x))+(2/3)*b.*(sin(x-(2*pi/3)))+(2/3)*c.*(sin(x+(2*pi/3)));

    Don't forget to also change your output to a 1 d of DBL array variables.  You can do this by right-clicking on the output variable and selecting "Choose Data Type."

    Grant M.
    Staff software engineer | LabVIEW Math & Signal Processing | National Instruments

  • I can't fix my mouse to use the option with a single click in windows 8. The two click works fine, but I prefer the one click option

    With Windows Vista and Windows 7, I put the mouse to use the option with a single click to open files and programs desktop.  I can't find this option in Windows 8.

    Hello
     
    Thanks for the post about Microsoft Community.
     
    I understand that you don't want to use the simple click instead of double click of the mouse that you used in Windows Vista and 7.
     
    I would ask you to please follow the steps below to activate the option just click on the button of the mouse in Windows 8.
     
    un) Please move the cursor to the bottom right and click on the search box, which is the first option in this Panel.
     
    b) in the search box, type Control Panel, and then click Control Panel.
     
    c) after opening the Control Panel, you will see many programs such as the system, network and security, Internet, hardware and sound, and other programs. Click "appearance and personalization".
     
    d) now click on the folder option to open it.
     
    e) now you will see many options in the folder option. Now, click single-click to open an item (point to select).
     
    f) now click on apply and ok to turn this feature on your computer.
     
    I hope your problem is solved now. Please feel free to write back if the problem still persists.
  • 30.0 Firefox is so slow since updated. IE & Chrome not having problems loading pages, showing the blank pages, need two or more tests to open Web pages.

    30.0 Firefox is so slow since updated. IE & Chrome not having problems loading pages, showing the blank pages, need two or more tests to open Web pages. It seems to have something to do with the Visual data on the pages. My MSN homepage gets old and dies every time I open the page after the re-opening and closing of firefox. It takes forever! What is a memory drain? Each open page in a new session of firefox suffer the same fate.

    Start Firefox in Safe Mode {web link}
    While you are in safe mode;
    Press < Alt > or < F10 > to display the toolbar.
    Followed;

    Windows; Tools > Options
    Linux; Edit > Preferences
    Mac; name of the application > Preferences

    Then Advanced > General.
    Find and stop using hardware acceleration.

    Dig safe web sites and see if there is still a problem. Then restart.

  • Is it possible to use the same password for two computers through quickbooks?

    We have two computers that are connected to each other through quickbooks and we must be able to get our e-mails from computers. Is this possible? We need to send invoices to the customers of a computer and the other is used for accounting and payroll.

    Original title: you can use the same password for two computers if they are already linked through quickbooks?

    Hi JayneB,

     

    (1) are you referring to the password of the user account?
    (2) who is the operating system installed on the computer?

     

    Method-

    I would like you to contact the Quickbooks support for assistance.

    Check out the link-

     

    QuickBooks support

     

    Hope this helps!

     

  • When you use the pen tool when I click and create an anchor point and release the mouse button the pen tool emerges from the anchor and allow me to go and select a new anchor point. The right pen tool keeps adding lines that I move the mouse.

    When you use the pen tool when I click and create an anchor point and release the mouse button the pen tool emerges from the anchor and allow me to go and select a new anchor point. The right pen tool keeps adding lines that I move the mouse.  How can I get the pen tool to release the anchor

    Try this.go in the menus. Select cc illustrator > preferences > display selection & anchor > then make sure the box "activate the rubber band for" the pen tool is not selected. Then press OK. It should work.

  • Is it possible to use the same license on two computers; fixed and portable?

    I have licensed Adobe Creative Cloud for PC. Is it possible to use the same license on two computers; my desktop and my laptop?

    Hello

    You can have the creative cloud installed and signed in on two computers as long as you don't use it on one at a time. Download and install as you did on the first computer, sign in to your Adobe account on the Adobe using your Adobe ID website, download the desktop app from clouds, then download the software. Log on a computer that you will not use:

    log in and log out of the desktop Adobe Creative Cloud application

    Let us know if you have more questions!

  • Outputs not used in the formula node

    Hello

    To clean up my code and avoid repeated calculations, I want to use intermediate variables in my code formula node. To create those variables, the only way I know is to create an output variable of the node, which of course eventually unused. Y at - it no problem/inneficiency created by doing this?

    Thank you

    Define a variable inside the node form. Use the syntax of C

    Mike...

  • applying the delay in the formula node in labview

    Hi all

    If you have not yet done so, please go through the tutorials free online on LabVIEW.

    Rarely is the node form the best way to write code in LV native LV constructions can be a little awkward at first for someone with programming experience text.  Once you learn how to use the stream and recognize functions by their icons, you can see that the graphical programming can be powerful and easy to read.

    For delays using the function Wait (ms) in the palette of Timing.  If you need a delay in the middle of a calculation (which seems unlikely), you may need to separate the calculation into two parts and put forward (ms) between the parties.  See the image below for a way to do this without no nodes formulas.

    Lynn

  • a stop time loop by using the time difference of two counts of ticks

    Hi guys,.

    I'm writing currently a code test how much time does it take for a formula node perform its operation. The program uses some time to perform the calculation in a loop, and the program stops after having calculated when the number of cycles reached 10 seconds. The program then displays the number of iterations, he does it in 10 seconds.

    If at the beginning, I created 2 images of the structure of the sequence. In my first image, I have my original number, and as part of my second, I have my final number of cycles and the while loop. I used the subtraction function and divide the result by 1000 to get jet lag. Then using the comparison function, I put if output > 10 then the program must stop, to do this, I've linked out of the comparison function to the button stop inside the while loop.

    However, when I tried to run the code, the program just didn't run. That's why I created a similar program that puts the final number of cycles in the new image sequence. When I ran this code, the program never stopped.

    Guys do you have any idea what was wrong with my codes.

    Thank you!

    Erry

    Stream!

    In the two VI the Terminal stop of the while loop is controlled by a Boolean value whose source is outside of the while loop.  If this loop will be executed once, or forever, depending on the value of the Boolean value which is calculated before the loop starts and comes to the tunnel through the loop.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

Maybe you are looking for