Jump to content

Ton Plomp

Members
  • Posts

    1,991
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Ton Plomp

  1. In your code the event is triggered when any of the fields inside the cluster is modified.

    Have a look at the first image I posted to see how you can get a specific field inside the cluster.

    post-2399-0-27373300-1349535079.png

    First we caste the ArrElem to a cluster, then we get all elements inside the cluster, and afterthat we take the third element (the boolean) and register the event for that control only.

    Here's your code:

    post-2399-0-96803700-1349868467.png

    (spot the differences)

    Ton

  2. On topic:

    The testcase include the followin JSON:

    {"T1":456.789 , "T2":"test2", "Nest":{"ZZ":123,"NestArray":[1,2,"Hi"] }}

    Is that even valid JSON?

    Is it allowed in JSON to have different objects types inside an array? (NestArray consist of two numerics and a string)

    JSONLint says its valid, but I feel oppposed to that (maybe just limited by LabVIEW)

    Bugfixes:

    • Boolean JSON text should be lower case (code)
    • Numerics should use '.' as decimal sign (code)

    Discussion:

    What should we do with NaN, -Inf, and +Inf? JSON does not support them. NaN could be null but the others I don't know.

    Official JSON sets those three values to 'null' however I lean to this idea. For numerics we should use 1e5000 though.

    Ton

  3. What holds me back on the NI site is the NI.com site agreement

    User Contributions. Any information or material ("Communications") that you transmit to this Site is considered non-confidential. NI has no obligations with respect to the Communications, and NI is free and you authorize NI to copy, disclose, distribute, incorporate, translate and otherwise use the Communications and all related data, images, sound, and text for any and all purposes.

    Another thing that is holding me back (and is holding the community back) not just on NI.com, but on LAVA as well, is the fact that we lack a accepted distribution system.

    I am jealous of python where I can install a debian package and then use 'easy_install' to get a pacakge just by name. The LabVIEW tools network is a step forward, but I still cannot run a command 'install AQ-JSON-API' and the API will be installed.

    And we need to open up the source if we want to have a strong community.

    For instance ShaunR added support for escape quotes in the product. Now I have to go to his code, detect the changes (which is hard since LabVIEW is binary and he backsaved to 2009), merge these into my Mercurial repo(Done).

    My opinion:

    • We (LAVA, OpenG, NI et al) need to agree on a license (do we mind 'Public-Domain'?)
    • What is exactly the issue for NI that disallows it on BSD. The only limitation I see is the 'Attribution'. But attribution could be limited to a line in the on-line help of that feature.
    • We need to start with source-code repositories. (heck there is allready a Lavacr project at google code in Subversion), and then create products/downloads
    • We need a distribution system that is lightweighted and reliable

    Ton

    • Like 2
  4. Well, SCORM defines that the application should run in the browser. So you need to take care of some issues:

    • LabVIEW Runtime engine on the client (which may be suitable for a closed environment or home users)
    • Or remote interfacing, where the executable is hosted on a server, that returns a webpage with websockets

    It is doable, but may be hard.

    Ton

  5. There's a localization bug, on european systems (where the ',' is the decimal sign). Decimal number are turned into integers....

    Quick fix:

    post-2399-0-63659600-1348913578.png

    (or my clone at google code:

    https://code.google....tcplomp-jsonlv/)

    Edit:

    Your example JSON code, was something that my VariantProbe couldn't deal with.

    Some debugging showed that your array ([1,2,3]) was stored as a void datatype. I modified the json_array to store the array as the variant, and the elements as attributes. This returned the following tree:

    post-2399-0-62698100-1348921080.png

    That also made the 'scripted' Json cluster nicer:

    Array as Attributes

    post-2399-0-15296400-1348921479.png

    Array as Element

    post-2399-0-81738400-1348921557.png

    Ton

  6. One issue is that if you call Get Date/Time in Seconds, the minimum interval is ~1ms. Now this is much better than ~2009 where the minimum interval was ~14ms, if I recall correctly. Meaning, even if you call Get Date/Time in Seconds a million times in a second, you only get ~1000 updates.

    The 14 ms is an OS limitation (for WinXP that has an internal timer that has an update rate just above 50 Hz).

    If I use Get Current Time is has a resolution of 1 uSec. When converting this to double you'll have rounding issues limiting you to 0.5 uSec.

    Technically a timestamp can store much greater resolution. If you go subtracting almost similar timestamps (like your TS1 and TS2) you'll better use Cluster substraction:

    post-2399-0-62667600-1348911923.png

    Ton

    • Like 1
  7. I have the same issue.

    • It's not changed by <LabVIEW>\resource\dialog\lvconfig.llb\LV Config Write Numeric (I32).vi or <LabVIEW>\resource\dialog\lvconfig.llb\LV Config Write String.vi
    • It's changed just before the 'Getting Started Window' is shown
    • It's changed when I open a project from the GSW
    • It started recently. I suspect the f2 patch for 2011 (however my startup window says I only have the f1 patch installed)
    • I have the following providers installed:
      • ADDQ
      • Symbio GOOP

      [*]It's stored as defaultConPane="4834"

      [*]I have WinXP with English OS with Dutch localization (a ',' as decimal sign)

      [*]LabVIEW 11.0.1f1

    Ton

    • Like 1
  8. I tried to add info to an existing page on the wiki, but I seem not to be able to edit the page.

    AFter I make my edits, I use Save Page, but I get taken to the following URL:

    http://labviewwiki.org/index.php?title=Snippet&action=submit, which redirects me to a a page 403.shtml on the wiki.

    I have this with IE8 and Opera.

    It does not change if I try to edit a section of a page.

    Can anyone else edit a page?

    Ton

×
×
  • Create New...

Important Information

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