News:

  • October 13, 2025, 07:01:35 PM

Login with username, password and session length

Author Topic: $Main failure!  (Read 5441 times)

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
$Main failure!
« on: June 27, 2022, 04:28:55 PM »
Came back from vacation today to find a PLC I installed and had been running for about two months Halted due to a critical error. In the system status I have no error messages just warnings but located in the ERR: box it shows "$Main failure!". DST51 =1 before I put the PLC back in run mode. I have a PLC Image that I captured to further troubleshoot and have not rebooted the plc neither.

PLC = BX-DM1E-36ER-3-D
OS = 2.9.3
Booter = 1.1.0

Any thoughts?


Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: $Main failure!
« Reply #1 on: June 27, 2022, 05:04:37 PM »
DST51 includes the following:  'watchdog timeout, memory error, I/O Error - configuration or mapping - typically happens if the I/O layout changed, Ethernet I/O Master detected an error (usually a missing slave or the I/O layout in a slave has changed)'

Check this thread, you might have the same issue https://forum.hosteng.com/index.php?topic=3661.0
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: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #2 on: June 27, 2022, 05:10:49 PM »
Came back from vacation today to find a PLC I installed and had been running for about two months Halted due to a critical error. In the system status I have no error messages just warnings but located in the ERR: box it shows "$Main failure!". DST51 =1 before I put the PLC back in run mode. I have a PLC Image that I captured to further troubleshoot and have not rebooted the plc neither.

PLC = BX-DM1E-36ER-3-D
OS = 2.9.3
Booter = 1.1.0

Any thoughts?

We had a case where a data escape was overwriting $Main (it was a SERIO module DMX issue). We fixed the issue but added the runtime check to make sure that if $Main ever got shut down, we would go fatal.

Don't know of anything else that could cause it, unless a MEMCLEAR or some other heavy handed memory operation is getting loose. We had cases where C-mores would write beyond the end of strings, which could overwrite things, but I thought that got fixed a while ago.

Might be interesting to look at the warnings and see if there are any hints there.


« Last Edit: June 27, 2022, 05:15:01 PM by BobO »
"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

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
Re: $Main failure!
« Reply #3 on: June 27, 2022, 05:19:33 PM »
What warnings should I be looking at? I want to put this back into operation but I'm hesitant.

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
Re: $Main failure!
« Reply #4 on: June 27, 2022, 05:23:10 PM »
I have a POM module RS232/RS485 other than that it's bone stock. What registers should I be monitoring to give me a better perspective on whats happening?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #5 on: June 27, 2022, 05:41:49 PM »
What warnings should I be looking at? I want to put this back into operation but I'm hesitant.

Nothing in particular, just curious what they are. If it's comm failures, that's a non-issue, but other warnings might be suggestive of programming errors. Specifically what we are checking is whether the .Running bit of $Main has been cleared, which should never happen.

I know of nothing other than the DMX512 issue that could ever trigger it, but we felt like it was a good check to leave in. In that case the issue was an I/O module returning a length value was well beyond the buffer space, and the I/O driver was blindly copying the wrong length. We fixed it two different ways, and as far as I'm aware, it's never occurred again.

We just released 2.9.5. You might want to upgrade.

"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: $Main failure!
« Reply #6 on: June 27, 2022, 05:50:53 PM »
ADC hasn't updated the download page yet.
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: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #7 on: June 27, 2022, 05:55:48 PM »
ADC hasn't updated the download page yet.

No, but I think we added the firmware to live update.
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: $Main failure!
« Reply #8 on: June 27, 2022, 06:04:50 PM »
Sorry, thought you were talking about DMD.   Yeah, live update notified me about firmware 2.9.5 this morning.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
Re: $Main failure!
« Reply #9 on: June 27, 2022, 06:09:08 PM »
Any system tags I should be monitoring from here on out. I would hate for this to happen again and not have any explanation as to what happened. I've updated the firmware to 2.9.5

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #10 on: June 27, 2022, 06:16:59 PM »
Any system tags I should be monitoring from here on out. I would hate for this to happen again and not have any explanation as to what happened. I've updated the firmware to 2.9.5

I know of no reason why it should happen to start with, so there isn't really anything I can tell you to monitor. My question regarding warnings was to see if there was anything there that might suggest what is going on.
"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

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
Re: $Main failure!
« Reply #11 on: June 27, 2022, 06:28:28 PM »
The only warning I get is about the two analog channels I'm not using. Other than that nothing

ryanastiefes

  • Sr. Member
  • ****
  • Posts: 67
Re: $Main failure!
« Reply #12 on: June 28, 2022, 02:49:25 PM »
Found another controller today with the same issue, $Main Failure!. What could be causing this?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #13 on: June 28, 2022, 04:08:27 PM »
Found another controller today with the same issue, $Main Failure!. What could be causing this?

I don't know. You are the first report since we added the check in 2.9.1 for DMX512 case I described.

Has something changed lately?
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: $Main failure!
« Reply #14 on: June 28, 2022, 04:10:46 PM »
And if you are willing to send your program to us, we're happy to look through 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