CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun May 28, 2017 11:25 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Getting started
PostPosted: Wed Jan 04, 2017 12:52 pm 
Offline

Joined: Sun Dec 18, 2016 9:11 pm
Posts: 5
Our company has recently started evaluated CoDeSys for programming our PLCs.

As a step in our evaluation, we need to look at creating certain scripts for our needs.

But we have been able to find no information on how to get started or any kind of documentation on the available APIs in Codesys.

Any help, samples or even direction would be great.


Top
   
 Post subject: Re: Getting started
PostPosted: Wed Jan 04, 2017 6:05 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 192
Hi energymachines.

energymachines wrote:
But we have been able to find no information on how to get started or any kind of documentation on the available APIs in Codesys.

The documentation of the Scripting API is in the file "ScriptEngine.chm" which is in the sub directory "Online Help" of the CODESYS directory.

For now you can search for examples and ask for help in this forum but we will release a tutorial with examples in a few months.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
 Post subject: Re: Getting started
PostPosted: Wed Jan 04, 2017 9:36 pm 
Offline

Joined: Sun Dec 18, 2016 9:11 pm
Posts: 5
Hi,

Thanks for the information. That file does indeed look like an API reference. This should prove useful later on.

I did a quick search and found a hello world example on how to create, modify and delete POUs. Very helpful. I do have another question, though. Is there a way to read or write external files not in the Codesys project?

Any help, samples or even direction would be great.


Top
   
 Post subject: Re: Getting started
PostPosted: Thu Jan 05, 2017 9:23 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 192
Hi energymachines.

energymachines wrote:
I did a quick search and found a hello world example on how to create, modify and delete POUs. Very helpful. I do have another question, though. Is there a way to read or write external files not in the Codesys project?

The ScriptEngine uses the IronPython v2.7, which is mostly compatible to (C)Python v2.7, so you can use one of the many solutions available.

Some of the ways to open a file for reading or writing:
  • built-in methods, e.g. open(...)
  • one of the included python modules, e.g. codecs.open(...)
  • .Net API, e.g. File.Open(...)

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
 Post subject: Re: Getting started
PostPosted: Thu Jan 05, 2017 9:40 pm 
Offline

Joined: Sun Dec 18, 2016 9:11 pm
Posts: 5
Thanks!

You've been a great help.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 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