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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.</yourwindowsusername>
See after reading this the 'open' libraries and devices here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\3.5.8.10\Libraries\" </yourwindowsusername>
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\" </yourwindowsusername>
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.
Thank you for helping!
Photon
Hvae you had any luck getting some information, i am also trying to connect a device
where there is no specific device driver
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?
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.</yourwindowsusername>
See after reading this the 'open' libraries and devices here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\3.5.8.10\Libraries\" </yourwindowsusername>
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\" </yourwindowsusername>
The best practice how to work/debug/install... with libraries you'll find here:
l viewtopic.php?f=22&t=5641&p=10677#p10677 l
BR
Edwin