CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Wed Dec 19, 2018 5:17 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Sun Nov 04, 2018 2:43 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 25
I've created a JSON parsing and composing library. I realize Codesys has a paid library for this, but I'm using Schneider SoMachine,and it doesn't support dynamic memory allocation, and it looks like the Codesys library uses the __NEW operator to create an array of variables. Hopefully someone finds this library useful. I've learned quite a bit from posts in this forum, and I guess this is my way of contributing back to the community.

There's an example program in the library, and commenting throughout the various functions.
I've tested this with a number of different JSON strings, but there's no guarantee that it's 100% bug free. My testing environment was Schneider SoMachine 4.3, with M241/M251 PLCs. Comment below to contribute ideas, request changes, or report a bug.

EDIT: version 1.0.0.1, fixes a few bugs

UPDATE: this package has been added to the Codesys Forge https://forge.codesys.com/lib/pro-json/home/Home/
Thanks to Ingo for the assistance with that.

Tim


You do not have the required permissions to view the files attached to this post.


Last edited by tvm on Thu Dec 06, 2018 11:04 pm, edited 4 times in total.

Top
   
PostPosted: Sun Nov 04, 2018 11:57 pm 
Offline

Joined: Wed Dec 28, 2016 11:00 pm
Posts: 66
Though this not the right subforum to post this, I would still like to thank you for your contribution!
I have taken a short look and it looks very professional, though I have not tried to run the provided example yet.

Anyway, thanks from a community member.


Top
   
PostPosted: Mon Nov 05, 2018 3:26 pm 
Offline

Joined: Mon Oct 01, 2012 8:33 am
Posts: 47
Thank you very much. This was something on my bucket list.


Top
   
PostPosted: Mon Nov 05, 2018 6:15 pm 
Offline

Joined: Mon Dec 13, 2010 3:02 pm
Posts: 44
Hey Tim,

thanks for that contribution. A really nice one!

I'd love to see this library in a project on CODESYS Forge https://forge.codesys.com.
You are heartly welcome to our beta program ;)

BR,
Ingo


Top
   
PostPosted: Tue Nov 06, 2018 5:18 am 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 25
@Ingo, the Codesys Forge looks like a good concept. I've created an account, but I've never worked with a repository before, so I'll have to spend some time figuring out how that works.
Tim


Top
   
PostPosted: Tue Nov 06, 2018 6:24 pm 
Offline

Joined: Mon Dec 13, 2010 3:02 pm
Posts: 44
If you like, I can help you.
For the beginning this might be a good read:

https://forge.codesys.com/forge/wiki/Migrating%20Projects/


Top
   
PostPosted: Tue Nov 06, 2018 8:29 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 25
step 1 "As a prerequisit, you need to have CODESYS SVN installed."
...available in the Codesys store for 500 euro

First, I don't know if the Codesys SVN would work with Schneider SoMachine, and second, I'm not sure I'm quite that committed to this project that I'm willing to spend 500 euro on it. Sorry.

Tim


Top
   
PostPosted: Tue Nov 06, 2018 11:34 pm 
Offline

Joined: Mon Oct 01, 2012 8:33 am
Posts: 47
500eu Ouch! When I signed up for an account, emphasis seemed to be on individuals rather than companies. If 500eu is the required entry fee, many individuals will quickly loose interest. Unfortunate for an otherwise worthy idea.


Top
   
PostPosted: Wed Nov 07, 2018 7:44 am 
Offline

Joined: Thu Aug 30, 2018 8:40 am
Posts: 37
Hello everyone,

you do not need a licence for CODESYS Forge!

Best regards,
Marcel


Top
   
PostPosted: Wed Nov 07, 2018 1:41 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 25
no, you don't need a license for Codesys Forge, but you appear to need a licence for CODESYS SVN in order to post projects to Codesys Forge. I could be corrected on this, but the first step in the instructions is: "As a prerequisit, you need to have CODESYS SVN installed." Codesys SVN is 500 euro


Top
   
PostPosted: Wed Nov 07, 2018 3:33 pm 
Offline

Joined: Mon Oct 01, 2012 8:33 am
Posts: 47
Codesys SVN is required because codesys source is stored as a binary blob rather than individual files, if I understand correctly.


Top
   
PostPosted: Wed Nov 07, 2018 5:55 pm 
Offline

Joined: Mon Dec 13, 2010 3:02 pm
Posts: 44
Hi Guys!

Sorry that this is not more clearly stated at the CODESYS Forge Website, or on the CODESYS SVN product page.

CODESYS SVN can freely be used with CODESYS Forge

As long as you only connect to repositories on CODESYS Forge you can use CODESYS SVN for free, without a license. We want to support the open source community with that.


Top
   
PostPosted: Wed Nov 07, 2018 8:09 pm 
Offline

Joined: Mon Oct 01, 2012 8:33 am
Posts: 47
Hey Ingo, that's great. I think the Forge is a wonderful idea.


Top
   
PostPosted: Mon Nov 19, 2018 10:41 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 25
The forge looks like a good idea in concept, but I honestly lost interest by the time I had to install the third software package, and run a .bat file to change the registry. This shouldn't be that complicated--all I'm interested in doing is posting the .library file for people to use. I might get into it again at some point, but right now I don't have time to learn all the ins and outs of SVN packages, as interesting as it might be.
Tim


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 14 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: Andreas Kehrer and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited