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 Sun Jan 26, 2020 10:11 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Feb 26, 2016 3:27 pm 
Offline

Joined: Fri Feb 26, 2016 11:12 am
Posts: 1
Hey Guys,
I'm using Codesys for the Raspberry Pi and searching for an option to configure my own device for the SPI/I2C bus? (it's a DA-Converter, MCP4725)
The SPI-master just offers a few prepared devices and no option for custom settings.

2. question: There are lots of posts explaining how to control Codesys via Python script but is it possible to start a Python script in codesys projects?
- condition = true then starting python_script(a,b,..)

Thank you for helping!
Photon


Top
   
PostPosted: Thu Mar 31, 2016 7:36 pm 
Offline

Joined: Wed Mar 30, 2016 6:58 pm
Posts: 1
Hvae you had any luck getting some information, i am also trying to connect a device
where there is no specific device driver


Top
   
PostPosted: Tue Apr 12, 2016 8:04 am 
Offline

Joined: Tue Jun 23, 2015 7:47 am
Posts: 12
I've got the same problem. Does really no one can help us? With the I2C-examples, you can only control the example devices, are there a bib for I2C devices in general?


Top
   
PostPosted: Wed Apr 13, 2016 4:26 am 
Offline
Site Admin

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

a good startpoint is to read RaspberryPI_CodesysV3_FirstSteps_EN.pdf:

"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.8.10\Documentation\RaspberryPI_CodesysV3_FirstSteps_EN.pdf"
In Chapter 4 'Connecting additional devices via I²C and SPI' there is a Basic description how it works.

See after reading this the 'open' libraries and devices here:
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.8.10\Libraries\"

I2C_AdafruitPWM.library
I2C_Gyroscopes.library
I2C_SRF02.library
IoDrvGPIO.library

open these libraries with CODESYS and check how they are implemented.
They use the I2C/SPI FB's from Raspberry Pi Periphials Library.

you need to implement a own device description for your device and install it then to the device repository
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.8.10\Devices\"

The best practice how to work/debug/install... with libraries you'll find here:
viewtopic.php?f=22&t=5641&p=10677#p10677


BR
Edwin


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


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: No registered users and 4 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