News:

  • September 29, 2026, 04:29:50 PM

Login with username, password and session length

Author Topic: BRX Boot_Loop  (Read 16594 times)

pbw

  • Hero Member
  • *****
  • Posts: 127
BRX Boot_Loop
« on: August 17, 2019, 07:17:20 PM »
Got a BRX18 series running a HVAC system.
Its got the latest Firmware and Bootloader.
I'm currently in the process of setting up the system, so I'm doing a lot of runtime edits and such.
Sometimes when I edit the program, accept, and try to upload, DMD won't respond until I force the PLC into stop mode with the switch. Then it uploads Okay and all is good.
Another issue is it gets stuck in a bootloop when I flip the breaker at night, then come back after roughly 14 hours, power it on and it repeatedly reboots. There are no reboot instructions in the code.
Last night I left the power on and this morning it was also stuck in a boot loop. The system Log just stated System turned On and System turned off repeatedly. One thing odd about the log was on the very bottom there was something about failing to upload or reprogram the PLC from the SD Card, but there is no SD Card installed and never has been on this machine.
Any ideas what I'm up against?
edit: normal power cycles don't seem to have the same effect on it, it only appears over night.
« Last Edit: August 17, 2019, 07:19:01 PM by pbw »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Boot_Loop
« Reply #1 on: August 17, 2019, 08:23:28 PM »
Weird.

We just found and fixed a bug that might be related. The conditions that demonstrate it are: 1) A running retentive program block, that 2) contains code that would cause the program to suspend rather than complete (loops, yields) and 3) at least 1 run mode edit. Power down, power up, boot loop.

If the boot loop is related to that bug (maybe something else similar), pulling the mode switch down into STOP when powering up, and then switching to RUN has stopped it.

This particular bug has been present since Rel 1.0, but for some reason seems to be just showing up now. If that isn't your bug, I would really like to get your program to see if we can dupe 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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: BRX Boot_Loop
« Reply #2 on: August 17, 2019, 11:33:50 PM »
Any devices connected? HMI?

pbw

  • Hero Member
  • *****
  • Posts: 127
Re: BRX Boot_Loop
« Reply #3 on: August 18, 2019, 02:37:47 PM »
Any devices connected? HMI?
Yes, a C-more touchscreen.
There are 13 other devices on the network but in a different subnet.
The BRX and HMI are on there own.

pbw

  • Hero Member
  • *****
  • Posts: 127
Re: BRX Boot_Loop
« Reply #4 on: August 18, 2019, 03:05:09 PM »
We just found and fixed a bug that might be related. The conditions that demonstrate it are: 1) A running retentive program block, that 2) contains code that would cause the program to suspend rather than complete (loops, yields) and 3) at least 1 run mode edit. Power down, power up, boot loop.
All of these conditions are present.
Another thing that comes to mind is there was a device driver error.Originally I started with the BRX+Analog card, then I realized we needed more I/O, so I added that, then decided to swap them around (with power off, and configuration on auto).I don't recall that I had an issue before that, but then again I wasn't working on it on a daily basis.
I'm not totally convinced that it's not related to how I structured the code.
I like to do the following,
Say the equipment contains a number of fans,pumps,etc. I generally create a timer block, and then place them in a loop (unyielding). It keeps the code clean especially if there is a lot of equipment involved. I noticed some of them don't work anymore. I couldn't find a obvious reason not to, but decided to fix it later.
For some reason the EA9 series touchscreens are slower to respond to touch and refresh rates, and I figured maybe it was due to a high PLC scan time, so I made all loops yielding (timers and all) to decrease the scan and test it out. Needless to say it wasn't related to the PLC scan time but rather the HMI.
I returned everything back to unyielding (or I think I did).
I'll do some digging next week and email the code.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Boot_Loop
« Reply #5 on: August 18, 2019, 03:14:22 PM »
Your code could cause a software watchdog, but shouldn't be able to cause a reboot. I'm sure there are exceptions to that, but that's the plan.

If you have all of those conditions, there is a very high probability this is the issue. It isn't hard to dupe at all once you have all the conditions. Another fun point...if you do an *even* number of run mode updates, it won't do it. We'll have new bits out before too long, but in the meantime, STOP on startup will cure 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

pbw

  • Hero Member
  • *****
  • Posts: 127
Re: BRX Boot_Loop
« Reply #6 on: August 19, 2019, 11:13:05 AM »
I must have hit the "even number", it didn't do it today ;D
Any clue on the update release date?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Boot_Loop
« Reply #7 on: August 19, 2019, 11:20:42 AM »
I must have hit the "even number", it didn't do it today ;D
Any clue on the update release date?

Not sure, hopefully soon. It's been in there since Rel 1.0, so we're not in a heated rush to get it out, but we do want to put out a fix.
"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: BRX Boot_Loop
« Reply #8 on: August 19, 2019, 05:24:43 PM »
I'll be waiting for the release containing that fix before I roll my solution out. Updating from a remote location with no access to the PLC and then getting a boot loop would put a serious dent into the happiness of my day.

Andrew.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Boot_Loop
« Reply #9 on: August 19, 2019, 06:37:07 PM »
I'll be waiting for the release containing that fix before I roll my solution out. Updating from a remote location with no access to the PLC and then getting a boot loop would put a serious dent into the happiness of my day.

Andrew.

Unless you are using long (yielding) loops in retentive tasks or programs, it isn't a problem. Even then, the PLC drops into program mode after the 10th reboot to prevent a remote lock up.
"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: BRX Boot_Loop
« Reply #10 on: August 19, 2019, 07:03:49 PM »
Ah - in that case my day would be less dented :)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Boot_Loop
« Reply #11 on: August 19, 2019, 07:16:53 PM »
Ah - in that case my day would be less dented :)

We don't always get it right, but we try very hard to leave days undented.
"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