WC8 boards rebooting.

TJF1960

Active Member
I currently have 3 WC8 boards with v03.02.17f. Two of the three randomly reboot. I had a feeling something was wrong so I added a line to send an email when they reboot at the beginning of the program. The boards appear to completely reboot because any ttl outputs which were high switch low. One of the problems is that it occurs so randomly. I may have a board that will reboot twice in one day then not reboot for a week, othertimes they may reboot everyother day. No rhyme or reason.
The third board has not reset once and it is running similarly configured plc code.
 
Have there been any reports or instances of this occuring? Are there any sensor or input malfunctions which could cause this. Can stack overflow be a possibe cause (but then the third board has been running fine)?
 
Thanks for any suggestions,
Tim
 
Well, could be I guess. Everytime I have tested the power supplys both were rock solid at 9 volts to 9.2 volts. Both are rated to 1.5A.
I started seeing this after swapping the boards out with boards that had the new upgrade firmware. At the same time I re-wrote all the code. So basically new boards and new code. My first thought was something in my code but I have gone over it and don't see anything that sticks out as a possible problem.
If no one else is having any type of rebooting problems I guess the next step will be to replace the supplies and wait and watch.
 
Thanks,
Tim
 
One thing you may look into is there any external noise caused CPU malfunction.
Other users reported before once they isolated the TTL input lines with opto-isolators, the board never had problem.  What IO lines do you connect to the board?  Things to look mostly are the TTL input, and long temp sensor wires picking up noises from environment.
 
I noticed that TTL outputs are being reset to 0, if noise was to blame on either TTL input or long runs on temp sensors would the board reset the outputs as part of the reboot?
 
When CPU ran into anything, it will RESET, so that it will restart everything.  When WC8 restart, it will set everything to zero.  Then if you have saved the OP state, it will load that saved value, then turn on output chip.
 
That reset everything is normal behavior when CPU restart, for any processor.  They key thing to solve your problem is to find out where the noise coming into your system.  Is that from TTL or from temp sensor, then try to fix it.
 
Happy New Year!!!
 
I am still troubleshooting 2 of my 3 wc8 boards which are randomly rebooting. Now, I made a slight change to the plc code for my third board which has been rock solid and now it is randomly rebooting, not as often as the others but it has rebooted a couple of times in the last week.
 
My gut has been pointing me to the plc code but not sure where the problem lies.
If the stack overflow is the problem will the wc8 completely reboot including resetting the ttl outputs?
Can extra empty spaces in the code cause random rebooting problems?
Is there anything else in the code which can cause random rebooting?
 
Thanks,
Tim 
 
Tim,
 
Can you please send us an email, so that we can send you the 3.02.17f firmware update image through email, then you can try update it again to see if that make any difference?
 
One of my boards rebooted in the middle of the night which killed my "extra spaces" in the code theory. I also had previously replaced 2 of the 3 power supplies to eliminate the power supply theory. The board which rebooted early this morning was one with a new power supply.
 
I am still holding out hope that it must be something in my coding causing the problem...the reason I think that is that the 3rd board which previously had not been resetting started resetting after making a minor change to the code.
 
CAI, I reflashed the firmware with the link you sent and updated the gui as well on the board which rebooted this morning. What changes were made to make you think it might help?
 
 
Here is the code for one of the boards:
 
START    
    SET VAR1 0  
    SET VAR2 0  
    SET VAR3 0  
    SET VAR4 0  
    SET VAR5 0  
    SET VAR6 0  
    SET VAR7 0  
    SET VAR8 0  
    SET RAM1 0  
    SET RAM2 0  
    SET RAM3 0  
    SET RAM4 0  
    SET RAM5 0  
    SET RAM6 0  
    SET RAM7 0  
    SET RAM8 0  
    SET OP8 1  
    DELAY 4000   
    CALLSUB AIP   
    DELAY 1000   
    CALLSUB TEMP1   
    DELAY 1000   
    CALLSUB TEMP2   
    DELAY 1000   
    CALLSUB IO   
    DELAY 1000   
    CALLSUB HB   
    DELAY 1000   
    EMAIL EM1   
