CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Tue Nov 21, 2017 4:25 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Aug 25, 2009 1:45 pm 
Offline

Joined: Tue Nov 11, 2008 10:47 pm
Posts: 15
I need to launch and run after codesys bootproject a visual basic project.exe:
Is possible to launch by codesys an external program for example ".exe" of visual basic??

Regars
Stefano


Top
   
 Post subject:
PostPosted: Thu Aug 27, 2009 7:57 am 
Online

Joined: Wed May 04, 2005 10:33 am
Posts: 1
Yes, it's possible. Please have a look to the SysProcess.library (V3) or the SysLibOs.lib (V2) library. You can start an application from your IEC code by calling the function SysProcessCreate2 (V3) or SysCreateProcess (V2).


Top
   
 Post subject:
PostPosted: Fri Aug 28, 2009 7:56 am 
Offline

Joined: Tue Nov 11, 2008 10:47 pm
Posts: 15
Hi,
my codesys runtime is for target winXP and in the folder of the available libraries (\Lib_NTRT) there isn't SysLibOs.lib.
But SysLibOs.lib is in the folder \Lib_PLCWinNT so i add this library, use the function SysCreateprocess and build-all and it's ok but when i download the program to the target it shows the message "Unresolved external POU: SysCreateProcess _" :cry:
Regards,
Stefano


Top
   
 Post subject:
PostPosted: Thu Sep 17, 2009 5:21 am 
Offline
Frequent User
Frequent User

Joined: Mon Jul 25, 2005 8:06 pm
Posts: 295
Check and make sure there is also a .hex file in the folder as well. It appears to be an external library instead of an internal library so it will need the compiled file.

_________________
Thanks,
Steve Pfeifenroth


Top
   
 Post subject:
PostPosted: Fri Sep 18, 2009 11:50 am 
Offline

Joined: Tue Nov 11, 2008 10:47 pm
Posts: 15
I don't find any *.hex file.. can you send me the *.hex file that i have to compile?In which folder i'd to find the *.hex file?
regards
Stefano


Top
   
 Post subject:
PostPosted: Fri Sep 18, 2009 4:18 pm 
Offline
Frequent User
Frequent User

Joined: Mon Jul 25, 2005 8:06 pm
Posts: 295
I do not have the realtime system. Sorry.

_________________
Thanks,

Steve Pfeifenroth


Top
   
PostPosted: Wed Oct 02, 2013 2:54 pm 
Offline

Joined: Fri Feb 08, 2013 11:29 am
Posts: 3
You can call a external program via the macro function during prebuild and post build:

Project -> Options -> Macro
- Define marcos. I have to use absolute path:
call $PROJECT_DRIVE$$PROJECT_PATH$\macro\PostBuild_exp_copy_wdatetime.mac

You can run a macro before and after build:
Project -> Options -> Build
Macro before build: prebuild.mac
Macro after Build: PostBuild_exp_copy_wdatetime.mac

In the macro you can make system calls:
in my PostBuild.mac:

;; this only copies the 2nd digit of the hour this will overwrite files -> %time:~1,1%
system copy $PROJECT_DRIVE$$PROJECT_PATH$\$PROJECT_NAME$.exp $PROJECT_DRIVE$$PROJECT_PATH$\$PROJECT_NAME$_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~1,1%%time:~3,2%%time:~6,2%.exp


Top
   
PostPosted: Thu May 05, 2016 8:54 am 
Offline

Joined: Wed May 04, 2016 8:07 am
Posts: 1
Hi, aes,
I tried with your macro code, but seems the path like what you wrote:
Quote:
$PROJECT_DRIVE$$PROJECT_PATH$\$PROJECT_NAME$.exp

It doesn't work.
I have to use absolute path.
Do you know how to fix it?

On the other hand, do you have the macro command list of CoDeSys?
Because there is quite few information about macro in the manual.
For example, now I want to export just the Global Variables to EXP file.
But with my macro, my CoDeSys project always export the EXP file of the whole project.
Do you konw is there any way to get my need?

Thanks!


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