12-01-2011 02:04 PM
Go to the idea exchange and vote for this. One of the best ideas and only has 19 votes.
I wrote an encoder but cannot share it because it was something that someone paid me to do. I can explain it though.
The VI takes a cluster reference and produces a JSON string representing the cluster. It supports strings, integers, floats, booleans and arrays. It also supports paths, VISA references and such representing them as strings. It iterates over the cluster Controls[] property looking at the Value property and determines the type by examining the type string from Variant to Flattened String. I found out later that there is something buried in vi.lib that does the same thing.
12-01-2011 02:08 PM
Hello Jose
I managed to get a working code, but went away from using the UDP functions...it proved too difficult.
I simply read the data file in using the xml format, then stripped out the data that I wanted. The code can be used on a system with as many inverters connected to the SunnyBox as you like, and you can strip out as many of the data values as you like. The file downloaded from the webbox comes in a zipped format and the code can even do the unzipping for you.
If you are interested I can dig out the appropriate code and post it.
regards
Ray
12-01-2011 02:11 PM
Ray,
That sounds interesting. I would like to see that if is not too much trouble.
Thanks,
Jose
12-01-2011 02:13 PM
Jose
Ok....I'm not in front of my work pc at the moment, but as soon as I am, I'll post the code for you.
regards
Ray
12-01-2011 04:16 PM
Thanks Ray,
Jose
12-16-2011 06:09 PM
Ray, I would also like to see your code.
02-28-2012 10:28 AM
Here is an implementation of a Labview JSON encoder: https://github.com/Philmod/Labview-JSON
Feel free to contribute!
02-28-2012 11:59 AM