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 RS232 line could make serial communication, a serial to USB (radio) connection or for example a Bluetooth connection. 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 (this is not necessary when TX1/RX1 is used; this is standard). 

In sub chapter “HMI Messages”, all available commands are described. In general there are commands for fetching, setting, polling[1] and getting meta[2] data.

[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.”