Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. Sounds like you had a thrilling weekend ;) Benchmarks like these always interest me, it's neat to see how we can tweak implementations that seem trivial but have staggering effects.

    Yer, it still blows my mind at how crazy it went with just a 4MB array!

    And don't worry, I still have another installment (X-Control) waiting for me tomorrow!

    At first glance there is no Build Array's etc... but there are options to transpose the buffer, then th buffer gets reformatted to an XY Graph.

    That should be fun, can't wait! tongue.gif

  2. A quick loo at that first one reminds me of the condition we learned about in the "Clear as Mud" thread on the dark-side. WIring that buffer through the VI may let LV re-sue the buffer. I say "may" because I'd need to watch some buffer dots to be convinced.

    Ben

    Hi Ben!

    Can you go into more detail or post a link?

    ...Bad news is that I squashed this leak only to find out my X-Control that displays the buffer is causing the same massive allocations!

    Time to get my hands dirty again.... :)

  3. I had a memory leak that I had to plug and just want to share and discuss the results:

    Background

    Nothing new, but I have a Buffer Interface Class that is composed of an array LabVIEW Objects. I does all the required transactions for a buffer on the array.

    I inherit from this Parent and create wrappers for specific datatypes to create a much nicer API for my application code.

    post-10325-044086200 1288585931_thumb.pn

    After discovering the memory leak for a specific datatype (1D DBL + timestamp) I was able to squash it.

    I have a 100 pt array of DBLs + timestamp (6528 bits) in a 5000 element buffer = (6528 * 5000)/(8*10^6) = 4.08 MB buffer

    What really surprised me was the ferocity of the leak.

    Check out the stats!

    I initially used Build Array primitive originally, thinking that an allocation has to occur here anyways. As you can see from the Test VI on the left, these means that I am using Build Array in a loop which is LabVIEW 101 of what not to do.

    That is fine, but what this resulted in was a 250+ MB with 50+ MB swings of memory allocations!

    It was running so slow after 3000+ inserts I gave up waiting.

    Switching to Insert Array primitive, the allocation was only 12MB which makes sense: the buffer, the FP of the test VI and most likely a subVI interface. A gradual allocation occurs because as the buffer fills up as the Buffer Interface returns a subset of the full buffer. Once the buffer is full tho, the full buffer is returned and no further allocations occur (yay!).

    I am really surprised at the difference between the two primitives, I thought from using the build array I would get some of it back, instead it went crazy.

    But it sure was a fun testing it all. :)

    • Like 2
  4. Perhaps I misunderstood the purpose blink.gif.

    I am with you however, I did confirm this, and here is an extract from the conversation.

    Jonathon Green wrote:

    So, originally I interpreted the comp rules as yu want us to create LabVIEW Example VIs (like in the NI Example Finder), but really its an open slate? Full blown Games, Tools, Plugins etc... are all good?

    Todd Sierer wrote:

    Absolutely. So long as they fit within the categories above, it's all good.

    In other words: Go Mad! :)

  5. Let's get someone from LAVA to win this!

    I agree!

    Below are the finalists for each category from LAVA, please vote for them.

    Voting opens 29th October 2010.

    If I have missed anyone who is a member here, please post.

    Also, there are some awesome entries, so I recommend heading over and checking out all of them.

    Data Acquisition - Error Logger - Jonathon Green (jgcode)

    File I/O - Resolve Shortcut Path - Phillip Brooks

    Game - Word Hunt - tst (Yair)

    Math Analysis - 3D Picture Interaction, 3D Surface Editor - Vugie

    VI Server/Scripting - LVOOP Assistant - Jonathon Green (jgcode)

    Note: sorry for the shameless self-plug, but my intention is directed at LAVA

    An extra plug for: UI Controls - Congnoscent UI - JackDunaway

    Cheers

    -JG

  6. I've attached a quick sample code (apologize for the messy G code, but it works)

    Thanks Oliver.

    I still can't work out out what was happening before with the old data (RE: last post).

    But I have now managed to get the comms going between the processes on a new example.

    Cheers for your posts

    -JG

  7. In hind site, I could have grabbed the latest Device Driver DVD from the Developer Suite. (dooh!)

    Still... 311MB for a USB - Serial converter? Then about 20 minutes for installation time? Is it really necessary?

    You will be glad to know there is a VISA Run Time @ ~40MB which will keep your Application Installer down in size.

  8. ok, here are two pics showing the behaviour

    The old class seems to use a big font, but when I use the assistant on a newer class, even if I type the same text it uses a smaller font.

    Yes, the reason for that is as explained above.

    10-pt would still 'fit' if you always less characters.

    Another thing. Don't know if this is related to the LVOOP Assistant or not, but it happened shortly after installing it. Once, when I went to the Class properties dialogue I got a bunch of LV errors and none of the sub-pages loaded properly. The errors were not fatal, and selecting the Properties again caused it to work fine. This has only happened to me once, and I have only been using 2010 for a few weeks now. Will keep you posted if it happens again and try and make a note/screencap of the error messages.

    (Are you using the LECC2010 version - v0.16?)

    Hmm, I saw this once too, but never with LV 2009, only in LV2010. And like you said it was fine after reloading. I can't seem to replicate it, but will have to keep an eye out.

    If anyone has any info on this or seen anything similar before when working with Classes + scripting, please post

  9. Hi neil

    This tool rocks!

    Thanks for the kind words.

    Ammendment to my previous comment: all newly created classes have correctly sized banner text when set via the LVOOP Assistant

    However, a class I created previously (when I still had the font size set to 10 in the Icon Editor) seems to still be using the using the old font size.

    I set the Class to defaults (8) if the IE2009 (layer) data was empty, and I always use 8 internally (so this hasn't cropped up for me).

    The other reason is I decided to leave all other settings that exist alone is - in case they have been set for a particular reason.

    But I could override the 10 to an 8 if this is always preferred (like I do currently for Caps)?

    Also, would you mind posting a screenshot of what it looks like?

    Cheers

    -Jon

  10. This is definitely not a better way to do but maybe a workaround to try (I've implemented this solution in this XControl):

    1. Create an hidden cluster with a string and a variant in your facade VI
    2. Create an event case on Cluster "Value change"
    3. Give cluster reference to your parallel process
    4. Do "Value (signaling)" using the cluster reference to "fire event"
    5. Process action in the event case create in 2.

    String and variant allows you to implement multiple action and different data to process in your facade VI.

    Hope this can work for you.

    Regards

    Olivier

    [LV2009]

    Hi Oliver

    I tried your method but I still am having a problem.

    Nothing happens when writing to the value-signalling property in the dynamicVI the first time.

    Subsequent writes cause an event to be fired but I get data from the previous event!

    I have tried with different styles of dynamic processes just to see if that changes anything - but I get the same results launching a non-reentrant VI/reentrant VI/VI template with a static or dynamic reference.

    Any thoughts?

    FWIW:

    The Value Signalling PN works fine when it is on the X-Control.

    And the above runs fine when the dynamicVI is separated out of the X-Control.

    Cheers

    -JG

  11. Howdy

    I am trying to implement an X-Control that has a parallel Process and communicate between them.

    The Process is a User Interface that I want to run in parallel so it can be interacted with and the X-Control can continue to do its own thing (non-blocking).

    I have written separate code before which is easy but I am using an X-Control as I want to encapsulate both the Control and parallel User Interface into a single entity.

    In trying to communicate from the parallel Process back to the X-Control I had the X-Control register for Dynamic Events which will come from the Process.

    With the idea being the X-Control will receive a message/data and e.g. Update

    post-10325-071705600 1287542962_thumb.pn

    These events are getting queued, but they are not executing when I fire the event.

    They are getting executed when the next standard event (e.g. Data Change) occurs (hence I know they have been queued).

    Anyone have a workaround for this or a better way to do the above?

    Cheers

    -JG

  12. JG,

    I'm embarrassed; I didn't realize you were the last poster on the thread!

    oops.gif

    Hey! No need to be embarrassed.

    At the end of the day we are all just trying to help each other / looking for help.

    I am just glad you got it sorted.

    (not that your post was silly) but I have done more than my fair share of silly posts :)

  13. JG,

    Sorry, I got a notification of your post as I was submitting my update. Check my edit above! Thanks though!

    No probs.

    I am aware of the read-only issue (as I have posted on the thread in one of the links you referenced) and that is one of the reasons I was asking for a screenshot.

  14. I want to have a class control in my controls palette. When I try to point .lvclass file in palette editor nothing happens.

    I'm only able to add it to the palette with following code:

    post-7450-005802600 1286973963_thumb.png

    (note "World.ctl" after lvclass path)

    With this method control appears in the palette as big quotation mark (same as when item is not found), but works good.

    Is there any "normal" method to add .lvclass to palette?

    Hi Vugie

    I recommend creating a .ctl file with a copy of the Class Control on it.

    Then add it to your Controls palette.

    The above is all transparent to the user - they can select it just like normal.

    <object id="scPlayer" class="embeddedObject" width="950" height="691" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/4aca46f9-66a3-4942-95a6-b927b20bc378/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/4aca46f9-66a3-4942-95a6-b927b20bc378/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/4aca46f9-66a3-4942-95a6-b927b20bc378/FirstFrame.jpg&containerwidth=950&containerheight=691&content=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/4aca46f9-66a3-4942-95a6-b927b20bc378/Class%20Control%20On%20Palette.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/4aca46f9-66a3-4942-95a6-b927b20bc378/" /> Unable to display content. Adobe Flash is required. </object>

    Cheers

    -JG

×
×
  • Create New...

Important Information

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