Jump to content

Jim Kring

  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Jim Kring

  1. Here's a new take

    On 2/17/2011 at 11:01 AM, SteveChandler said:

    LVOOP is new ground for me but I am starting to understand it much better thanks to these forums. So the only thing you need the message name for is so that you can wire it into a case selector right?

    This has me thinking of an idea for the idea exchange. What if you could wire the object right into the case selector? It would behave like a typedef with the ability to add a case for every value (child) and break if there is no default and you don't have a case for every value.

    Would anyone out there kudo an idea like that?

    Here's slightly different take on that idea

    >> LabVIEW Idea: Enumerated Variant <<

    It works with, but is not limited to, classes.  It's inspired by languages like Rust (enums) and Zig (tagged unions)

    Native Controls

    Native Case Structure

  2. Hi @KumarB

    VIPM will let you download older versions of packages.

    Here's what you may need to do:

    - In VIPM's options dialog uncheck the option to only show installable packages -- this will show all packages, even if they cannot be installed into the current LabVIEW version

    - In VIPM's package list file the package of interest and then right-click and choose Download Other version.

    - After downloading, you can find the package file in the C:\ProgramData\JKI\VIPM\cache folder

    - You can either install it with VIPM or change the file extension from .ogp to .zip and extract the contents.



  3. 2 hours ago, ShaunR said:

    You only need a "garbage collector" to clean up garbage :P It's an interpreted scripting language, with the heavy lifting done by C/C++, masquerading as a general programming language. It's also a lovey of the Linux world so expect ABI breaks often like with v2-v3.

    In C/C++ *the programmer* is the garbage collector (at edit time) -- I'd rather have someone else take the trash to the dump for me¬†ūü§£


  4. hey @jcstoke

    I would stick with LV2020 SP1 at this point. There has been a LOT of grief around the wire auto routing behavior in LV2021.

    Note: an active LabVIEW subscription will allow you to install older versions of LabVIEW (not just the most current), if you like. That's good, IMO, since it encourages people to both play with the new releases (and provide feedback earlier) and also stick with older and more stable releases when needed for production.

    To your questions about PXI vs cRIO/cDAQ it really depends on a lot of different factors :)

    Also, Python *really is* the s#!t. I probably spend as much time in Python as I do LabVIEW these days. They can play nice together, for sure.

  5. Based on some conversations I had with Philippe about this, he's wondering:

    If you have a VI reference at run-time, can you tell whether it is a static VI reference (via Static VI Reference node) or a dynamic VI reference (opened with the Open VI Reference) function, since the VI lifetimes (and lifetimes of references created within them) are managed differently by LabVIEW.

  6. OK, here's a game plan I think will work to fix the issue, yet without changing the behavior of the code.

    Since LV2009 (the version of LabVIEW the package is currently developed in) doesn't have the "Separate compiled code" feature), we'll implement a work-around by creating a special subVI to get the EOL that is not affected by the bug (Note: ignore the fact that the screenshot shows this VI open in LV2020).

    We'll do this by calling the Array to Spreadsheet string function with empty string inputs. It appears from testing that this does not get constant folded (or at least is not impacted by the bug). And, we'll cache this value for performance on subsequent calls. It'll all be packaged into a tidy little sub-VI, so that it's obvious what we're doing and why.


    I've released this as version

    Moving forward, we'll upgrade the sources for this package to LV2013 and mark all the VIs for "Separate from compiled code".  We would have done that sooner, but there was a build issue in 2013, due to the fact that NI introduced a VI called "Trim Whitespace.vi" that shares the same filename and thus collides with the OpenG VI (in source code form before it's name mangled in the build process). But, that's a different story (and I think we can work around it during the build process)...

    • Like 1
  7. 2 hours ago, Rolf Kalbermatter said:

    This is strictly speaking not equivalent to the originally intended implementation since this would remove multiple empty lines at the end while the original one only removed one EOL. However the Array to Spreadsheet String function should not produce empty lines (except maybe if you enter a string array of n * 0 elements) but that does not apply for this 1D array use case.

    You're right, Rolf. I can see some situations where my proposed "fix" would fail -- if the last element(s) of the Array of Strings intentionally contains EOL characters at the end  ["\t", "\r", "\n"]


    Now, looking at the "1D String Array to Delimited String.vi" that got added to LabVIEW (I'm not sure which version), we see it has a similar implementation (although it doesn't use Match Pattern and simply removes the calculated length of the EOL at the end of the string).

    I wonder if this VI suffers from the same constant folding compiler bug reported in this thread (I'm going to do some testing).



    This all makes me wonder if we should be creating the delimited string in a more low-level way (instead of relying on the Array to Spreadsheet String function, which adds the EOL at the end).

    Here's a simple solution:



    And, here's a potentially more performant solution for larger strings:


    Thoughts about the best approach here?


  8. 1 hour ago, bjustice said:

    I was going to use "LabVIEW Class Instance" in an effort to somewhat standardize with the modern NI datatype palette:



    Sounds good.


    38 minutes ago, bjustice said:

    LabVIEW 2013 SP1 32-bit yields proper behavior for fixed point:


    Just to confirm, do we want to continue to build this OpenG VIPM package for LabVIEW >= 2009, or upgrade to LabVIEW >= 2013?


    Yes, we'll upgrade the sources to LV2013 (and separate compiled code on all VIs).

    Let's do this, first, as a single, separate commit to git.

    Then, we can make the other changes.

  9. 2 minutes ago, bjustice said:

    Interesting, "Only used internal to LabVIEW" was a conscious decision within the OpenG toolkit.

    Any notion why this was the case?  Is it time to reverse this decision?


    Hmmm... that was a long time ago :)  I'm not totally sure what the thinking was.

    I don't see any problem renaming the enum value to "ByVal Class" (or similar).

  • Create New...

Important Information

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