Calculating intersection of circles giving NaN first 'round'.

See attachment.
When I give the correct parameters as input, the output is always NaN.
However, when I run the VI again, the correct x,y coordinates are returned.
Obviously this is not correct behaviour I want in my VI. What did I do wrong here?
Thanks,
Marvin
Solved!
Go to Solution.
Attachments:
Calculate Intersection Circles.vi ‏32 KB

marvin117 wrote:
What's the point of local variables if they don't work that way?
Although local variables are often demonized, there are proper uses for them.  Coming from a text-programming background, you're used to using variables and, presumably, not accustomed to things happening in parallel.  The first thing I noticed, which is certainly not obvious to anyone, is that your local variables are read in every frame of the Sequence structure immediately, but the indicators aren't written until the calculations happen in the first frame.  In this way, the Sequence structure is highly non-intuitive.  National Instruments owes you an apology for that.
The second thing I noticed was, in your second frame, that you were using the results of calculations with a local variable in the same frame.  You'll never be able to know that the calculations will happen before the locals are read.  There's your classic race condition.
I (almost) only use local variables to update front panel control values.  If I find myself using them to read control values, I hang my head and wish I had designed my code better.  Try to think in terms of "The wire is the variable."  It's almost always the right way to think about data, and data flow.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

Similar Messages

  • After first round of updates on newly formatted Windows 7 Pro, boots to repair screen

    I have formatted this PC about 5 times now, exchanged a few different HDD's out, and get the same results after I complete the first round of Windows updates. It boots to the System Repair menu and does the repair but does not find any issues. I've ran boot
    sector virus scans, malwarebytes just for the heck of it, chkdsk and sfc. I have tried installing the drivers before downloading windows updates and also after the first round of windows updates. But it keeps coming back to the startup repair.. And I've also
    ran diagnostics and memtest and everything came back ok. 
    I can't really seem to find anything on the forums regarding an issue like this so I figured I might as well create a thread and see what comes of it. 
    EDIT: This may have something to do with it.. When trying to run updates, it first asks to install 1 update. I check it, and it is the Windows Update Agent. 7.6.7600.256. I am however able to boot back up after this 1 update. 

    Hi,
    Do you mean that you've reinstalled Windows 7 about 5 times, and the same issue persists after you installing Windows updates?
    As I know, Windows Update should not cause this kind of issue, how did you install your Windows? With an installation disk or something else like an .iso? Are there any addition software\3 rd party applications included? if yes, then remove\uninstall them
    after the installation finished.
    After you install Windows 7 and install Windows Updates, do not restart, check the cbs log first in C:\Windows\Logs\CBS, or refer to the following KB to gather additional troubleshooting information 
    http://support.microsoft.com/kb/2545723
    Yolanda Zhu
    TechNet Community Support

  • Intersection area Circle - Rect

    Hi guys,
    I'm trying to compute the intersecting area of a circle and a rect. I've already searched the web for ages and found some good stuff like this: [Area of intersection between circle and rectangle|http://stackoverflow.com/questions/622287/area-of-intersection-between-circle-and-rectangle], but my problem is, that I don't now how to compute the intersection points of a circle and a rect.
    Is there any way to compute the area easier (e.g. with a java lib)? And how do I compute the intersecting points?
    Thx for any help in advance! Greetings.

    A rectangle and a circle can intersect each other in many ways:
    1) no intersection because one is completely contained by the other or both are completely disjunct;
    2) intersect one edge of the rectangle; there are two intersection points
    3) intersect two adjacent edges of the rectangle; there are four intersection points;
    4) intersect two opposite edges of the rectangle; there are four intersection points;
    5) intersect three edges of the rectangle; there are six intersection points;
    6) intersect all edges of the rectangle; there are eight intersection points.
    Note that some of the points in all cases where both intersect can be identical. You have to figure out each and every situation one by one.
    kind regards,
    Jos

  • How do i cancel after the circles of hell go round and round?

    I have been in the circles of hell trying to cancel my subscription which my credit card, i was surprised to learn, had been charged for- only to find it is already cancelled! See below
    Adobe ExportPDF, Annual
    Cancelled: Effective February 2, 2016
    Restart
    But I have just been billed for it anyway. And probably be billed for it in another year - 2016. And then it will probably "automatically" (see fine print) restart.and so on till i am very very old. interesting to see on other posts that cancelling the credit card does not help which seems odd but then again after two hours of wandering round and round the site (love the hilarity of the non-functioning chat icon - much hilarity every Christmas in the accounting department.) I'm not surprised. It is clear that adobe has one of the most difficult "unsubscribes" online. Despite the professionals hunting them down and killing them, there are still websites devoted to the topic of why can't I unsubscribe and why is this so hard and surely this is illegal. Adobe clearly makes most of its money out of the unsubscribe because the two products I bought didn't work anyway. Fair enough, should have known, but remind me to employ a lawyer in future before even opening an adobe document.

    Hi there,
    Sorry for the frustrating experience, looking at the account I could see the billing has been stopped for the subscription and you will continue to have the access to software till 2016.
    Please update this thread if you would like to cancel the subscription and get refund.
    ^Ani

  • How to animate drawing of circle outline from first point to completed circle?

    How can one animate the drawing of a circle outline in Edge Animate from the first point to the complete circle? Would a better approach be to create a gif and import that into the Edge Animate project? Thank you for your time and expertise.

    This first image is the file in ID with High Quality Display on
    This is with Overprint Preview and that what I aming for, roughly, for the final. [I'm not sure what is the purpose of overprint preview in ID].
    This is the 3 plates of Black and two pantones
    This is the plate of Black plate
    This is the Pantone 812 c plate
    and finally this is the Pantone 8201 c plate
    Hope this can help to get the best solution

  • Fonts look grainy...password circles don't seem round. Colors washed out.

    Hey everybody, on my brand new macbook c2d, the fonts seem very grainy, much more so then the one that it replaced. The password circles also don't seem to be completely round. (even when zoomed in with controll + scroll) I would go to say that my iMac g3 displays fonts better then this. Also, compared to the macbook that this replaced, colors seem very washed out. Allthough I am now used to it, I am again wondering if this is normal.Is this a common flaw in Macbook displays, or do I need to get this fixed? This is a brand new computer, which is actually a replacement for a broken one, so I'd like it to be pretty much perfect.

    Hello!
    Yes - PRAM doesn't help.
    PRAM batt is dead, has been for a while. I do need one soon...
    I'll try a FW drive boot (has 10.4.7 on it), to see if that helps - but it's been bright like this for quite a while. I never really noticed, because before Tiger, all the iMac was used for was a iTunes and OS 9 games playing, weather radar checking machine. Now I'll do work on it during the day - say, when I'm home between classes and need to work on a lab report, but don't want to unpack my powerbook for just one hour. Not only that, but with these space-desktops, the brightness is just more visible. Hmm.... I wonder if I turned up the gamma to far during calibration.... checks
    But the question still stands: is there any sort of internal control for brightness? It may have been the tray-loading iMacs that had that.
    Thanks,
    Dan.

  • I have a calculation in a5 and need the answer rounding up to the next whole number

    I have a calculation in cell a5 and need the answer rounding up to the next whole number

    Hi,
    I am using numbers
    A1 x A2 = A3       A4 is A3 divided by 2.88.  Indeed to round up the answer in A4 to the next whole number
    Eg 4.5 x 3.7 = 16.6 sq meters as an area , divided by 2.88 ( area of 1 board) = 5.78 boards so I need to buy 6 and quote for 6
    Cheers

  • Thinking circle just keeps going round and round

    Circle goes round and round

    I think we'd need a bit more info about how you got your iPod into the current state. DId it just happen at random, after swtching on or after an update? Have you tried a hard reset?

  • Calculer les centiles et valeurs NaN

    Bonjour,
    il me semble que le VI centiles calcul mal dès qu'il y a une valeur "NaN" dans le tableau d'entrée. En effet il faudrait que les valeurs "NaN" soient totalement ignorées dans le calcul d'un centile (celà n'a pas de sens de situer NaN vis à vis des autres nombres, ni dire que 10% des valeurs du tableau sont supérieures à NaN).
    Actuellement on peut avoir NaN en sortie car le VI ne fait que trier le tableau et  chercher dedans.
    Cela semble cohérent que -Inf et +Inf soient considérés comme étant des valeurs et donc fassent partie du calcul du centile, mais NaN c'est totalement absurde.
    Que pensez vous du fonctionnement de ce VI ? 
    Cordialement,
    Résolu !
    Accéder à la solution.

    salut la valeur symbolique « NAN » pour signifier « Pas un nombre », de l’anglais « Not A Number », représente la valeur à virgule flottante produite par des opérations non valides ou des calculs erronés. Par définition les opérations à virgule flottante propagent NaN, toutes les opérations qui utilisent cette donnée donneront un résultat égal à NAN. Donc pour moi logique.
    Si tu veux pas, tu supprimes les NAN avant la fonction
    A+
    Luc Desruelle | Voir mon profil | LabVIEW Code & blog
    Co-auteur livre LabVIEW : Programmation et applications
    CLA : Certified LabVIEW Architect / Certifié Architecte LabVIEW
    CLD : Certified LabVIEW Developer / Certifié Développeur LabVIEW

  • Simple calculation involving  KOMV-KBETR giving issues

    Hello Experts,
    I have a pricing routine in which I am doing some calculation on a field typed on KOMV-KBETR. The calculation is similar to the code  shown below. But this simple calculation is not giving correct results. For example, the correct result from the sample code below should have been 180.00, but the result I am getting is 18000.00. Please help to resolve this. Thanks in advance
    Also, if you try to execute the below code in a custom program, you will get the correct result. But the issue is happening in a pricing routiine.
    TABLES: komv.
    DATA:  ws_value LIKE komv-kbetr VALUE '200.00',
                 g_value TYPE bsgrd value '90.00'.
    IF sy-subrc EQ 0.
      ws_value = g_value * ws_value / 100.
    ENDIF.
    Regards
    Arun.

    - How did you fill KOMV (are you in an exit, a specific program, do you use a FM like PRICING_GET_CONDITIONS ?)
    - Is KOMV-WAERS currency key filled (?)
    Nevertheless - from [Predefined ABAP Types|http://help.sap.com/saphelp_wp/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/frameset.htm]
    it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can convert from currency to decimal field using FM for BAPI like BAPI_CURRENCY_CONV_TO_EXTERNAL and BAPI_CURRENCY_CONV_TO_INTERNAL. (or old FM like CURRENCY_AMOUNT_SAP_TO_DISPLAY)
    Regards,
    Raymond

  • Completed first round of upgrade from 4.1.3b to 4.1.5b

    This past weekend we upgraded some of our boxes from 4.1.3b to 4.1.5b. We upgraded our Active and Standby CMs, our data center 7341s and two 674s at one of our remote sites.We plan to let this run for a few weeks then we'll upgrade the rest of our remote WAEs.
    So far it seems to have gone well. Our configurations were maintained and our scheduled reports continued to work too.
    One issue we have come across is in regards to the 'strong password' policy. 4.1.5b requires the use of strong passwords. You can find it mentioned in the Release notes. However, the release notes state that this feature is disabled by default. We have come to find out that isn't true if you have SSL AO enabled. Since SSL AO is enabled by default, if you upgrade to 4.1.5b then the strong password policy is also enabled. This becomes a problem when a remote WAE goes offline then comes back online and tries to re-register with the CM. The CM will refuse the registration of the remote WAE because of the default username/password that is on each WAE. We don't currently use the SSL AO, so we were able to fix our problem by disabling the SSL AO feature on all of our WAEs. Another option may have been to change the default username/password to adhere to the newer password policy requirements.
    HTH,
    -chris

    Good question. For us, there were four software defects that were impacting our service. The most notable was a bug with MAPI AO and TFO overload. Our remote sites are deployed with two 674s installed inline. When the first WAE (closest to the users) would exceed its TCP limit, it spills over to the other WAE at the same site. Unfortunately, we experienced a problem with Outlook clients. When their Outlook TCP sessions spilled over to the other WAE their Outlook client would hang. The users had to shut down their client and restart the session.
    The list of bugs we were trying to get resolved by going to 4.1.3b were:
    CSCsz31354
    CSCsz05992
    CSCsy99732
    CSCtb74241
    HTH,
    -chris

  • Can't access my files, the circle thing keeps going round and round

    I can't access my files, the little cursor thing keeps going round and round, is there a way to by pass that or is my powerbook going dead

    What version of OS X are you running?
    Useful article here on the causes of the Spinning Beach Ball and how to troubleshoot it:
    http://www.computerworld.com/s/article/9177479/Troubleshoot_the_spinning_beach_b all?taxonomyId=89&pageNumber=1
    and also this:
    http://www.thexlab.com/faqs/sbbod.html

  • Zig Zag Effect - How is a segment calculated on a circle?

    I have a perfect circle, to which I have applied the Zig Zag effect. I have specified 2 ridges per segment. If I am correct in assuming that a "ridge" is the high, outer part, I end up with 6 ridges on my circle. If I specify 10 redges per segment, I get 22.
    So what does Illustrator consider a segment on a circle, and other than trial and error, how can I get a desired number of ridges?

    Ridges Per Segment means Points Per Segment. Expand Appearance and then count the points.
    Then try it again, but set the Size slider to zero.
    In both cases, you'll have 12 points; the original four and eight added (two per segment).
    You have six "star points" because there is an anchorPoint at each trough and each crest; 6 pairs of trough and crest makes six waves.
    JET

  • Signal express not saving logs, giving NaN

    I need some help.
    We have been using Signal Express for about 1.5 years with ok success. (It is really unstable at times.)
    We just ran into a new issue the last couple of days.  All of a sudden it is no longer saving our log files.  There is no indication that there is anything wrong.  It runs fine and appears to be saving the data (the logs show up in the log list on the bottom left side).
    However, if you go back and try and open the data, it gives only NaN values.  If you look for the log folder where it should be it does not appear and when you save, close and reopen the project, it says that the log files could not be found and have been erased.
    We have restarted the computer and all the normal.  We rebuilt the project from the ground up and it is still happening. 
    There is plenty of disc space (15 Gb) so that shouldn't be an issue either.
    Anyone have any ideas?????
    Are there certain conventions we should stick to when naming the logs.  I thought it might be something with the names being used, but there doesn't seem to be a pattern.
    Thanks for any advice.

    Please attach your project so we can take a look.  Also, what version of SignalExpress are you using and what hardware (if any)?
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Installing extensions and little circles just keeps going round and round, Help?

    When I try to install new extensions, the little circle just keeps on going and the extension doesn't install.
    When I go to extensions through the window>Extensions, it says there are three but only two work, onOne Software, which is installed on my machine, is empty.
    When advised to download the Adobe Support Adviser, I follow the link to the page, only to be told that Adobe doesn't support this anymore.
    Why can't I install any of the extension that I want and where are the onOne Software extensions?

    Please provide more details. Windows or Mac? Which version of Extension Manager (CS6, CC, 6.0.8, 7.2.1, ...)? Could you provide the download link of the extension if possible?

Maybe you are looking for

  • IPhone not syncing all pictures

    I've been having this problem for awhile now & thought it had something to do with the iPhone 4 because I didn't have this issue when I had the iPhone 3GS.  When I try to sync all photos including videos into my iPhone - about 4,900, only about 4,200

  • How do I zero-fill a field in a Presort Output file?

    Hello, I am trying to zero-fill a field in my Presort address output file.  For example, instead of posting ap.pc_no_abs as "1", I need to post it as "00000001" Thank you, Dawn Deems

  • Media Player 12: No destination folder for CD copy...

    Hey there, I've got this 500GB external USB drive that was synchronizing with WinMedia 12 flawlessly...BUT I had to change the drive's letter (from H: to X:)....and since then WM12 won't give me the option to choose a destination folder nor will copy

  • Input XML to CSV in Mapping

    Hi, I have a requirement to convert the below: Source Message: <Message> <Segment> ..............................0..unbounded <Field1>Value1</Field1> <Field2>Value2</Field2> <Field20>Value20</Field20> </Segment> <Segment> ............................

  • View Cache, Timeout=Never

    We have quite a few search forms, each with a bunch of combo boxes. The combo boxes are fed by lookup tables whose rows change VERY seldomly (is that a word?). We'd like to use <jbo:InputSelect...> to populate these, but would like it to load the val