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.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions