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 Mon Mar 18, 2019 7:00 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Dec 28, 2018 1:31 pm 
Offline

Joined: Sat Jun 09, 2018 2:13 pm
Posts: 8
I want to make a program for rasbperry pi using codesys such as it executes python scripts . So please can someone give me a simple example that I can follow?


Top
   
PostPosted: Fri Dec 28, 2018 4:52 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3194
Hi,
if you want to execute them on the Raspberry PI,
by your IEC code, check this example here:
viewtopic.php?f=23&t=6247&p=19932#p19941

BR
Edwin


Top
   
PostPosted: Fri Dec 28, 2018 6:01 pm 
Offline

Joined: Sat Jun 09, 2018 2:13 pm
Posts: 8
Edwin Schwellinger wrote:
Hi,
if you want to execute them on the Raspberry PI,
by your IEC code, check this example here:
viewtopic.php?f=23&t=6247&p=19932#p19941

BR
Edwin

Thank you!
I saw that post and I could not understand this line :
SysFileCopy('/var/opt/codesys/UHScroll.py', '/var/opt/codesys/PlcLogic/Application/UHScroll.py', ADR(dwCopySize));
What are these directories :

/var/opt/codesys/UHScroll.py
/var/opt/codesys/PlcLogic/Application/UHScroll.py
?
should I do exactly like that ?


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


Top
   
PostPosted: Sat Dec 29, 2018 8:18 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3194
Hi,
the python scripts are added as external file in your CODESYS project and with the CODESYS download
of your application they will be copied to '/var/opt/codesys/PlcLogic/Application/'.
The copy to '/var/opt/codesys/' is needed because this is the directory where the runtime could call the script ( path envirnment)

Sure if you do not need this, just copy your script to a location where the runtime could call it... and do not forget to enable
the command which you allow to execute by SysProcessCommand....

BR
Edwin


Top
   
PostPosted: Sun Dec 30, 2018 12:34 pm 
Offline

Joined: Sat Jun 09, 2018 2:13 pm
Posts: 8
Edwin Schwellinger wrote:
Hi,
the python scripts are added as external file in your CODESYS project and with the CODESYS download
of your application they will be copied to '/var/opt/codesys/PlcLogic/Application/'.
The copy to '/var/opt/codesys/' is needed because this is the directory where the runtime could call the script ( path envirnment)

Sure if you do not need this, just copy your script to a location where the runtime could call it... and do not forget to enable
the command which you allow to execute by SysProcessCommand....

BR
Edwin

Thank you very much!


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 6 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