LOOP:
    TSTLT T5 1119  
    CALLSUB FANOFF   
    TSTGT T5 1124  
    CALLSUB FANON   
    TSTEQ OP8[40000] 1  
    SET OP8 0  
    TSTEQ OP1 1  
    CALLSUB MEDIAON   
    TSTEQ VAR7 1  
    CALLSUB MEDIADWN   
    TSTGT VAR7 0  
    CALLSUB MEDIAOFF   
    TSTEQ OP5[1000] 0  
    CALLSUB SMEDIAOFF   
    TSTEQ VAR8 1  
    CALLSUB RESTART   
    TSTEQ VAR8 2  
    GOTO LOOP   
    SET RAM1 0  
    DIV CTS 86400 RAM1
    MUL RAM1 86400 RAM1
    SUB CTS RAM1 RAM1
    TSTEQ RAM1 10800  
    SET OP8 1  
    TSTEQ RAM1 39600  
    SET OP8 1  
    TSTEQ RAM1 68400  
    SET OP8 1  
    SET RAM1 0  
    DIV CTS 2 RAM1
    SUB RAM8 RAM1 RAM3
    TSTNE RAM3 1  
    CALLSUB TIMER   
    ANDB RAM6 1024  
    CZ  AIP  
    ANDB RAM6 512  
    CZ  IO  
    ANDB RAM6 2048  
    CZ  HB  
    ANDB RAM6 4096  
    CZ  TEMP1  
    ANDB RAM6 8192  
    CZ  TEMP2  
    GOTO LOOP   
    END    

TIMER:
    SET RAM8 RAM1  
    INC RAM8   
    ADD RAM7 1 RAM7
    ANDB RAM6 -513 RAM6
    TSTEQ RAM7 7  
    ANDB RAM6 -1025 RAM6
    TSTEQ RAM7 14  
    ANDB RAM6 -1025 RAM6
    TSTEQ RAM7 21  
    ANDB RAM6 -1025 RAM6
    TSTEQ RAM7 28  
    ANDB RAM6 -1025 RAM6
    TSTEQ RAM7 15  
    ANDB RAM6 -2049 RAM6
    TSTEQ RAM7 30  
    ANDB RAM6 -14337 RAM6
    TSTEQ RAM7 30  
    CALLSUB MINUTES   
    TSTGE RAM7 30  
    SET RAM7 0  
    RET    

MINUTES:
    SET RAM1 0  
    DIV RAM6 32 RAM1
    ANDB RAM1 15 RAM1
    ADD RAM1 1 RAM1
    TSTEQ RAM1 10  
    CALLSUB REFRESH   
    MUL RAM1 32 RAM1
    ANDB RAM6 -481 RAM6
    ORB RAM6 RAM1 RAM6
    RET    

IO:
    ORB RAM6 512 RAM6
    SET RAM1 0  
    ORB RAM1 ALLOUTS RAM1
    MUL RAM1 256 RAM1
    ORB RAM1 ALLINS RAM1
    ANDB RAM1 -33488897 RAM1
    ORB RAM1 RAM2 RAM1
    ORB RAM1 VAR2 RAM1
    TSTEQ VAR1 RAM1  
    RET    

    WEBSET URL1 RAM1  
    SET VAR1 RAM1  
    RET    

AIP:
    ORB RAM6 1024 RAM6
    SET RAM1 1  
    SET RAM2 0  
    TSTGE AIP1 3  
    ADD 1 RAM1 RAM1
    TSTGE AIP1 130  
    ADD 1 RAM1 RAM1
    TSTGE AIP1 142  
    ADD 1 RAM1 RAM1
    TSTGE AIP1 185  
    ADD 1 RAM1 RAM1
    MUL RAM1 65536 RAM2
    SET RAM1 1  
    TSTGE AIP3 75  
    ADD 1 RAM1 RAM1
    TSTGE AIP3 107  
    ADD 1 RAM1 RAM1
    TSTGE AIP3 129  
    ADD 1 RAM1 RAM1
    MUL RAM1 4194304 RAM1
    ORB RAM2 RAM1 RAM2
    TSTEQ OP8 0  
    RET    

    SET VAR2 1  
    TSTGE AIP2 38  
    ADD 1 VAR2 VAR2
    TSTGE AIP2 55  
    ADD 1 VAR2 VAR2
    TSTGE AIP2 68  
    ADD 1 VAR2 VAR2
    MUL VAR2 524288 VAR2
    RET    

HB:
    ORB RAM6 2048 RAM6
    SET RAM1 0  
    WEBSET URL4 1  
    RET    

TEMP1:
    ORB RAM6 4096 RAM6
    SET RAM1 0  
    SET RAM3 0  
    ADD T1 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 134217728 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T2 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 268435456 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 100 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T3 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 536870912 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 10000 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T4 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 1073741824 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 1000000 RAM1
    ADD RAM1 RAM3 RAM3
    TSTEQ VAR3 RAM3  
    RET    

    WEBSET URL2 RAM3  
    SET VAR3 RAM3  
    RET    

