Sipper
Hello openplc, I have a question.
The openplc program is really very good, especially the ladder diagram.
I have over 30 years of experience with PLC and I really enjoy working with the program and programming the Arduino, the ESPs, etc. Now I want to work in openplc with C++ and Python. Is there a guide with examples how to get the right presets and the right program structure ?
It would be nice if you could help me.
Werner from Germany
Reply 1 0
thiagoralves
You should only use Python or C++ for things you can't do with IEC 61131-31 languages, which most cases is related to hardware drivers. What exactly do you want to do with C++ or Python? I just posted a video explaining how to write an OpenPLC driver using PSM which is based in Python:
https://youtu.be/WYJM7Ss6SkA
Reply 1 0
Sipper

Thank you for the quick reply !
The video is also very helpful if you have a Raspberry running an OS under Linux - thanks.
But if I just take the Arduino Uno or an ESP processor and connect various expansion devices ( displays, I/O expanders , sensors like BME280 , PU-6050 3-axis gyroscope , etc. ) via an I2C or SPI want to read out the bus. Don't I need a program in OpenPLC (a driver in c++ or Python) to read the data and process it in OpenPLC?

greetings  Werner 

Reply 0 0
thiagoralves
Yes, for all those "smart" sensors via I2C or SPI you will need to write a driver. You can't write a driver in Python for microcontrollers. PSM only works on Windows or Linux versions of the runtime. On microcontrollers you will have to modify the hardware driver for your board under /editor/arduino/src
Reply 0 0
Sipper
Thanks for help 
werner 
Reply 0 0
Reply