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 Oct 15, 2019 3:51 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Sep 25, 2015 8:52 am 
Offline

Joined: Fri Jul 10, 2015 10:52 am
Posts: 35
I'm not really familiar with python framework management and how to install a 3rd party libraries so this may sound stupid:

Is there a way to install 'pyserial' module to codesys used python framework?
I know that there is a .NET Serial class which I could use but since I have a few classes thats are using 'pyserial' I dont want to
port and maintain them using the .NET class.

Thanks


Top
   
PostPosted: Fri Sep 25, 2015 10:18 am 
Offline
Frequent User
Frequent User
User avatar

Joined: Fri Mar 18, 2011 4:12 pm
Posts: 266
Hi,

etamgul wrote:
I'm not really familiar with python framework management and how to install a 3rd party libraries so this may sound stupid:

Is there a way to install 'pyserial' module to codesys used python framework?
I know that there is a .NET Serial class which I could use but since I have a few classes thats are using 'pyserial' I dont want to
port and maintain them using the .NET class.


Right now, the CODESYS IronPython environment does not yet look "like a normal Python installation", so things like "pip install" etc. do not work.

However, it seems that the pyserial project does actually support IronPython, so it should also work in CODESYS.

You should be able to download the source package, unpack it, and then either add the unpacked directory to sys.path before calling the other modules, or copy the unpacked directory to the ScriptLib\3.X.X.0 subdirectory in your CODESYS installation.

HTH,
Markus

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Fri Feb 08, 2019 4:23 pm 
Offline

Joined: Wed Nov 23, 2011 4:12 pm
Posts: 3
Hello,

I'd like to do the same with the pysvn module (https://pysvn.sourceforge.io/) to create a build script that executes svn commands independent from CODESYS projects (e.g. creating a tag from whole trunk). I installed the pysvn install kit py27-pysvn-svn1819-1.9.6-1961-Win64.exe but I don't find any pysvn.py file in the installation folder to copy to the CODESYS' library folder. I copied the whole pysvn folder from

C:\Python27\Lib\site-packages

to

C:\Program Files\3S CODESYS\CODESYS\ScriptLib\3.5.10.40\site-packages

But still the script doesn't find pysvn module

Do I have to execute some installation procedure to make it visible for IronPython? Looks like the module comes just as a compiled one: _pysvn_2_7.pyd and I thought that each folder in "site-packages" is used as a module if it contains the __init__.py

Any hints?


Top
   
PostPosted: Mon Mar 11, 2019 8:12 pm 
Offline

Joined: Mon Mar 21, 2016 10:34 am
Posts: 17
Hello,

I am also interested in knowing how best to install external packages.

@toschu72

regarding external svn client in codesys env, try loading sharpsvn.dll using your script.

Link: https://sharpsvn.open.collab.net/servle ... ageID=3794

Code:
# necessary to import dlls
import clr
import sys
# add reference to path where the dll is located
sys.path.append("add location of dll here")
# Add reference to dll
clr.AddReference("SharpSvn.dll")
# import sharp svn
import SharpSvn



You can find the documentation here : http://docs.sharpsvn.net/current/


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

All times are UTC+01:00


Who is online

Users browsing this forum: dFx 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