TEMP2:
    ORB RAM6 8192 RAM6
    SET RAM1 0  
    SET RAM3 0  
    ADD T5 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 134217728 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T6 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 268435456 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 100 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T7 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 536870912 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 10000 RAM1
    ADD RAM1 RAM3 RAM3
    ADD T8 5 RAM1
    DIV RAM1 10 RAM1
    TSTGE RAM1 100  
    ORB RAM3 1073741824 RAM3
    TSTGE RAM1 100  
    SUB RAM1 100 RAM1
    MUL RAM1 1000000 RAM1
    ADD RAM1 RAM3 RAM3
    TSTEQ VAR4 RAM3  
    RET    

    WEBSET URL3 RAM3  
    SET VAR4 RAM3  
    RET    

REFRESH:
    SET RAM1 0  
    ANDB RAM6 -1879064545 RAM6
    SET RAM2 0  
    SET VAR1 0  
    SET VAR3 0  
    SET VAR4 0  
    RET    

RESTART:
    SET VAR1 0  
    SET VAR2 0  
    SET VAR3 0  
    SET VAR4 0  
    SET VAR5 0  
    SET VAR6 0  
    SET VAR8 0  
    SET RAM1 0  
    SET RAM2 0  
    SET RAM3 0  
    SET RAM4 0  
    SET RAM5 0  
    SET RAM6 0  
    SET RAM7 0  
    SET RAM8 0  
    SET OP8 1  
    DELAY 1000   
    CALLSUB AIP   
    DELAY 1000   
    CALLSUB TEMP1   
    DELAY 1000   
    CALLSUB TEMP2   
    DELAY 1000   
    CALLSUB IO   
    DELAY 1000   
    CALLSUB HB   
    RET    

MEDIAON:
    TSTGT VAR7 0  
    RET    

    TSTEQ OP1[10000] 1  
    SET OP2 1  
    TSTEQ OP2[2000] 1  
    SET VAR7 1  
    TSTEQ OP2[2000] 1  
    SET OP2 0  
    RET    

MEDIADWN:
    TSTEQ OP2[8000] 1  
    SET VAR7 2  
    TSTEQ OP2[8000] 1  
    SET OP2 0  
    RET    

MEDIAOFF:
    TSTLT VAR7 2  
    RET    

    TSTEQ IP2 0  
    SET VAR7 3  
    TSTEQ VAR7[30000] 3  
    SET OP1 0  
    TSTEQ OP1[5000] 0  
    SET VAR7 0  
    RET    

SMEDIAOFF:
    TSTEQ OP6 1  
    SET OP6 0  
    RET    

FANOFF:
    TSTEQ OP3 0  
    RET    

    TSTLT T5 1119  
    SET OP3 0  
    RET    

FANON:
    TSTEQ OP3 1  
    RET    

    TSTGT T5 1124  
    SET OP3 1  
    RET  
 
 
To see if it is code vs hardware can you replace the "real" code with something simple that loads temperature into a VAR and sends an email each boot, also constantly increment one of the VARs to give you some idea when reboot happens.
 
If it still fails with the test code disconnect the 1-wire devices and connect a spare one directly to the WC and see what happens.
 
Good luck nailing this down, it can be a pain.
 
/tom
 
Hi Tom,
 
Thanks for the great suggestions. I wish I could but all 3 are in service and each are part of a sub system feeding info to my ISY which would throw a whole bunch of programs off.
 
But maybe what I can do is take a spare, load the code and let it run and feed another set of variables in ISY and test it that way. It won’t be the same as but it may help narrow the problem down. If it never reboots then I can spend my effort looking at the temp/input sections for noise.
 
Thanks,
Tim
 
I dont know anything, but I thought this MIGHT be usefull.
 
I have a HAM friend, who was taking a look at my board and system layout and the things i have it doing.  After checking it out he said "watch this" and pulled out a radio and hit the key.  The whole system started going crazy.  Relays firing, reboots, lights flashing!
 
We then got to talking about EMF hardening and the abilities of long wires to turn radio waves into voltage.  Do you have any long wires that are not protected?
 
Hello CallRET,
 
Well, I have about a 50ft run of cat 5e for one of the temp sensors, all the rest of the cat 5e runs are much shorter. CAI_Support in post #4 referenced the noise issue with ttl inputs and temp sensors.
While it is a possibility that noise could be the problem I have been doubting it mainly because one of the board locations / sensors / wires have been in place and operational now for a couple of years without any problems. I started noticing the random reboots after replacing the board and code. But again my mind is not closed to the possibility of noise.
 
Thanks,
Tim
 
CallRET is correct, if having a metal project box and sealed the WC8 board inside, it will help a lot.  We have a user nearby who setup WC8 board in his repeater control room directly underneath his transmitter antenna, since he sealed everything in metal control box, it runs without  any problem.
 
Back
Top