CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Jul 27, 2017 1:34 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Dec 13, 2016 5:29 pm 
Offline

Joined: Wed Jun 18, 2014 4:55 pm
Posts: 32
I am trying to run a script which accesses the project and does manipulations to it. This is run through command line. When I run it with --noUI option projects.primary returns None in the script.

It runs fine when run with UI. Am I missing something here.

It can be recreated with the project and script attached and the following command:

Code:
"C:\Program Files (x86)\3S CODESYS\CODESYS\Common\Codesys.exe" --noUI --project="UnitTests.project" --profile="CODESYS V3.5 SP9 Patch 5" --runscript="t1.py"


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


Top
   
PostPosted: Wed Dec 14, 2016 9:21 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 202
Hi Shabroz.Gill.

Shabroz.Gill wrote:
Code:
"C:\Program Files (x86)\3S CODESYS\CODESYS\Common\Codesys.exe" --noUI --project="UnitTests.project" --profile="CODESYS V3.5 SP9 Patch 5" --runscript="t1.py"

First you can try to put the --noUI at the end of the parameters, in the case the order of the parameters causes your problem.

If you always open the same project why not open the project from within the python script. When you have to open different projects, you can open the project from within the python script but use the parameter --scriptargs to transfer the project path to the script.

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 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