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 Aug 20, 2019 12:49 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri May 25, 2018 1:07 pm 
Offline

Joined: Mon Aug 16, 2010 4:29 am
Posts: 12
I know that we can create a declaration and also a program in Text ( ST ). But can we create POU in other languages and add or modify logic in it ?


Top
   
PostPosted: Wed Mar 20, 2019 10:26 am 
Offline

Joined: Thu Oct 25, 2018 2:41 pm
Posts: 9
Hello Codesys Support,

I'm interested in the answer for this question as well. I'm trying to create a Program POU in FBD. I want to create instances of the FBs POUs in the PRG with the script.

I know it is possible as the following instruction works when I put language to None. I just seem not able to find the correct parameter to feed the language parameter. It should be a GUID value which I do not know how to generate.

mypou = app.create_pou(name="autoPRG", type=PouType.Program, language= '???', return_type=None, base_type=None, interfaces=None)


Any advice?


BR,
Halim


Top
   
PostPosted: Fri Mar 22, 2019 8:57 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 253
Hi Halim.

Halim wrote:
I'm interested in the answer for this question as well. I'm trying to create a Program POU in FBD. I want to create instances of the FBs POUs in the PRG with the script.

I know it is possible as the following instruction works when I put language to None. I just seem not able to find the correct parameter to feed the language parameter. It should be a GUID value which I do not know how to generate.

mypou = app.create_pou(name="autoPRG", type=PouType.Program, language= '???', return_type=None, base_type=None, interfaces=None)


On our Web Help go to Scripting Engine -> IecLanguageObjectContainer and search in the page for "ScriptImplementationLanguage". The properties of that class return the necessary GUID for the different languages but as far as I know we only support to edit ST.

BR
Martin

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

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


Top
   
PostPosted: Thu Mar 28, 2019 9:29 am 
Offline

Joined: Thu Oct 25, 2018 2:41 pm
Posts: 9
Thanks Martin for the reply. I tried it before posting the question but, it looks indeed that the fbd language is not supported. I will have to do it in ST then.

Maybe another off-topic question regarding the syntax of python. The chm file in the codesys online help folder is for c#. Is there a similar chm for python syntax? or an online place for findin the correct syntax for python scripts?

Thanks in advance for your reply.

BR,
Halim


Top
   
PostPosted: Fri Apr 05, 2019 8:31 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 253
Hi Halim.

Halim wrote:
Maybe another off-topic question regarding the syntax of python. The chm file in the codesys online help folder is for c#. Is there a similar chm for python syntax? or an online place for findin the correct syntax for python scripts?


The C# syntax in the CHM file for the Scripting API is historical because it was the easiest way to get some documentation. You get used to it but we have a new documentation which is based on a manually created python stub.

You find it on our web help under the topic Scripting Engine

BR
Martin

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

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


Top
   
PostPosted: Tue Apr 09, 2019 7:52 am 
Offline

Joined: Thu Oct 25, 2018 2:41 pm
Posts: 9
Thanks again Martin :)


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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