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 Dec 18, 2018 5:04 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Dec 05, 2017 2:37 pm 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
I have done a VBScript that works if I launch it by prompt, but if I try to start the script from code I can see wscript.exe starts but looks like that the execution is blocked.

BR


Top
   
PostPosted: Tue Dec 05, 2017 7:46 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3022
Hi,
which plc are you using?
Guess an entry in CODESYSControl.cfg

[SysProcess]
Command.0=xxxxx
is probably needed.

BR
Edwin


Top
   
PostPosted: Wed Dec 06, 2017 9:43 am 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
Thanks for replay,
I am using a Codesys Control Win V3 on a PC

BR


Top
   
PostPosted: Mon Dec 11, 2017 1:57 pm 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
On CODESYSControl.cfg I have this:
Quote:
[SysProcess]
BasePriority=Realtime
Command=AllowAll


Using Codesys 3.5 SP9 Patch8, I have tryed SysProcess library 3.5.7.0 and SyOS23 3.5.8.0 library but each time I can see that starts wscript.exe but is not executed the code inside the script (using the prompt works, so the vbs script is ok).

BR


Top
   
PostPosted: Wed Dec 13, 2017 12:24 pm 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
Any Suggestion?


Top
   
PostPosted: Wed Dec 13, 2017 3:49 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3022
Hi,
I would try:


and check the reaturn value.

BR
Edwin


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


Top
   
PostPosted: Wed Dec 13, 2017 5:39 pm 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
Hi,

using the "SysProcess._" function I got 1 as Result


Top
   
PostPosted: Wed Dec 13, 2017 7:36 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3022
Hi,
and copy your script which you want to execute to the runtime directory.
BR
Edwin


Top
   
PostPosted: Thu Dec 14, 2017 9:23 am 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
I have attached the vbscript that I want to execute (I have modified the extension from .vbs to .txt due to forum restriction)

BR


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


Top
   
PostPosted: Thu Dec 14, 2017 3:01 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3022
Hi,

stop the plc by tasktray, then execute the Control Win in debug mode:
c:\Program Files (x86)\3S CODESYS\GatewayPLC\CODESYSControlService.exe -d
check the the log there if you execute your script
BR
Edwin


Top
   
PostPosted: Thu Dec 14, 2017 4:31 pm 
Offline

Joined: Tue May 08, 2012 4:39 pm
Posts: 22
I have done this procedure, and I don't know why, but if I keep the service in debug mode the script works.
Whitout the "-d" parameter the service doesn't work :shock:
Launching the script in debug mode doesn't generate any verbose message on debug panel.

BR


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 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