Jump to content

Yair

Members
  • Posts

    2,869
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by Yair

  1. Since the vision assistant is made by NI, wouldn't that be the logical place to look? Anyway, I think it's part of the vision module, so you probably won't find it for download. You might get an evaluation version, though. You should talk to your local NI representative.
  2. If you read the help for the function, you will see that the colors of the boolean array are determined by the first 2 elements of the Colors[] array. All you need to do is drop a couple of color box constants (from the Numeric>>Constants palette) in a constant array and set them to be white and black and wire that constant in as the colors.
  3. I'm fairly certain you won't find any image either. The Get Term Image method will work on all controls, but since controls inside a cluster don't have a terminal of their own, the image for it can't be returned. What you will probably need to do (and what NI probably does) is to hold a small bank of images for all the data types and use those images for controls inside clusters. Getting the images using scripting should not be all that hard. Another option would be to write a simple piece of code which will copy the cluster's controls into a new VI and then use the Get Term Image to get their images. This should have the advantage of being more general and probably faster to code.
  4. Error 1 means invalid input (as the description should tell you). This probably means you typed your path into the path control and something about it is invalid. It would be better if you use the browse button to select the file you want. If you want to create a new file, you should right click the path control and change the browsing options to a new file. Also, since your files have a specific extension, you can configure that in the browsing options as well.
  5. This can also be done with the standard picture VIs (which ship with most versions of LV) and can be found (at least before LV 8.0) in the Graphics & Sound palette. You basically need to use Flatten Pixmap and wire the result into Write BMP file. You will also need to convert your array into a boolean array, which you can do by wiring it into a Not Equal to Zero? node.
  6. The Open/Create/Replace VI has a File Path input. All you have to do is wire a file path into it and you won't get the dialog. To get the actual paths you can use the File Dialog VI from the File I/O>Advanced palette for one file and then strip the extension and use the same name for the other file. To write a file without saving simply wire a path into the File Path input. In general, your program would probably be better off with an event structure and less locals and sequence structures. I suggest you go searching for some LV tutorials to learn more.
  7. If you mean that your timestamps are in strings, then you will need to convert them to LV timestamps by breaking the strings into their different parts, converting those parts to numbers, wiring those numbers into a date/time cluster and converting that cluster to a timestamp. The basic VIs can be found in the Time & Dialog palette. A nice example of how this can be done can be found here.
  8. The timestamp is essentially the number of seconds since January 1904 in DBL representation, so you can substract one timestamp from the other and then divide the result by 86400, 3600 or 60 to get what you want.
  9. That's what I wanted to hear. Thanks.P.S. I missed some words in my reference to 6.1 - I meant to say that there is no way to make it truly independent from the calling VI and portable without writing external code and compiling it for every target (at least none that I could think of, which isn't to say that there isn't).
  10. Does that mean that the only way for me to output the results to my application (not to the test VI) is through those 2 strings? Can't I use anything else?I suppose I could output those strings to a mediator and use that to generate what I want, but that seems rather ridiculous. I would really rather add more options into my interface now (while still keeping the stings, of course) because I haven't managed to find an application where this will really be useful yet and I don't know if I'll use this after the challenge.
  11. Great challenge, and I'm happy to say that I've completed the basic part of my API and am thinking of some cool apps, but I do have a couple of questions. 1. The challenge states that my application HAS to use the same API as the test VI. This strikes me as very limited. I would much rather extend my API and use more powerful features in my application. Is this not a possiblity? 2. Both dynamic events and the mouse input VIs were not available in 6.1, so obviously there's no way to make it really portable in 6.1 without writing some external code (which is not allowed by the rules :laugh: ). Did you include the 6.1 template on purpose or was that just an oversight?
  12. If you suspect this is the source of the problem, you can simply remove that loop and see if this keeps happening. The message queue VIs use a reentrant DLL, so I don't think that it should lock the UI thread in any way, but it is easy to check. LV has support for mouse scrolling (although unfortunately not in the event strucutre) if you go to the Advanced>Input palette (not sure where it is in 8). I think it was Jean-Pierre Drolet who once posted an example showing this here. Try searching for it.
  13. Indeed it was, and to quote his response when he finds out - "Best burger I've had in years". And it also had a good call on "the Schwartzenegger presidential library"... Fun movie...
  14. Yair

    Jesus

    Now there's a true dyslexic. Or maybe a meter, as your current environment would spell it? That's because y'all are Premium Members, and can cuss all you like (even though "######" has already been official cleared as a legitimate word by the highest authority (American TV). So, you're going with the "Thou art god" vibe. I grok that (or maybe I Grok Spock? ).
  15. And speaking of twice as many - Congrats as well, Mike (which one, though?).
  16. Yair

    Jesus

    I see we have a bear feeding the bears...
  17. Yair

    Jesus

    It was a general advice, not meant specifically as a reply. I don't suppose these two sentences can be connected in any way, can they? OK, Someone has been watching "The X-Files" just a little bit too much.
  18. Yair

    Jesus

    Not a bot, just someone who's trying to promote his book in as many avenues as possible. Either make a good joke about the posts or ignore them.
  19. Yair

    Jesus

    Try talking to the mounties... Maybe they can help.
  20. You guys should consider watching Firefly, a short lived series which was aired at 2002. It focused more on humor and action (although it did have some good drama) and it employed such devices as cool photography (stuff like doing zooms in space), no SFX in space, no aliens, Chinese as well as English and a huge set for the ship which really made it look real. This was also much less "technical" sci-fi than other stuff and more sci-fi in the concept of creating another environment for our own stories. The series was canceled after half a season, but a movie ("Serenity") was released last year to finish the basic story (with a great scene at the beginning which had two shots going for almost 10 minutes).
  21. I believe the premium members are not subject to this filter, so you can vocalize your discontent. Just let me get out of the way first...
  22. I asked the cryptographer friend I mentioned about this and he provided me an explanation which shows that this is not LV's fault. He said that we can discard the number of times an element is switched more than once back to its original position as statistically insignificant and just look at the number of elements which were never moved.Then, he said that the formula for calculating the chance of an element not being chosen was defined as which means that the larger n gets, the closer the result is to e^-1. Then, he said that the chance of a single element of our array NOT being chosen is ((x-1)/x)^2x (it can be chosen once in each selection and we select 2x numbers because we select 2 random elements in each iteration.He also said that the formula shown earlier only gets to e at infinity, but it gets very close to e at a very early stage, so basically that equation will be very close to e for any number above a certain number (let's say 20 or 30). With some simple power math he showed that the expression I wrote is equal to e to the power of -2 which comes out to 0.136, which is the result I got and means that LV's random function is now cleared.
  23. I once saw a German wine expert tell Jeremy Clarkson the same thing about Blue Nun wine - no one in Germany likes it, so they send it all to the UK. Amen to that (although I can't say I read that novel). I could see how someone going through the various LL books would resort to drinking a lot of beer as a solution, though. Those books can be extremely hard to follow properly. It's almost like a space (soap) opera.
  24. I believe you've misunderstood Rolf on this point.LV does not generate C code, but machine code. There are some exceptions (like LV embedded or (I think) the PDA module), but not the PC version. If I understand Rolf's explanation correctly, he meant that if you build your VI as a DLL instead of an EXE, LV will use the CVI RTE to generate parts of the DLL. At no time is the LV code translated to C.
×
×
  • Create New...

Important Information

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