Jump to content

Justin Goeres

Members
  • Posts

    691
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by Justin Goeres

  1. I think we've got a pretty significant language barrier here, because I don't think it's clear to any of us what the real meat of your question is.

    QUOTE (lal @ Dec 12 2008, 02:20 PM)

    I am sorry,My mistake!I meant binary.

    What i want to do is to make a loop that gives me one value each time during the loop.

    Then I can take each value,compare with another value and make my graph.

    It is correct that if you put code outside the loop, you will only get the values from the loop after all iterations of the loop have completed. If you want to use the values in each loop iteration as soon as they're produced, you must put the code inside the loop.

    QUOTE

    It is something like the VI that user Maca sent me before some days..

    The difference with that i am trying to make is that the loop could create the switches state automatically.

    Instead of changing the switches one by one i can send a number(like a code).For example i send the number 16 instead of changing the 5 switches with the word '10000'.

    There are at least two things you may not be aware of, which may help you:

    • There is a pair of functions called Boolean Array to Number and Number to Boolean Array that will convert an integer to & from an array of boolean values.
    • You can display any integer in boolean or hex by right-clicking on it and selecting Display Format....

    I'm sorry we're not able to be more helpful. It's just really, really unclear what you're after.

  2. QUOTE (shoneill @ Dec 8 2008, 01:30 AM)

    Maybe I'm being a stickler, but I would have expected the creator of the universe to have better control over the language and the keyboard... :P

    I suspect that it's our flawed human language which is ill-equipped to completely capture the mysteries of God's communication and properly express the nuance of Truth*. God Himself speaks, and you would question His Almighty Grammar?!

    *Also, amplify the synergies (for you, crelf).

  3. Are you doing this with hardware, or is it just a programming exercise? The solution will be very different depending on whether you're operating any "real" hardware or whether you're just doing a demonstration that displays things to a front panel window.

    Also, have you looked through the intro materials in the LabVIEW Help? They're probably the best introduction to the basic tools available to you.

  4. QUOTE (lal @ Dec 7 2008, 10:01 AM)

    I am not using the labview for a long time,that's why i have a question.I have already searched at google and at some of my books but i haven't found the solution in my problem.I am trying to create a graph showing the fluctuation of voltage depends on 3 switches.

    What have you come up with so far? If you show us what you've got, we can definitely help you figure out what's wrong with it.

  5. QUOTE (God @ Dec 7 2008, 07:22 AM)

    Member No.: 2992.................... member number is the palendrome of the sum of the date i was Born. 29 ...

    Yes, I've always been quite proud of my user number. Thanks for noticing ;). Note, also, that if you add up the digits you get "2+9" and "9+2" which equals "1111". The prime factorization of 1111 is {11, 101}. All of these numbers are palindromes, too!

    If you like palindromes, I have a song for you:

  6. QUOTE (Darren @ Dec 6 2008, 10:12 AM)

    Popping up a dialog and requiring user interaction doesn't seem like too much of an improvement over Michael's Find/Replace trick (and I believe his trick is undoable).

    Having it in the context menu would save several clicks over the Find-Replace mambo. That's a huge improvement.

    Also, I would prefer having a confirmation dialog of some sort because Relink All Instances is an operation that can potentially change several hundred VIs whose windows I don't have open. I understand why Michael abhors dialogs, but in general an operation that's going to affect hundreds of files I'm not even looking at should both warn me before it does something and give me the chance to back out.

  7. I'd go for a new context menu item, right below Relink to subVI, called Relink All Instances. It would need to have a confirmation popup of some sort, maybe like Rolf mentioned: "There are 500 instances of this VI in memory. Do you really want to relink all of them? This operation cannot be undone." When selected it could just automagically do a replace, like Michael discovered.

  8. Can anyone explain this?

    A Picture Control that has been painted transparent has a different Erase First behavior in the context menu.

    Regular picture control, dropped right off the palettes:

    post-2992-1228161026.png?width=400

    Note that the Erase First item is enabled, and checked by default.

    But, if we use the paintbrush to paint the interior of the Picture Control transparent and then bring up the context menu again:

    post-2992-1228161037.png?width=400

    Note that now Erase First is checked and disabled so it cannot be unchecked.

    But there's more. If you try to set the Erase First behavior programmatically, LabVIEW doesn't generate an error and seems to accept the setting, but the change isn't reflected in the context menu:

    post-2992-1228161049.png?width=400

    Attached VI: Download File:post-2992-1228161220.vi

    It also appears that, regardless of the behavior shown, a Picture Control that's been painted transparent ignores all programmatic Erase First settings and behaves as though it's set to Always Erase. This, in turn, means that if you set a Picture Control's background to transparent, it will always tend to flicker as you draw more stuff to it, unless you take special precautions (like deferring panel updates).

    Why does a transparent-background Picture Control behave differently from a Picture Control with an opaque background?

  9. QUOTE (vultac @ Nov 29 2008, 06:43 PM)

    Hi guys, ive been wondering if there is anywhere in labview that i could program something so that the 1st 2bits would stay constant after i apply an addition to the previous set of bits after a for loop everyttime?

    for eg.

    (starting bit) (first 2 bits doesnt change) (first 2 bit doesnt change)

    00000010 -> 00000110 -> 00001110 ???

    The tools you need are in the Programming >> Boolean and Programming >> Numeric >> Data Manipulation palettes. The boolean logic functions (AND/OR/XOR/etc.) will all operate bitwise if you pass in U32/I32/etc. data, and there are also shift and rotate functions.

  10. QUOTE (jdunham @ Nov 26 2008, 09:15 AM)

    why would it need to be recursive? the OS doesn't recurse down those paths. Just test all the paths in the environment variable and you're done.

    It's not recursive? Hmmph. I always assumed it was. That does simplify it.

    QUOTE

    If you're trying to run the EXE, you can always just run it and if it works, great, if not, you handle the error from System Exec and branch off into whatever you had planned to do if "which" had returned nothing. (I assume you already thought of this, but you never know).

    Ya, that's an interesting thing. Turns out the program I'm looking at doing this with shows its "About" dialog if you call it with either no arguments or invalid arguments. So that's delightfully unhelpful :P. For 99% of the other command-line utilties in the world, that would work.

  11. QUOTE (normandinf @ Nov 25 2008, 05:05 PM)

    But that only gets me the contents of the PATH environment variable.

    I'm talking about something like the following example of which in the OS X Terminal:

    [18:58:35]$ which curl/opt/local/bin/curl

    It returns the path to the curl binary. If curl isn't in the user's path (for instance, if it's not installed in the system), it returns nothing.

    Obviously I could take the results of the VI you posted and list the directories recursively until I've either exhausted everything or found what I'm looking for, but I'm hoping there's a less brute-force solution than that.

×
×
  • Create New...

Important Information

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