Using Petri Net logic in control via Arduino (discrete event or hybrid systems)

Hello,
I would like to make a bigger university project with Arduino. You can see the scheme here:

I would like to control the system using Petri Net logic. Petri Nets should be vizualized on the PC. PC is connected to Arduino and controlled system is connected to Arduino of course. Controlled system would be of discrete event or hybrid character.

Do you have any idea of existing projects or how to start?

For example I like OpenModelica and its Statechart (simplified Petri Nets) in this theoretical paper: https://www.modelica.org/publications/papers/scsc98fp.pdf


You can see that the places of Petri net are connected to actuator. So when the token is in the place - the actuator turn on. So in our case - when the token is in the place - the specific pin on Arduino or function is executed.

How are planning to connect the Control System (PC) to the Arduino? USB, Ethernet, Wireless, RS232, etc.

What are the timing requirements? How many messages per second and size of messages?

What are the security requirements? Messages have to be delivered (may not be dropped) or continues update?

You might consider "compiling" the Petri Net to an interpreter on the Arduino and run a trace of the machine back to the PC which would do the visualization.

Cheers!

If you want to do a simple test you could use Cosa Shell and the exemple sketch. This will allow you to write commands to the Arduino.

To use it do the following.

  1. Install Arduino
  2. Add the Cosa package to the Boards Manager URLs and install Cosa.
  3. Download Cosa-Shell and install (can also be done with git see documentation in Libraries).
  4. Open the Cosa-Shell example sketch.
  5. Download and open the monitor.
  6. Now you can talk to the board.

Cheers!