24/7
Thiago, Great work on openPLC! Just got back from DEF CON and noticed I missed your presentation!  I'd like to set up an openPLC with a PiCAN shield on a Raspberry PI for a project and a talk.  Do you know of any starter code I can use to add a new canbus.cpp file in addition to modbus.cpp?

Since the Raspberry PI uses socketCAN natively, I thought maybe I can use portions of this code adapted to look similar modbus.cpp:  https://github.com/carloop/carloop-library/blob/master/examples/socketcan_serial/socketcan_serial.cpp

Do you think that is a good starting point?

Thanks!
thiagoralves
PSM is buffered. It doesn’t request a single register every time you change a variable. You can manipulate the individual variables all you want, and then when it is time for a sync, PSM sends the whole buffer in bulk to the C core
Reply 0 0
Reply