i just recently found out about the OpenPLC project and am fascinated by it
Then my stm32f4 board crossed my mind.
Would it be possible to set up an STM32 MCU as a Slave device for the OpenPLC Runtime?
Like using it as a PLC with Modbus RTU or Modbus TCP?

Thanks for you help in advance
Greetings from Germany
Quote 0 0
Yes, as long as you can port the code for the Arduino to your board. I've heard that some STM32 boards can even work with the Arduino IDE, so in that case porting the code is just a matter of changing the pins accordingly and recompiling.
Quote 0 0

Thanks, i will try this one with my STM Board in the Future.

But now i have a different problem here, i got this Beckhoff BK9000 Ethernet Field-Bus-Controller for some IO-Cards

The Documentary states that the device is Modbus compatible an a managed to get it working.

After then altering the program i testet, the OpenPLC Dashboard just spits out errors

Modbus Write Coils failed on MB device Beckhoff BK9000: Bad file descriptor

The problem occurs sometime and sometimes it does not and the OpenPLC just controls the registers as it should

Could you help me with this one?


Quote 0 0
Make sure you are reading/writing only registers that actually exist on your device. Can you post a screenshot of your slave devices configuration? Do you have more than one slave device configured? Try reading just one or two registers to test and then increment them until you start to see this error
Quote 0 0