Help with program error

On a hunch I changed var2 to var6 just before you posted. I also added SET VAR2 VAR6 to the code. I just checked and var6 is still good but var2 is back to 0. Weird right?
 
That is wired, you mean it is not touched by any code, just change itself to zero?  Could you please send this board back, we want to take a look.  Does your PLC require any hardware wiring to test?  Also, if you have 3.02.17d and later firmware, could you please check if VAR2 also set to zero by itself?  There are a lot people using VAR2 in their PLC code, never had anyone else reported this before.
 
Hi TJF1960,
 
Try to replace all instances of WEBSET with NOP in your code.
Run for a few hours and see if problem goes away.
If so, go back to post #13 in this tread.
 
Hope it helps.
 
CAI_Support said:
That is wired, you mean it is not touched by any code, just change itself to zero?  Could you please send this board back, we want to take a look.  Does your PLC require any hardware wiring to test?  Also, if you have 3.02.17d and later firmware, could you please check if VAR2 also set to zero by itself?  There are a lot people using VAR2 in their PLC code, never had anyone else reported this before.
 
Not entirely correct - you will recall I had several variables *REVERTING TO OLD VALUES* - which could include zero, and that it was intermittent.
I think you ultimately nailed it to being tied up with an flaw in the compiler intermittently writing back the value of the register from the non-blocking delay code?
 
 
CAI,
 
Currently I have two boards running the code, one is .16C and the other is .17 both will set var2 to 0. I changed the code on both to var6. Since then var6 has kept its value. On board .16C I set var2 to a value in Start and it has kept its value since rebooting.
I will dig out my newest board (1 or 2 months old) and verify it is a rev .17d and test it.
The plc doesnt require any other hardware to run. After I finish testing I can send the board back to you for eval.
azert1 I will try your suggestion tonight or tomorrow morning, although I dont quite understand what you meant saying go back to post 13.
 
Thanks all,
Tim
 
Tim,
 
I had a similar issue and spent an insane amount of time troubleshooting it. My boards were running fw .17 (tried 2)
It ended up being related to recurrent WEBSET commands in my code. Temporally replacing them with NOP would eradicate the loss of value in VAR1 and VAR2. (which where completely unused by my code then...)
 
Rossw, you're numerous posts guided me in rewriting many parts of my code while looking for a solution. I learned about WRSPLY because of you and tried to reset it before each WEBSET call. I didn't help. I can say to you know that, I too saw old values reappearing on one of my boards, the other one would simply bring back a zero value to VAR1 and populate VAR2 with 65536)
 
So, after trying everything I could think of I finally found WEBSET being the culprit. (actually WEBSET did function correctly... but at the cost of this unwanted and random side effect on VAR 1&2 when being used cyclically) With this knowledge I contacted CAI and they were very courteous with me. Two of my boards got updated to the latest fw. Unfortunately I have yet to make a definitive trial since on my production setup I chose to externally poll the webcontrol board at regular intervals instead of using WEBSET.
 
I am sorry I was so succinct in my previous post, I am new to this. Reference to post #13 was where CAI announced that the new fw processed the http answers handed by WEBSET differently.
 
Here you go. And thank you to Rossw, sorry for not posting this earlier.
 
azert1,
 
Thank you so much for the details. I have moved from var2 to var6 on one board (ver .16c) which is in operation and I cannot disable webset on that one. The other board is ver .17 and have NOP all the websets for testing.
I will let them both run all night and see how it goes in the morning. I will also test the .17d board I recently received tomorrow to see how it works.
 
Thanks again,
Tim
 
CAI, I have another board which is .17D build date May 2,2013. Does this have the bootloader built in. What about the better handling of the webserver respond?
Thanks,
Tim
 
Bootloader started from July 26, 2013. Board with same 3.02.17d after that date having bootloader.  Firmware 3.02.17d without bootloader having identical function and features as 3.02.17d with bootloader.  Anybody with bootloader can contact us for getting firmware updated remotely.
 If you send your boards in, we will update them all with latest with bootloader.
 
Ok, Thank you.
 
So it looks like my 3 rev 3.02.16c boards and 1 3.02.17 board randomly change var1 and var2 due to webset function. I loaded plc with NOP instead of webset as per azert1 suggestion and 3.02.17 board ran all night without changing var 2, whereas it was changing var2 with webset. On one of the 3.02.16c boards which is in use I changed var2 to var6 and during the start section of the plc set var2 to 987654321. This morning var6 was still set with the proper number but var2 changed to some ramdom number.
I loaded the original plc using var 2 into the 3.02.17d board and it has not reset var2 like the others. I have not tested the 3.02.17d with boot loader board I just received last month but I expect it to work fine since the 3.02.17d without bootload worked fine.
 
Thank you to avert1 for your insight and suggestions. Thank you CAI for your willingness to update all my affected boards to the bootloader rev.
 
Tim
 
Back
Top