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 Tue Feb 18, 2020 7:21 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Python Reference
PostPosted: Mon Jul 29, 2019 8:22 pm 
Offline

Joined: Wed Mar 27, 2019 4:19 pm
Posts: 17
I would like to get some good references covering creating scripts to be executed on a PLC (Specifically a Lenze controller). There seems to be some material on the S3 site, but it is all presented as web pages. If it exists, I would like to download the documents as a single file or two.

The project I am working on requires the script to force values in the processor, read the resulting logic states and then release the force. Thanks in advance.

_________________
Thomas Stevic
Honeywell Intelligrated | Safety and Productivity Solutions


Top
   
 Post subject: Re: Python Reference
PostPosted: Tue Jul 30, 2019 8:35 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 262
Hi tstevic.

tstevic wrote:
I would like to get some good references covering creating scripts to be executed on a PLC (Specifically a Lenze controller).

I think you misunderstood where the python script is executed. The python script is executed in the CODESYS IDE (PC) and not on the CODESYS Runtime (PLC).

tstevic wrote:
There seems to be some material on the S3 site, but it is all presented as web pages. If it exists, I would like to download the documents as a single file or two.

CODESYS still contains the CHM file of the Scripting API which is generated from the C# code and requires you to translate the syntax to python. You can find it one of the following locations of your installed CODESYS:
  • "Online Help\<Language>\ScriptEngine.chm" in newer versions
  • "Online Help\ScriptEngine.chm" in older versions

tstevic wrote:
The project I am working on requires the script to force values in the processor, read the resulting logic states and then release the force. Thanks in advance.

Look at the other topics in this sub forum there are some example how to read/write/force variables on a PLC.

BR
Martin

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

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


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

All times are UTC+01:00


Who is online

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