Exit Loop after push button
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Exit Loop after push button
Hi everybody
How to leave the Loop below and continue? It does not help by pressing the Miac dsPIC KetPad button (8)
See attached file:
How to leave the Loop below and continue? It does not help by pressing the Miac dsPIC KetPad button (8)
See attached file:
Best Regard
Monie
Monie
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Exit Loop after push button
Hello Monie,
I take it you are updating the GetKey variable inside the loop. Looking at your program you are sampling the keypad but saving the result into the variable Key.
Maybe try this instead in the loop parameter.
Key <> 8
I take it you are updating the GetKey variable inside the loop. Looking at your program you are sampling the keypad but saving the result into the variable Key.
Maybe try this instead in the loop parameter.
Key <> 8
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Exit Loop after push button
Hi Monie,
You have assigned a variable called Key to the GeyKey component.
However the variable you are checking within the loop to exit is called GetKey
You need to change one of the variables so they match.
Edit.
Ben beat me too it.
You have assigned a variable called Key to the GeyKey component.
However the variable you are checking within the loop to exit is called GetKey
You need to change one of the variables so they match.
Edit.
Ben beat me too it.
Martin
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: Exit Loop after push button
Hi medelec35 and Benj
Thanks for your suggestions;-)
Can't get out of this loop.
Even if I use it GetKey <> 8
Thanks for your suggestions;-)
Can't get out of this loop.
Even if I use it GetKey <> 8
Best Regard
Monie
Monie
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Exit Loop after push button
Looking at your program you are sampling the keypad but saving the result into the variable Key.
Maybe try this instead in the loop parameter.
Key <> 8
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: Exit Loop after push button
Hi Benj
I can't get out of LOOP
Even if I try what you write...
I can't get out of LOOP
Even if I try what you write...
Best Regard
Monie
Monie
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Exit Loop after push button
The way your Flowchart is set up, with no key pressed or any key except 8, it should not loop anyway.
It should only loop If you hold down key 8.
Could there an issue with one of the call macros?
You could try disable all then enable one at a time?
Unfortunately, I have not got a dsPIC to test with.
It should only loop If you hold down key 8.
Could there an issue with one of the call macros?
You could try disable all then enable one at a time?
Unfortunately, I have not got a dsPIC to test with.
Martin
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: Exit Loop after push button
Hi medelec35
Don't Write Key <> !8
But this works Key <> 8
So now I can get out of LOOP and work on the codes.
You both have to thank you very much for your help.
Don't Write Key <> !8
But this works Key <> 8
So now I can get out of LOOP and work on the codes.
You both have to thank you very much for your help.
Best Regard
Monie
Monie
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: Exit Loop after push button
Hi everybody
How to convert TimStr and MiniSter and SecStr
Have tried but not succeed!
I want to convert String to Float, must use Float format!
Must use HOUR FP and MIN FP and Sec FP... FLOAT format
Do you have a suggestion?
HOUR_FP = StringToFloat$ (TimeStr)
MIN_FP = StringToFloat$ (MinStr)
Sec_FP = StringToFloat$ (SecStr)
See attached file below! If you have a proposal then I will be very happy;-)
How to convert TimStr and MiniSter and SecStr
Have tried but not succeed!
I want to convert String to Float, must use Float format!
Must use HOUR FP and MIN FP and Sec FP... FLOAT format
Do you have a suggestion?
HOUR_FP = StringToFloat$ (TimeStr)
MIN_FP = StringToFloat$ (MinStr)
Sec_FP = StringToFloat$ (SecStr)
See attached file below! If you have a proposal then I will be very happy;-)
Best Regard
Monie
Monie
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Exit Loop after push button
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel