It is possible to communicate with more than 1 serial line from the 2560 board to other devices, so why not communicate to a second device for sending and receiving commands for supervisory control and data acquisition of the board (scada)? A serial RS232line could make serial communication, a serial to USB (radio) connection or for example a Bluetoothconnection. The standard sketch, supports functions for communication. Via the extra serial line the board is able to receive and send commands from another device. The "other" device is always the master and the Arduino board acts as a slave capable of executing all commands to control or influence the main loop of the finite state machine. Some examples of probable HMI's are a terminal program (simple) or a Visual Studio program. The only thing to do on the HMI master, is sending commands and process the received data from the board. No extra programming is needed on the board! It is only necessary to set a variable in the sketch (boolean UseHMISerial=true; or false when you decide not using the extra serial line). You also have to program the setup of the serial line when not using the standard (when TX1/RX1 is used; this is standard). 


 windows 10 logo 100739284 large   RPi Logo Reg SCREEN

In the software download section of the website, HMI packages are there to download; for Windows 10 and for the Raspberry Pi. See also the HMI/GUI section.  The HMI applications use the predefined HMI commands for communication with the board. With no additional programming, it is possible to control and debug the MEGA 2560 sketch! 



All available commands are described below. In general there are commands for fetching, setting, polling[1] and getting meta[2] data. 





Single request Digital Information


Single request Analogue Information


Force Digital Output


Force Analogue Output


Return To Automatic


Poll Digital Information


Poll Analogue Information


CANcel polling


Request Digital Changes


Get Meta Information


Mask Digital Input


Mask Analogue Input


ReMove Mask


Present the active FSM states


Force marker text


Force Servo Output


Watchdog message


Poll Marker Text


request Marker Text Change


set Time on the board


request Cycle Time


request free RAM on board


request board Time


Jump 0, reset the board


Record to DataBase


Clear logging to DataBase


Clear all HMI polling messages

Above the APC220 RF set. Ideal for a serial connection between the board and a PC. Some shields for the MEGA2560 are standard equipped for this RF set. The PC side communicates via the USB connector block. The set is able to communicate over a sight distance of 1000m. I've tested this set over a distance of 500m and still worked with the AFSM.


[1] Fetching data with a certain frequency is called polling.

[2] Metadata is "data about data". Metadata assists in resource discovery by "allowing resources to be found by relevant criteria, identifying resources, bringing similar resources together, distinguishing dissimilar resources, and giving location information."