Posted: Monday Nov 24th, 2008 07:02 am |
|
1st Post |
technik23
Member
Joined: | Tuesday Mar 18th, 2008 |
Location: | |
Posts: | 36 |
Status: |
Offline
|
back to top
|
One of our installations has been running happily for several months. I recently rewrote it and loaded it. It seemed to run well but then I added a couple of extra responses, nothing new in them just repeating existing responses for additional outputs. When I loaded the system it reported a communication failure for keypad 1 and beeped at me continuousl. The only way I could recover was to use a new NVM with a minimal configuration. When I reinstalled the original (pre update) version the system was fine, so no hardware issues.
Have I run out of memory. I can't find a way of determining how much I have used or what the capacity of the NVM is. I'm attaching the ccl file of the program which crashed.
|
Posted: Monday Nov 24th, 2008 08:56 am |
|
2nd Post |
admin
Administrator
Joined: | Saturday Mar 3rd, 2007 |
Location: | Singapore |
Posts: | 1200 |
Status: |
Offline
|
back to top
|
You have a classic case of an endless nested loop
Start with the Startup Response. it has Do clear_leds
clear_leds has do kettle_off
kettle_off has do clear_leds again
hence the two responses clear_leds and kettle_off will "do" each other until the system crashes. It causes a stack overflow
|
Posted: Monday Nov 24th, 2008 09:00 am |
|
3rd Post |
admin
Administrator
Joined: | Saturday Mar 3rd, 2007 |
Location: | Singapore |
Posts: | 1200 |
Status: |
Offline
|
back to top
|
You have a problem in getting out of this, aqs you are not unable to download any changes to Comfort since the two responses keep on "doing" each other
You will probably have to remove the U4 and reprogram it by using the COPY function on the UCM05 with a default U4 on the Master socket, Make sure that Master U4 has the J4 shunt shunted in the position pointing towards it itherwise youy may copy the wrong U4 to the master
|
Posted: Monday Nov 24th, 2008 09:24 am |
|
4th Post |
technik23
Member
Joined: | Tuesday Mar 18th, 2008 |
Location: | |
Posts: | 36 |
Status: |
Offline
|
back to top
|
Thanks, you should have an emoticon for being embarrassed!!!
Incidentally how can one assess memory usage?
|
Posted: Monday Nov 24th, 2008 11:09 am |
|
5th Post |
admin
Administrator
Joined: | Saturday Mar 3rd, 2007 |
Location: | Singapore |
Posts: | 1200 |
Status: |
Offline
|
back to top
|
It is easy to recognise this sort of problem when you have seen it once
There is no issue for memory usage. you can use all the responses and fill up every event, zone, output etc, and add slaves RIOs, keypads to the maximum extent. You may see a slightly slower response.
It is not like PC where you load applications into RAM in order to run them. The responses use very little memory except for the looping situation where one response calls another, and the problem there is that each Do Response uses up the stack which eventually becomes depleted
Incidentally you can use Timers which loop , eg
Response 1: Do Response 2 after timer 1 for 2 seconds
Response 2: Do Response 1 after timer 1 for 2 seconds
The above is perfectly valid and will not crash
Each Timer starts running and the timer expiry calls the target response, which starts the timer again and waits for the timer to expire. The responses occur at different times and do not "Do" each other in this case
|
|