Jump to content
drjdpowell

[CR] JSON LabVIEW

Recommended Posts

14 hours ago, drjdpowell said:

I’m recording my work on Messenger Library and all other reuse libraries, and hope to claim at least some of them also.   JSON just happens to be what I am working on right now.  

Yes. But what is the requirement that means it has to be under your company name? Is it that you fear if it is not then your argument to the tax office is diminished or is there a specific clause that states open source does not constitute a "product" that you own and therefore cannot be accepted? i.e. is this a speculative move or is there a definite clause that applies?

Share this post


Link to post
Share on other sites

Speculative, to establish that the work is legitimate R&D of my company.  I want to be able to show a tax inspector a company-branded product on the LabVIEW Tools Network.

BTW, I’ve found I can separate the new stuff into a separate, non-conflicting project, so LAVA JSON can be left as is (I’ll bring out a new version with some modest performance improvements).

Share this post


Link to post
Share on other sites
5 minutes ago, drjdpowell said:

Speculative, to establish that the work is legitimate R&D of my company.  I want to be able to show a tax inspector a company-branded product on the LabVIEW Tools Network.

BTW, I’ve found I can separate the new stuff into a separate, non-conflicting project, so LAVA JSON can be left as is (I’ll bring out a new version with some modest performance improvements).

Just be careful they don't label you a contractor then there are zero benefits to being a company apart from liability.

Share this post


Link to post
Share on other sites

Hi all,

I am trying to start working with this library, but it doesn't look straight forward to me. There are only 2 polymorphic VIs that I can access to, but I see that you guys are using a wide variety of VIs that I cannot even get to find. Is there any "user guide" thread in the forum that I am missing? Can you guys address me or give me some hints on how to start with the library?

Thank you so much. 

Share this post


Link to post
Share on other sites

All the functionality is in those two poly VIs (personally, I’d prefer a more spread-out pallet).  There are a few examples installed with the package.

Share this post


Link to post
Share on other sites
12 hours ago, JPina said:

Hi all,

I am trying to start working with this library, but it doesn't look straight forward to me. There are only 2 polymorphic VIs that I can access to, but I see that you guys are using a wide variety of VIs that I cannot even get to find. Is there any "user guide" thread in the forum that I am missing? Can you guys address me or give me some hints on how to start with the library?

Thank you so much. 

Place the polymorphic VI on the diagram and click the label at the bottom. A menu with all the functions will appear which will enable you to choose from all the functions. Copy and paste the VI (or drag with the mouse+CTRL to create a copy) and choose another function as before to create another function.

  • Like 1

Share this post


Link to post
Share on other sites

Could you reattach with the control values saved as default?

-------------------------------------------------------------------------------------------------------------------

 noi that o to  |   do choi o to  |  do choi xe hoi 
 
 
Edited by Jan_bee
edit content

Share this post


Link to post
Share on other sites

Hi,

is there any reason why the VIs ar not reentrant? (shared clone) If there is no reason, could someone modify the VIs to reentrant and update the package.

The reason i would like reentrancy is that when using this library in parallel loops, they wait for each other.

BR Ziga 

Share this post


Link to post
Share on other sites

I was going to say I don’t do blanket shared-reentrant, as that create at least one copy per processor, and for lesser-used functions this is memory overhead that is often not justified.  However, I’m not sure that is true of LabVIEW 2017 (seems to be only one clone).  

Edited by drjdpowell

Share this post


Link to post
Share on other sites

With JSON API v.1.5.4.39 , I have a problem converting variant data from JSON back to the correct data type.

See attached image/vi

Did I misread something, or did I forget to enable 'variant naming' somewhere else in the JSON API?

 

JSON API - issue reading from JSON.png

JSON API - issue reading from JSON.vi

Share this post


Link to post
Share on other sites

I'm using JSON to store control and indicator values of which I don't know the datatype.

I use dynamic VI calling, I set controls using VI Reference -> Set Control values, run the VI, and get the indicators using 'Get Control values'; those need an give back variants. These values I want to load from JSON and store back to JSON

Share this post


Link to post
Share on other sites

I'm using this library, but I've had to modify alot of the variant related attributes for performance and data handling.  Most of what I have removes the OpenG stuff and directly casts types.  It will also properly preserve data names/typing unlike the current version without extra variant to data casts.

I don't really want to go through all the data types that I'm not using, but If you're still interested in maintaining this its probably a worthwhile upgrade.

Get as Variant

image.png.254f1005fbc7d6444708d8aad8bf8d5c.png

image.png.1b5f272306b67eba59faa6fa5d89b7b4.png

logic will change to look more like this

image.png.6acfa92607afb9b74ba1caf6d0a8677f.png

 

surely there will be some difficulties with this approach on certain data types, and I dont really want to go through and test them, but dynamically building variants is pretty slow and some of the functions are quarter baked which removes the type string.

I've got an assortment of scalars, arrays, and clusters working with this method.

Let me know if you're interested in this.

Share this post


Link to post
Share on other sites

I ask about performance because I wouldn't have thought your new method would in general be faster.  

When I was considering how to improve the performance of this library I became convinced that I should produce a new package that delt directly with strings, abandoning the objects and variant attributes used here.  That package is JSONtext, which I use in all new work.  So I am unlikely to make more than minor improvements to this library.  However, someone else could continue development of LAVA JSON if they like.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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