Jump to content

Ton Plomp

Members
  • Posts

    1,991
  • Joined

  • Last visited

  • Days Won

    38

Everything 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. 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: (spot the differences) Ton
  2. O and please help us making that event 'official' Ton
  3. ik krijg volgende week eindelijk #win7 voor mijn werklaptop...

  4. You need to use Dynamic Event registration to get the event. Use the following code register the event: And inside the event More info on dynamic events. Ton
  5. I'm not sure if your allowed to install the RTE in Iraq or North Korea based on the Export rules imposed by the US. But we buy LabVIEW at NI in the Netherlands so we might not be under that law. Ton
  6. 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
  7. What holds me back on the NI site is the NI.com site agreement 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
  8. 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
  9. For some parsing tool I am thinking about 'Error try' to parse date strings. I am looking for the most common date formatter strings. Pleas add yours: %Y-%m-%dT%H:%M:%S 2012-10-02T17:16:03
  10. I extended the code with 'Pretty Print' for flattening (carriage returns, indents, adds spaces). I uploaded the source to bitbucket. Get the latest source at https://bitbucket.org/tcplomp/json-api-labview/get/tip.zip.'>https://bitbucket.org/tcplomp/json-api-labview/get/tip.zip. Repo is at: https://bitbucket.org/tcplomp/json-api-labview
  11. Well, without the code that will be a hard guess. Maybe you run the last batch without any data? Ton
  12. I tried to use this tool. And it looks great, however the function 'Variant to JSON' fails with a variant inside an object. I made the following changes: -Added support for Variant. By using 'Unwrap Variant' -If a <Null> Variant is found, replace this with a Null-Cluster -When Flattening the Cluster and number of elements is 0 then output '{}' (note that without this change an empty cluster would flatten to '}') This allowed me to have a cluster with optional variant Arguments flatten well: into: {"api_key":"xx","args":{"owner":"ton","repo_name":"repository","repo_type":"hg"},"id":915,"method":"create_repo"} (with args) or {"api_key":"xx","args":{},"id":378,"method":"get_users"} (no args) I added a method for 'Object' to list all element names: This will return the names of all the elements in an Object (Cluster), so you can scan them and retrieve them by name. Ton
  13. Exactly which function are you calling? Is it on the same machine as your development environment? Ton
  14. There's a localization bug, on european systems (where the ',' is the decimal sign). Decimal number are turned into integers.... Quick fix: (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: That also made the 'scripted' Json cluster nicer: Array as Attributes Array as Element Ton
  15. 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: Ton
  16. 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
  17. RT @labview_borat: C programmer make drawing of how his code work. I say yes, I do same and here is drawing. It is my code! He mumble...

  18. Please be aware that your code is not cross-platform compliant (even if those folders existed)... However I assume that somewhere in regedit the location of the NI Shared folder is stored. Ton
  19. In Range and Coerce with Waveform I tried to use In Range And Coerce with a Waveform. Unfortunatly this is not possible so I came up with the following alternative: Please make the following code possible: Ton
  20. Hi Mads, I'll send you a DM to discuss things further. Ton
  21. 'The Lion king is based on Hamlet', 'On what point does Hamlet say "Hakuna Matata"' O how I love #QI

  22. RT @labview_tools: NEWS->SQLite API For LabVIEW adds cRIO and sbRIO embedded targets support->http://t.co/etSoWO7w

  23. My favoure charachter died on 'A song of Ice and fire' (game of thrones) and I feel hesitation to read through... (for days allready) weird?

×
×
  • Create New...

Important Information

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