Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Andrew S on July 22, 2019, 05:26:07 PM

Title: Full restart including devices from ladder code
Post by: Andrew S on July 22, 2019, 05:26:07 PM
Ok, so this one also fits in the category of "Idiot Mode" but since my PLCs will be in remote areas that can't easily be reached I need a way to do a full restart including devices - the same as setting the run mode to STOP and then back to RUN. I tried restarting $Main but that doesn't restart the devices. Is such a thing possible?
Title: Re: Full restart including devices from ladder code
Post by: ATU on July 22, 2019, 05:38:38 PM
If you monitor places in your program where you could possibly hang (you should do this anyway), you can do soft resets on programs.  However, if you desire a hard reset, an old fashion hardware timer that requires a pulse from the PLC periodically  or else the timer times-out and opens a NC relay to the main power to the CPU.
Title: Re: Full restart including devices from ladder code
Post by: BobO on July 22, 2019, 05:57:11 PM
You could use the REBOOT instruction.
Title: Re: Full restart including devices from ladder code
Post by: Andrew S on July 22, 2019, 07:57:03 PM
You could use the REBOOT instruction.

I issued the REBOOT and it gets stuck in a boot loop. LEDs flash to to bottom as normal followed by all-green, then repeat. Run switch is in RUN position.

Moving the Run switch to STOP and then back to RUN resolves the problem and the PLC completes the bootup sequence.

BX-DM1E-10ER3-D
Do-more : 2.6.0
OS : 2.6.1
Booter : 1.0.6
FPGA : 1.11
Hardware : 6A 3A


Title: Re: Full restart including devices from ladder code
Post by: BobO on July 22, 2019, 08:26:43 PM
Did you clear the condition that enabled the REBOOT instruction prior to invoking it?
Title: Re: Full restart including devices from ladder code
Post by: Andrew S on July 22, 2019, 08:45:29 PM
No. The program is a single rung with an ST1 condition and a REBOOT command.
Title: Re: Full restart including devices from ladder code
Post by: BobO on July 22, 2019, 09:14:51 PM
Every time the system reboots, it runs the REBOOT instruction again. Rinse, repeat. Don't do that.
Title: Re: Full restart including devices from ladder code
Post by: Andrew S on July 22, 2019, 09:22:49 PM
It's not in $Main. The command gets received by a different program which executes a RUN that starts the program containing the REBOOT.
Title: Re: Full restart including devices from ladder code
Post by: BobO on July 22, 2019, 11:02:29 PM
It's not in $Main. The command gets received by a different program which executes a RUN that starts the program containing the REBOOT.

And that program is probably retentive and still running after the restart.
Title: Re: Full restart including devices from ladder code
Post by: Andrew S on July 23, 2019, 09:17:25 PM
And that program is probably retentive and still running after the restart.

Of course you were right. All fixed. Thanks Bob.