How to stop and collect a Keypad Digit
Moderator: Benj
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
How to stop and collect a Keypad Digit
Hello All.
Well at this moment I have not been able to recover my Old Flowcode Design from my failed Laptop Drive.
I was able to find a copy from the forum during past help.
It works 85%. And my mind is running in circles.
I have a Macro call when the Digit "0" is pressed it runs a Reset Macro.
The steps I trying to follow that other programing in my flowcode will not work not work in my new Reset Macro.
I have 4 steps and just focusing on just 1 to work.
Steps.
Press "0"
'0' is routed thru the "Keypad" Macro.
The "0" selection runs Macro Reset.----Works.
Now in Reset I need a selection ?
Press 1 --- Score
Press 3 - Pitch
For some reason beyond my findings I can not get the program to wait for the Selection and then run the little Branch to play a message.
In the future I will do some calculations in the Branch.
Currently when you press "1" it runs off and adds a count to Home team pitch.
I have added my Flowcode.
I know I'm missing a step just can't see it........
John
Well at this moment I have not been able to recover my Old Flowcode Design from my failed Laptop Drive.
I was able to find a copy from the forum during past help.
It works 85%. And my mind is running in circles.
I have a Macro call when the Digit "0" is pressed it runs a Reset Macro.
The steps I trying to follow that other programing in my flowcode will not work not work in my new Reset Macro.
I have 4 steps and just focusing on just 1 to work.
Steps.
Press "0"
'0' is routed thru the "Keypad" Macro.
The "0" selection runs Macro Reset.----Works.
Now in Reset I need a selection ?
Press 1 --- Score
Press 3 - Pitch
For some reason beyond my findings I can not get the program to wait for the Selection and then run the little Branch to play a message.
In the future I will do some calculations in the Branch.
Currently when you press "1" it runs off and adds a count to Home team pitch.
I have added my Flowcode.
I know I'm missing a step just can't see it........
John
- Attachments
-
- Count Master with Keypad Sept 5 2018.fcfx
- (166.45 KiB) Downloaded 208 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: How to stop and collect a Keypad Digit
Hi John,
Good to see you back on the forums as well.
I have spotted two issues within Keypad macro: 1) You have got a keypad component macro to first detect what key you pressed then another keypad component macro to wait until a key is pressed.
Doing that way around will not detect which key has been pressed.
You need to wait for a key pressed, then detect which key is pressed.
The other issue is never to use a call macro in this case Keypad to call itself!
Use a conditional loop instead.
If you want the loop to run at least once as in this case then selectEnd
However, within Keypad function macro, you have got a decision branch:
Near the end you have then call the Key Keypad function macro.
Start is never going to be 2 at this point, so don't know why you are calling the Keypad function macro again??
Hop this helps you to get further.
I have not checked the rest of the flowchart, just one step at a time.
Good to see you back on the forums as well.
I have spotted two issues within Keypad macro: 1) You have got a keypad component macro to first detect what key you pressed then another keypad component macro to wait until a key is pressed.
Doing that way around will not detect which key has been pressed.
You need to wait for a key pressed, then detect which key is pressed.
The other issue is never to use a call macro in this case Keypad to call itself!
Use a conditional loop instead.
If you want the loop to run at least once as in this case then select
Code: Select all
Test the loop at the:
However, within Keypad function macro, you have got a decision branch:
Code: Select all
If Start = 2
Code: Select all
Start = 0
Start is never going to be 2 at this point, so don't know why you are calling the Keypad function macro again??
Hop this helps you to get further.
I have not checked the rest of the flowchart, just one step at a time.
Martin
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: How to stop and collect a Keypad Digit
Thank you Martin
Off to make it happen and refresh my knowledge
John
Off to make it happen and refresh my knowledge
John
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: How to stop and collect a Keypad Digit
Hello Martin
I tried the steps and for some reason if I removed them the Selection for 2 & 8 won't work. The action of Start = 2 is activated when the Selection of "5" so the selection of 2 and 8 only appears once.
After this investigation on the Keypad selection the Selection for 5 and 2 or 8 are working.
I'm going back to the Reset macro to do digit capture and see if I can get it to work.
John
I tried the steps and for some reason if I removed them the Selection for 2 & 8 won't work. The action of Start = 2 is activated when the Selection of "5" so the selection of 2 and 8 only appears once.
After this investigation on the Keypad selection the Selection for 5 and 2 or 8 are working.
I'm going back to the Reset macro to do digit capture and see if I can get it to work.
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: How to stop and collect a Keypad Digit
No I'm not suggesting to remove them.JLeith wrote:if I removed them the Selection for 2 & 8 won't work.
The order needs swapping.
So it's
Wait first then GetAscii after!
Martin
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: How to stop and collect a Keypad Digit
I missed that step.
Off to correct.
Martin do you recall back in the day how to collect 2 digits from the keypad.
I recall a loop to get the 1st digit and then a loop to get the 2nd digit and then a formula to combine the two values.
Like Digit 1 = 2
Like Digit 2 - 4
The Sum of the Digit is 24
John
Off to correct.
Martin do you recall back in the day how to collect 2 digits from the keypad.
I recall a loop to get the 1st digit and then a loop to get the 2nd digit and then a formula to combine the two values.
Like Digit 1 = 2
Like Digit 2 - 4
The Sum of the Digit is 24
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
- JLeith
- Posts: 537
- Joined: Wed Nov 14, 2012 7:49 pm
- Location: British Columbia Canada
- Has thanked: 146 times
- Been thanked: 26 times
- Contact:
Re: How to stop and collect a Keypad Digit
Excellent Help Martin
Was able to get the Master back from 2016 version to 2018.
All the best
John
Was able to get the Master back from 2016 version to 2018.
All the best
John
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: How to stop and collect a Keypad Digit
Hi John, glad you are all sorted now.
This may or may not be of interest to you?
This may or may not be of interest to you?
Martin