Jump to content

viSci

Members
  • Posts

    456
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by viSci

  1. Thanks Yair and others that replied.  I did find the caveat you mentioned.  For some reason I wishfully was thinking that LV was automagically creating a event queue at each event structure :)

     

    From LV Help:

     

    Make Sure You Have a Register For Events Function for Each Event Structure

     

    If you wire the event registration refnum to more than one Event structure, each Event structure handles dynamic events out of the same event queue. This can occur if you branch the event reg refnum out output of a Register For Events function to another Event structure. This causes a race condition, because the first Event structure to handle the event can prevent the other Event structure from receiving the event if it completes the event case before the other Event structure executes.

    To avoid this problem, make sure you wire each Event structure which handles dynamic events to a unique Register For Events function. 

  2. Here is a simple application that uses User Events to communicate with a single process running in a subpanel.  

    I am finding that I cannot have both the main vi and the subpanel process both registered for the same set of events without

    LV crashing.  If anyone would care to take a look I would appreciate it very much.  

    Just unzip and run the Aircraft Emulator vi with one event enabled, observe the event generation and reception counters are keeping up with each other.

    Now enable the 2nd event and watch LV crash.  BTW, I have tried running the process outside the subpanel and it still crashes.

     

    TIA

    Aircraft Emulator.zip

  3. The 3D picture control is very cool and it does seem possible to create wrappers that would emulate basic 2D functionality while benefiting from such features as object hierarchies, support for transparency and anti-aliasing.  I have also been toying with the .net GDI+ picturebox, It is much more sophisticated than the native LV picture control and am surprised that there are little to no LV examples of its usage.  I have also heard a rumor of a LV->SVG toolset which could be used to turn an embedded browser into a rendering canvas.



    Wait are you saying that a decision made way back in LV 2.5 has been the reason why LV 10 years later still does have GDI+ under the hood?

  4. Yeah the opcode thing is cute

     

    http://lavag.org/files/file/26-picture-hacks/

     

    but not sure it is anything useful. Reminds me of this crazy stuff to parse SVG into a LV Graph

     

    http://drics.googlecode.com/svn/LabView/SVG/

     

    I am really surprised no one (at least I have yet to find them) that has explored the .net PictureBox for use in LV.

    It has tons of cool features.  I have been trying to use the API but so far have not gotten much to work yet.

  5. Just wondering, since we have some SVG afficianado's in the audience, if it is possible to use LV to dynamically creat SVG content and display within a .net container?  I can see that it is possible to place a .net picture control on the front panel but I think SVG would be much more elegant.  

     

    A little ranting here...

     

    I am a little frustrated that all LV programmers have for developing embedded custom 2D graphics is the very very very old 2D picture control.  The rest of the world has marvelous tools like WPF, SVG or even GDI+.  Yes, I know, as many have pointed out, that you can do anything with the 2D picture control and I think LV'ers get a kick out of how much they can force out of such primitive tools.  Wow, how did you get the picture control to do that nice anti-aliased display with z-ordering of emulated alpha channel bitmaps?

     

    I think some people would be willing to pay for a nice 3rd party 2D  graphics toolset.

     

     

  6. I have been looking for a way to generate perfect antialiased circles that I can programmatically manipulate (position, radius, color).

    Seems like a simple enough goal but is not very easy to do unless you want to jump into the 3D picture control api and generate meshes for every anti-aliased primitive you want.  Finally I found that the silver gauge control has some ultra cool antialiased circular decorations that can be

    used for this purpose.  I am attaching an example to demonstrate.  It would be really nice if the decoration palatte would get some native anti-aliased primitives and of course it would be extra nice if the picture control would also get anti-aliased as well.  Actually I think the holy grail would be a 2D version of the 3D picture control.

     

    BTW, you can use the xy graph to draw antialiased circles but they always look a bit bumpy.

    Antialiased Circle.vi

  7. Hi Vugie,

     

    I am also exploring various 3D engines for use in aircraft simulators.  I thought at first to use the native 2D picture control with your BITMAN library (very nice!) but found that I would need native support for transparency and anti-aliasing.  Do you have any examples of using LabVIEW with VTK?

     

    Thanks

  8. Ok, here is what I have found...

     

    Anti-aliasing options need to be selected in the advanced settings of your computers graphics card.  Once I enabled

    antialiasing (there are many different modes, see http://www.tomshardware.com/reviews/anti-aliasing-nvidia-geforce-amd-radeon,2868.html for a good tutorial)

    for all applications on my machine then my 3D picture control started drawing with anti-aliasing.  You can configure anti-aliasing

    to be global for all app's or tailored to specific app's with the app determining if anti-aliasing is enabled or not.  I think if you do this then the anti-aliasing

    enable property node in LV might start working.

     

    Thanks Vugie!

  9. If I set the digital display in a text ring to hexadecimal I expect that I should be able to show the radix.

    The option is not available (I was wondering why) and the only way to sort of get it to look correct is to use the advanced format option and insert a 'x ' in the format string. The does not look correct since the normal radix display does not seem to use a normal font. Was wondering if anyone had any better ideas?

  10. I am trying to create an array of numerics that are as close together as possible.

    A long time ago (maybe on info-labview) I seem to remember a discussion on this subject and a technique for doing this.

    But so far I cannot figure out what the trick was.

×
×
  • Create New...

Important Information

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