Jump to content

pandaman

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Posts posted by pandaman

  1. Hello fellow LabVIEW wirers,

    I am "renovating" a relatively large program I have made in the past with new features. I am adding alot of buttons in the process, which I plan to control with event cases. Some buttons lie directly on the front panel, while some are in a tabbed interface (a few buttons for each tab). On the block diagram, I have an event structure surrounding the case structure (for event timeout=100ms) which handles events for the buttons outside the tab. The case structure is for the tabbed interface. I am thinking of either placing a set of nested event structures (for each case in the case structure) to handle the tabbed buttons OR make the outer event structure handle these buttons. Which is more CPU-time efficient? I would think the nested version (since the outer event structure would not have to check for events that do not apply for all tabs), but since the nested one would be in event case timeout, I am uncertain.

    If my description is unclear :headbang: , I can upload an example.

    Thanks,

    Mayur

  2. Hello once again,

    I am having trouble coding a way for the user to control the "plot area" size (which I interpreted as the black gridded area) without changing the overall size of the graph. My reasoning is in regards to aesthetics; I don't want a gap between the graph and a decoration. If this cannot be fixed, is it possible to programmatically control the size of a decoration? I doubt it myself because there are no block-diagram components for decorations.

    I have attached a sample VI to further illustrate my intentions.

    Yes the outcome is not significant in importance but I have a pet peeve about it :throwpc:

    Thanks in advance :worship:

    Mayur

    Download File:post-2549-1149514836.vi

  3. Hello one and all (again),

    Is there a way for the user to save the state of one's program (i.e. the values of a control) to a file without manually writing values to a spreadsheet manually? It would be kinda useful in the event that a buncha settings are tweaked and the user just wants to quickly recall them later.

    Muchos gracias,

    Mayur

    PS: please do not be offended by my post icon, I wont use it again! :nono:

  4. I don't understand why all of you are making fun of Alfa. Time can go in reverse and it's very easy to prove it if you have LabVIEW. Just have a look at the attached VI. Kind of reminds me of Heinlein's "Waldo"...

    Very clever "underlying truth" :thumbup: in your time reversal algorithm

    Hope my comments are slightly more lucid than those of al....

    allright time to get back to work :ninja:

  5. Hello one and all,

    I am trying to solve for a root using Find All Zeros of F(x).vi (Functions>Analyze>Mathematics>Zeros), but I am getting an answer that is out of my specified bounds (see attachment). I could probably check for this in my program, but why isn't this function detecting this?

    Thanks,

    --Mayur

    P.S.: O'yea I already tried using a different algorithm and different step type, but the answer was the same. I go a root at x=.69 even though my start bound limit was .73.

    Oh and I am using Labview 7.1 in this instance.

    post-2549-1143223736.jpg?width=400

  6. Hello one and all,

    I am trying to solve for a root using Find All Zeros of F(x).vi (Functions>Analyze>Mathematics>Zeros), but I am getting an answer that is out of my specified bounds (see attachment). I could probably check for this in my program, but why isn't this function detecting this?

    Thanks,

    --Mayur

    P.S.: O'yea I already tried using a different algorithm and different step type, but the answer was the same. I go a root at x=.69 even though my start bound limit was .73.

    Oh and I am using Labview 7.1 in this instance.

    post-2549-1142543860.jpg?width=400

  7. If removing overlap and increasing times between refresh do not fully recover CPU speed, try investing in a graphics card. GCs almost always have a separate processor and memory dedicated to graphic alone. As a result, you main processor and RAM will be reserved for computational calculations, and the graphics card's processor and memory will deal with graphics. Mid-range cards usually run for around $100; however, you may find a decent lower-range card that fits your application for much less.

    I suggest buying a card that has at least 64MB memory and a core clock speed of 175MHz.

    This may not be of help if you have no available PCI/AGP slots, or you are under a strict budget :oops: . I am sure, though, that following information from other members' posts will prove much more help in solving your dilemma :thumbup: since they are software fixes. This is more of a last resort :ninja: .

    --Mayur

  8. It worked fine for me on the first try. I guess you already primed it for me huh? :thumbup:

    I guess the drivers portion is not included with the download eh? It prompted me for it. BUT, this time, the installer doesn't abort the installation if the driver CD is missing. Unlike 7.1 which uninstalled everything if you didn't have the driver CD.

    Never had that problem w/ 7.1 :D

  9. Hello one and all,

    The current project I am working with requires a UV lamp that emits a very focused and narrow beam of UV light. The diameter of the beam should be within one micron or, if possible, adjustable between 1 micron and 250 nanometers. It must be focused enough to emit this diameter of light when fixed above the specimen 10 cm above. The wavelength of the beam is not a concern yet.

    Any help or ideas are appreciated.

    Regards,

    Mayur

  10. Ok

    Here are the changes I needed to make to get it to work.

    1: The bool wire in the event structure time out case needs to be passed through

    2: The integer controls and indicators from kels code were changed from I32s to U32s this caused big problems when negative values were used.

    After that it worked.

    I also added a stop button and replaced local variables with shift registers.

    I would highly recommend learning to use shift register instead of local variables.

    By using local variable this way you created a race condition which means there was no way to determine if the graph was updated first or the data was modified first.

    Although a minor problem in this case they can become big problems.

    lets us know if you need more help.

    Download File:post-584-1124948981.llb

    5837[/snapback]

    Nice! :thumbup: The only problem I have (a very minor one at that) is that the point where drawing occurs is above and slightly to the right of the cursor (see picture).

    post-2549-1124972259.jpg?width=400

  11. Ok the future is now.

    Can you please post the vis as a development distribution.

    In your main vi go to

    File>>Save with Options

    select Development Distribution

    and Save.

    post-584-1124830382.png?width=400

    LabView will create a llb with all the vis needed to run the main.

    This makes it much easier to help. :)

    5807[/snapback]

    Ok, sorry about that... my last post's attachments were not in this format, though, because they were only two files.

  12. Does your firewall filter ZIPs which have been renamed to have a different extension?

    It should be easier for people to download one file and rename it.

    Also, an important tool is the LLB, which allows you to save many VIs to a single file (although you need to be careful in how you use it). You can save as an LLB by going to File>Save with Options>Development Distribution.

    Just a tip for next time.  :arrow:

    5743[/snapback]

    Yeah, I forgot about using libraries... duh! I'll be sure to use them in the future. Thanks :shifty:

  13. Could you post what you have so far so we have something to start with.

    It makes it easier to help if we are all talking about the same thing.

    Don't worry about how messy it is we just need someplace to start.

    By the way this is not trivial stuff.

    5729[/snapback]

    Ok, here it is...

    Have fun!!!

    Download File:post-2549-1124480207.vi

    Download File:post-2549-1124480223.vi

    Download File:post-2549-1124480268.vi

    Download File:post-2549-1124480275.vi

    Download File:post-2549-1124480285.vi

    Download File:post-2549-1124480300.vi

    Download File:post-2549-1124480317.vi

    Download File:post-2549-1124480385.vi

    Download File:post-2549-1124480429.txt

    Download File:post-2549-1124482786.vi

  14. I haven't seen your code but I doubt the event structure is the primary reason your diagram is so large.

    SubVi have always been my main tool for shrinking the block diagram. If you are going to spend time shrinking

    the block diagram I would recommend focusing it there first.

    5728[/snapback]

    Well, I already use about 10 subVI's (which are called multiple times) and plan to use more. I do have to agree though that many of my core calculations and functions are done in the main. I did this because I programmed the basics of the program first in the main and later became too lazy to change it afterwards :headbang: .

    And (plug plug) if you want to save time wiring and cleaning up your sbuvis try using the Subvi fixer.

    http://forums.lavausergroup.org/index.php?showtopic=1597

  15. Ok, here's what I want to do: I want to enable user drawing on a graph (similar to examples > general > uievents.llb > Draw Graph with Events.vi), but the graph I have has two plots. I only want to allow drawing on one plot. The problem with the Draw Graph example is that it only supports one plot graphs. In addition, having used LabVIEW for just two months, I am not too familiar with event structures and references. Moreover, it seems I cannot modify the example to be a subvi without having to rely on shift registers (I require the while loop to be in the main and the event subvi to be within two nested case structures in the loop, which makes using shift registers even more complicated. Maybe I could use local variables). Well, this is kinda a mess :oops:. I don't expect you, Neville, or anyone else to spend TOO much time on this, because it is probably tedious for you experts. BUT it would be much appreciated if you could show me how to have a subvi that controled drawing of one plot on a multiple-plot graph (that is in the main) using a while loop in the main and relying on the smallest amount of shift registers.

  16. Hey, as a physicist I find that rather offense. Yes, maybe

    there often are physics students that can hardly program and

    then start to use LabVIEW, with predictible results.

    But there is an opposite dynamic: phycisists quite frequently

    have extensive programming experience, e.g. with

    numerical codes, and end up being more or less obliged

    to use LabVIEW to automate some experiment, on account

    of LabVIEW's superior support for instrumentation.

    In other fields there isn't quite as much insentive for

    experienced programmers to switch to LabVIEW because

    G isn't that special as a language. The scheduling is a little

    odd, but the syntactic elements are nearly the same as for,

    say, C or Fortran.

    5717[/snapback]

    Tru dat :thumbup: even though I'm not a physicist :(

  17. Hey all,

    I have a VERY newbish question today :thumbdown: , and I am pretty sure the answer is no, but just in case: Is it possible to use event structures in subVIs such that they handle events of the main program? I know it's very likely this is not possible since it is out of scope of the main, but I am not 100% sure about it. I would find it REALLY useful to implement event handling in subVIs, as my main is already very large as it is.

  18. It's all to do with rounding errors with floating point numbers. So instead of using "x = y" use "|x-y| <= 1e-14" which checks if the difference of the two numbers is close to 0.  See attachment.

    This is not just a LabVIEW problem either.

    Kelvin.

    5569[/snapback]

    LabVIEW should integrate this into their comparisons when dealing with floating-point numbers...I don't see the use of preserving traditional exact comparison in this circumstance (even when comparing two different numerics, since one is casted to the other's type anyway). Maybe when LabVIEW 8 comes out :clock:

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.