RESET
Purpose

To perform a software reset of the PLC from within a CusFn. All the variables will be reset to zero or inactive and all the hardware outputs such as DAC and PWM will be turned OFF. The effect is the same as the Master Reset [MaRST] function in the ladder logic. The first scan bit (1st.Scan) will also be turned ON for one scan time.

A RESET will also perform a FLASH memory backup for all NANO-10 and FMD series PLCs. This is especially important after any SETTIMERSV, SETCTRSV, or SET_IPADDR commands are executed because the timer and IP data must be backed up into FLASH. However, it is better to use the SETSYSTEM 252,0 command to perform a FLASH backup since a RESET will cause all volatile data to be lost.

However, if the program is stuck at some dead loop (such as WHILE, FOR-NEXT) in a CusFn, then [MaRST] would not be executed since the ladder program would not have a chance to scan the ladder rung containing the [MaRST] function. If this command is used by an interrupt service function, then it is possible to get the system out of the dead loop since the interrupt function can interrupt the dead loop and reset the PLC.

  backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual