-
Posts
1,991 -
Joined
-
Last visited
-
Days Won
38
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Ton Plomp
-
-
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
-
-
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
- 2
-
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
-
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:
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
-
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
- 2
- We (LAVA, OpenG, NI et al) need to agree on a license (do we mind 'Public-Domain'?)
-
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
- LabVIEW Runtime engine on the client (which may be suitable for a closed environment or home users)
-
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
- %Y-%m-%dT%H:%M:%S
-
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
-
Well, without the code that will be a hard guess.
Maybe you run the last batch without any data?
Ton
-
- Popular Post
- Popular Post
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:
{"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
- 3
-
Exactly which function are you calling?
Is it on the same machine as your development environment?
Ton
-
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
-
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:
Ton
- 1
-
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
- ADDQ
Ton
- 1
- 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
-
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
-
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:
Ton
-
Hi Mads,
I'll send you a DM to discuss things further.
Ton
-
There is a post on the NI forums showing how you can manage tab order within clusters.
Ton
-
I think that those setting (orientation and direction) are properties of the string control.
It's not something that should be dealt with in such a tool.
Ton
-
-
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
-
As far as I know, mantis is not a project management tool but a mere bug tracking system.
Correct, but you can use hooks to tell your project management tool what happened.
Ton
-
If you are looking into a project management tool there are options out there that cover these items. Hooking into these from within LabVIEW is most of the time an issue. I have no experience with that.
However most of the SCC's have management hooks that you can use to tell the project management tool what happened (see my post on integrating Rhodecode with Mantis).
Ton
Do you use manually updated typedefs?
in LabVIEW General
Posted
I never used it.
The only instance I can see where it has some value is if you use a Non-Strict Typedef as a GUI element and you need to be in control of the UI. However if you are in that position you have made a poor decision.
Ton