The on-board LED -Pin 13- is reserved for the presentation of some basic behaviour of the MEGA and DUE board. In case of the ESP32,  pin GPIO13 can be attached to a LED to visualize the described behaviour. See also the table below. Keep in mind that the mentioned frequency for blinking, can be influenced by the use of e.g. the function delay() in the main loop. As earlier mentioned, delay() could be used for easier debugging the code, but the use of delay() in the main loop is not preferable. Use the available timer functions instead!

13Blinking 500 mSNormal behaviour during run
13Blinking 500 mS with 20mS flashNormal behaviour during run and link with HMI[1]
13Blinking 2000 mS after restartFailure, check configuration of pins
13Blinking 1000 mSFailure, State name look-up failure, check main loop
13Blinking 50 mSFailure, Tagname look-up failure, check configuration
13Constant Off/OnProbable software problem (infinite loop)

[1] When communication between the FSM and HMI is selected (UseHMISerial = true), the standard HMI is sending every 2 seconds a watchdog message to the board. When a watchdog message is not received by the board in 4 seconds, this is signalled as a watchdog failure. The boolean variable HMIWatchdog can be used by the sketch when the software has to monitor or signal a watchdog problem. When there is no need for processing the boolean HMIWatchdog, LED 13 (behaviour) is also visualizing the value of HMIWatchdog; when everything is properly working, LED 13 is blinking by a frequency of 500mS and when there is an active link with HMI there is a short blink of 20mS in the off time of LED 13.

Variable HMIWatchDogMeaning
trueThere is an active link between FSM and the HMI
FalseThere is no link between the FSM and the HMI