~~~~~~~code help~~~~~~~
Spragmatic
Posts: 59
· Please see code attached-· A few questions I have.
#1--· I'm wondering if I can stop the timing sequence after PButton2 is pressed by pressing PButton2 again anytime during the sequence(during RCTIME)?· Hope that made sense?· I need to be able to stop the program during the pause for safety reasons if possible.· (This is·the closing of a panel.)···
#2--· At this point I need to press PButton1 to go fully open again while making PButton2·non-functional until completely open again.· (This only allowing the panel to open again·no matter·if you try and·keep pressing PButton2 to close.)·
#3--· Then able to close and back to program start.
· Not quite sure how to make this happen.· Thanks!!·
······························ Greg
Post Edited (Spragmatic) : 3/22/2010 3:07:26 PM GMT
#1--· I'm wondering if I can stop the timing sequence after PButton2 is pressed by pressing PButton2 again anytime during the sequence(during RCTIME)?· Hope that made sense?· I need to be able to stop the program during the pause for safety reasons if possible.· (This is·the closing of a panel.)···
#2--· At this point I need to press PButton1 to go fully open again while making PButton2·non-functional until completely open again.· (This only allowing the panel to open again·no matter·if you try and·keep pressing PButton2 to close.)·
#3--· Then able to close and back to program start.
· Not quite sure how to make this happen.· Thanks!!·
······························ Greg
Post Edited (Spragmatic) : 3/22/2010 3:07:26 PM GMT
Comments
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Post Edited (Zoot) : 3/22/2010 10:52:47 PM GMT
Greg
The "main" program occasionally reads this count to see how much time has passed, and to reset the counter to zero. The rest is keeping track of what's going on, and making some decisions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Greg
IF rcValue > 10_000 THEN
HIGH Led2
ELSE
LOW Led2
ENDIF
I don't what or how your RC circuit is setup, so besides waiting for debounce on Pb2, the above would also require that the RC time is above 100_000 micro seconds (10ms).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
I've tried moving things around with your Interrupt code from above and still can't get PButton2 to function. I've ran program in debug and I get confused on what's going on. If I leave it in debug for to long all LED's come on and all relays energize and program locks up? Not sure what is happening there?
I'm willing at this point to pay someone for their time to correct this problem.·
INC rcDivider
IF rcDivider >= 100 THEN
rcDivider = 0
INC rcCounter
ENDIF
That would effecticly scale the count up by 100, so you'd have a max time count of around 65.5 seconds.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!