News:

  • June 07, 2026, 07:50:45 AM

Login with username, password and session length

Author Topic: PLC restarts itself (this is a problem for me)  (Read 25462 times)

OrionHE

  • Sr. Member
  • ****
  • Posts: 90
PLC restarts itself (this is a problem for me)
« on: May 10, 2016, 05:00:11 PM »
I'm using an H2-DM1E and getting an error message:


In the "MSG:" field it says RCPT TO:<""> which made me think that the double-quotes is causing some sort of unrecoverable error, but when I try to clear the double-quotes, Do-more designer tells me this message:


which makes me think that double-quotes are ok.

The big problem is that under certain conditions,
1. the PLC will try to send an email
2. the email will be undeliverable (this is ok, as the double-quotes are a placeholder for a real email address)
3. the PLC will shutdown and restart itself, setting $firstScan and messing me up

Ideas? Automation Direct support sent me here because they couldn't explain my issue.

I'm happy to provide more details.
« Last Edit: May 10, 2016, 05:01:50 PM by OrionHE »

OrionHE

  • Sr. Member
  • ****
  • Posts: 90
Re: PLC restarts itself (this is a problem for me)
« Reply #1 on: May 10, 2016, 05:13:12 PM »
More information, I've put in a good email address and the PLC is still under certain conditions restarting itself. The latest error message is here:


Why would a simple TCP connection issue restart the PLC?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PLC restarts itself (this is a problem for me)
« Reply #2 on: May 10, 2016, 05:54:33 PM »
I suspect the PLC is restarting because of the I/O errors and the email-related stuff is just warning messages.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

OrionHE

  • Sr. Member
  • ****
  • Posts: 90
Re: PLC restarts itself (this is a problem for me)
« Reply #3 on: May 10, 2016, 06:10:03 PM »
I suspect the PLC is restarting because of the I/O errors and the email-related stuff is just warning messages.

Thank you for your suggestion. This particular instance happened on my bench-test PLC, but it happens at multiple facilities that use an exact copy of this program in multiple counties across the state of California. This should rule out I/O, Network, and PLC Hardware, leaving programming mistakes and software glitches. I am however open to revisiting any of these topics.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: PLC restarts itself (this is a problem for me)
« Reply #4 on: May 10, 2016, 07:51:06 PM »
Hmmm, that's odd.  I can't believe an email error would restart the PLC, unless it gets into some kind of loop retrying and locks everything up.  I did that one time doing a DNS lookup too frequently.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: PLC restarts itself (this is a problem for me)
« Reply #5 on: May 10, 2016, 08:14:46 PM »
Unexpected response could be a clue. Could be a crash due to an un-caught exception condition.

There was a bug in the email instruction that was fixed one or two releases ago. I think it would crash and reboot. What firmware version are you running?

As an FYI, the default hardware watchdog behavior is to reboot the CPU. It can optionally be changed to lock down, requiring a power cycle. To get a sense of frequency, you can monitor $WatchdogReboots, which is a retentive counter of the number of times the system has been rebooted by the watchdog handler.
"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

OrionHE

  • Sr. Member
  • ****
  • Posts: 90
Re: PLC restarts itself (this is a problem for me)
« Reply #6 on: May 12, 2016, 02:03:43 PM »
I had to put some time into testing, but the problem doesn't seem to have occurred since I've updated the OS version, is this what is meant by the firmware?

Thanks for the suggestion, hopefully the many months of frustration and "blaming the programmer" can come to an end. I knew my logic was sound!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: PLC restarts itself (this is a problem for me)
« Reply #7 on: May 12, 2016, 02:30:10 PM »
I had to put some time into testing, but the problem doesn't seem to have occurred since I've updated the OS version, is this what is meant by the firmware?

Yep, Firmware = Bootloader + OS, and in this case I did mean OS. There was an error in a buffer, where if the length of an email changed (got shorter, I think) on a subsequent email, it could crash. It was fixed a while back.
"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

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: PLC restarts itself (this is a problem for me)
« Reply #8 on: May 12, 2016, 02:44:05 PM »
I remember this one well. The new OS should take care of it. Not a hitch since we updated ours.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: PLC restarts itself (this is a problem for me)
« Reply #9 on: May 12, 2016, 02:56:36 PM »
I remember this one well. The new OS should take care of it. Not a hitch since we updated ours.

Pretty sure you reported 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