LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone implemented JavaScript Object Notation in LabVIEW?

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.

=====================
LabVIEW 2012


0 Kudos
Message 11 of 18
(1,415 Views)

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

0 Kudos
Message 12 of 18
(1,412 Views)

Ray,

 

That sounds interesting. I would like to see that if is not too much trouble.

 

Thanks,

 

Jose

0 Kudos
Message 13 of 18
(1,409 Views)

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

0 Kudos
Message 14 of 18
(1,407 Views)

Thanks Ray,

 

Jose

0 Kudos
Message 15 of 18
(1,398 Views)

Ray, I would also like to see your code.

0 Kudos
Message 16 of 18
(1,371 Views)

Here is an implementation of a Labview JSON encoder: https://github.com/Philmod/Labview-JSON

 

Feel free to contribute!

Message 17 of 18
(1,269 Views)
Feel free to mention me in the copyright 🙂
=====================
LabVIEW 2012


0 Kudos
Message 18 of 18
(1,262 Views)