News:

  • October 03, 2026, 09:55:14 PM

Login with username, password and session length

Author Topic: Full restart including devices from ladder code  (Read 14925 times)

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Full restart including devices from ladder code
« 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?

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Full restart including devices from ladder code
« Reply #1 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.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Full restart including devices from ladder code
« Reply #2 on: July 22, 2019, 05:57:11 PM »
You could use the REBOOT instruction.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Full restart including devices from ladder code
« Reply #3 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



BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Full restart including devices from ladder code
« Reply #4 on: July 22, 2019, 08:26:43 PM »
Did you clear the condition that enabled the REBOOT instruction prior to invoking it?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Full restart including devices from ladder code
« Reply #5 on: July 22, 2019, 08:45:29 PM »
No. The program is a single rung with an ST1 condition and a REBOOT command.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Full restart including devices from ladder code
« Reply #6 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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Full restart including devices from ladder code
« Reply #7 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.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Full restart including devices from ladder code
« Reply #8 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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Full restart including devices from ladder code
« Reply #9 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.