This project is about the making of controls by a finite state machine. A finite state machine is a theoretical way to describe and make a machine control, in this case based on the MEGA 2560. An example of a control could be the control of a pump, the aquarium heating, a vendingmachine. There are examples on my website. As described in the pitch, this project is about the first step. I'am planning to post a series of projects for making and testing of the control, presenting the I/O and do some data aquisition and trending of the I/O.
See also:
Part 2, Monitoring I/O
Part 3, Serial and IP connection (WiFi)
Part 4, The heater control
In part 1, I will demonstrate the definition of the I/O with the "configurator" by a simple example; a heater control for water. The configurator is a tool for the easy definition of I/O points. First you have to think about the I/O points you need for the control. I/O points exists of a theoretical name, the tagname and the physical I/O pin, e.g. TTWATER (temperature transmitter) with PWN 10 as physical pin number.
In case of the example -the heater control- you will minimal need a temperature measurement and a digital out, for switching the heater (e.g. a relay for a 230Vac heater element) and some outputs for safety. In the video the demonstration of making the I/O points and present them with the "debugger". After the definition of the tags, you don't have to worry about the pin numbers; the I/O is handled by there tagname.
Left most in the configurator all I/O pins of the MEGA 2560 are available for drag & drop to the different I/O types. First you have to define a tagname for dropping a pin (or 2 pins for an ultrasonic device); use the appropriate "Add" button. When ready, save the configuration with the "Generate new" button. Recall the old figuration with the "Get old configuration" button. After generating a new or updated configuration, build/upload the sketch. The I/O is now available in the debugger and for making the control. In the next project, the debugger and serial monitor will be explained.
The software is available as a Visual Studio 2017 solution and exists minimal of the Configurator, HMI (both VBA) and the standard Arduino Sketch (.ino).
Remark: all software can be downloaded from www.jbsiemonsma.nl.
Comments