Sub routine not performing

Gapak

Senior Member
In one project I use Picaxe 20M2 and a program on Logicator. A sub routine under title"start1" makes an led blink when a " compare" command is satisfied. From time to time the subroutine is not executed although the condition calls for it. Then it never work again until I do a hard reset, that is turn off the power supply. Is there some particular precautions to observe in drawing the main (start) part of the flowsheet to avoid the lock up of a sub routine?
 

hippy

Technical Support
Staff member
If you can post your .plf flowsheet members here will be better able to analyse what the issue may be.
 

Gapak

Senior Member
I am trying to attach my flowsheet (69KB) but have no success. I use the "go advanced" and follow the instructions on the pop up windows after clicking on"attachment". The flowsheet does not go to the message?
I feel stupid, please help.
Gapak
 

hippy

Technical Support
Staff member
Not sure what is not working. It works for me ..

Go Advanced
Manage Attachments
Add Files
Select Files
Upload Files
Done ( closes pop-up )
Submit Reply
 

Attachments

Gapak

Senior Member
Finally, here is my flowsheet.
The project is the control of a small waterfall.
Pressing a push button initiate the"NORMAL" procedure: pump runs for 10 minutes unless you press the button again before that time.
Otherwise an other procedure called "CYCLE" runs the pump 5 minutes, stops for 30 minutes then repeats. This automatic cycle can be interrupted by pressing the button; this will reinstate the"NORMAL" procedure or shut down the pump.
A level control makes an led blink ( the Start1 sub routine in question) if the water level is too low. It will also switch off the automatic cycle.
Thanks for trying to find why from time to time the sub routine is not working: no blinking when water level is low. I have checked the voltage on the input port and found it correct.
Gapak
 

Attachments

hippy

Technical Support
Staff member
"Start1" is an independent task which toggles output B.5 when pin C.2 input is low. The only reason it would not be running would seem to be when C.2 input is not low.

There is nothing I could see in the program which would cause incorrect behaviour of "Start1".

What form does this level control take and what voltage are you reading on input C.2 ? I am wondering if it is an issue of reading an analogue signal using a digital input ?
 

Gapak

Senior Member
Thank you hippy for your reply
The C2 input is a simple on and off switch: low is 0 Volt, high is supply voltage. I will keep observing for abnormal conditions.
You have reassured me that my flowsheet is correct which is good news for me. This forum is great!
Gapak
 
Top