4 keys entered on keypad flow routine
-
- Posts: 11
- Joined: Tue Feb 13, 2007 10:06 pm
4 keys entered on keypad flow routine
Hi people!,
I just need some flow code to read 4 keys on the keypad.I got to enter a code of 4 numbers to ge a password.
Thanks a lot and have a nice week!
Kilo
I just need some flow code to read 4 keys on the keypad.I got to enter a code of 4 numbers to ge a password.
Thanks a lot and have a nice week!
Kilo
- 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: 4 keys entered on keypad flow routine
Hello
Look in the Flowcode V3/Examples folder. There should be an example there that will do what you are looking for.
Look in the Flowcode V3/Examples folder. There should be an example there that will do what you are looking for.
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: 11
- Joined: Tue Feb 13, 2007 10:06 pm
Re: 4 keys entered on keypad flow routine
Thanks a lot Ben for your explanation!.
Yes it's true there is a TUT_32 where we can see some sample explaining how to enter a password by means of 4 keys but it is not a keypad.I do imagine that it can be altered to make some routine reading keypad.
Bye!
Yes it's true there is a TUT_32 where we can see some sample explaining how to enter a password by means of 4 keys but it is not a keypad.I do imagine that it can be altered to make some routine reading keypad.
Bye!
- 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: 4 keys entered on keypad flow routine
Hello
Ok I see, sorry I thought the example was using a keypad already.
As it happens I do have a keypad example which is why I was getting confused. Its too hot today.
Ok I see, sorry I thought the example was using a keypad already.
As it happens I do have a keypad example which is why I was getting confused. Its too hot today.
- Attachments
-
- Keypad Password.fcf
- (15 KiB) Downloaded 547 times
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: 11
- Joined: Tue Feb 13, 2007 10:06 pm
Re: 4 keys entered on keypad flow routine
Ok Ben thanks again but I wanted to know how does your routine work?.
I just need that 4 numbers enter like a password and in case of its ok some led start to blink or some comes to open.
Greetings!.
Kilo
I just need that 4 numbers enter like a password and in case of its ok some led start to blink or some comes to open.
Greetings!.
Kilo
- 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: 4 keys entered on keypad flow routine
Hello
The numbers you enter on the keypad are stored into a string using the input string macro.
When you hit the * key the input string macro is exited and the string is compared with a string stored in memory. If the strings match up then RC1 will become high, if the strings do not match up then RC0 will become high.
The program is well commented so you should be able to get to grips with whats going on by working your way through the icons.
The numbers you enter on the keypad are stored into a string using the input string macro.
When you hit the * key the input string macro is exited and the string is compared with a string stored in memory. If the strings match up then RC1 will become high, if the strings do not match up then RC0 will become high.
The program is well commented so you should be able to get to grips with whats going on by working your way through the icons.
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: 6
- Joined: Wed Jul 22, 2009 3:52 am
Re: 4 keys entered on keypad flow routine
hey BENJBenj wrote:Hello
Ok I see, sorry I thought the example was using a keypad already.
As it happens I do have a keypad example which is why I was getting confused. Its too hot today.
my version of flowcode(v3.1.0.31) wont open the example (keypad password.fcf), it says 'its of a newer version and may not load correctly' and it asks me if wish to continue, of course i hit yes, then it says 'flowcode could not load one of the components in the file because it is not registered on this machine. install the necessary component before opening this file.'
would you know of any way around this? mahalo's
- 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: 4 keys entered on keypad flow routine
Hello
Yes there is a way around this. Simply download the latest version from here.
http://www.matrixmultimedia.com/support ... .php?t=541
Yes there is a way around this. Simply download the latest version from here.
http://www.matrixmultimedia.com/support ... .php?t=541
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: 4 keys entered on keypad flow routine
I just had a look at keypad password file and in Input_String macro, It has input string and end routine looking for the same * char.
So macro will never exit?
Or have I got that wrong?
When I edit macro and change switch = '*' to switch = '#' I just get undefined variable "" at positon 9 message.
So macro will never exit?
Or have I got that wrong?
When I edit macro and change switch = '*' to switch = '#' I just get undefined variable "" at positon 9 message.
Martin
- 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: 4 keys entered on keypad flow routine
Hello
Yes you are correct this is indeed wrong. The * character should clear the string and the # should allow the string to be checked.
I have also been able to replicate the problem with using the # character in the decision icon and hopefully we will be able to solve this in V4.1
For now you could use the ASCII value for the # character so instead of
switch = '#'
you can use this
switch = 35
Yes you are correct this is indeed wrong. The * character should clear the string and the # should allow the string to be checked.
I have also been able to replicate the problem with using the # character in the decision icon and hopefully we will be able to solve this in V4.1
For now you could use the ASCII value for the # character so instead of
switch = '#'
you can use this
switch = 35
- Attachments
-
- Keypad Password.fcf
- (15 KiB) Downloaded 473 times
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
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: 4 keys entered on keypad flow routine
There is a problem with string manipulation.
1) When key is pressed, this key is not shown on LCD display which stays blank.
2) If click on input string icon to open without altering any of the equation , just click OK. A message is displayed: 'One or more of string manipulation lines are invalid' etc so it look like string and bytes can't be mixed in V4 string i/p? Also the value of string variable is not displayed in the variable window. I am assuming you took open a V3 flowcode and saved as V4?
If so conversion has failed. At least for the flowcode simulation side. I will conduct some more tests.
Edit: Works OK with V3. String values are shown on both LCD and variables window. Just a problem with V4
1) When key is pressed, this key is not shown on LCD display which stays blank.
2) If click on input string icon to open without altering any of the equation , just click OK. A message is displayed: 'One or more of string manipulation lines are invalid' etc so it look like string and bytes can't be mixed in V4 string i/p? Also the value of string variable is not displayed in the variable window. I am assuming you took open a V3 flowcode and saved as V4?
If so conversion has failed. At least for the flowcode simulation side. I will conduct some more tests.
Edit: Works OK with V3. String values are shown on both LCD and variables window. Just a problem with V4
Martin
-
- Posts: 6
- Joined: Wed Jul 22, 2009 3:52 am
Re: 4 keys entered on keypad flow routine
thanks alot BENJ, gonna give her a go right now, and sorry to everyone for threadjackBenj wrote:Hello
Yes there is a way around this. Simply download the latest version from here.
http://www.matrixmultimedia.com/support ... .php?t=541
- 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: 4 keys entered on keypad flow routine
Hello
In V4 it was decided that allowing bytes to be added to strings was a bit confusing so you will have to do the following workaround.
1) Create another string variable 1 byte in size eg Temp_String[1]
2) Using a calculation icon assign the value of the keypress to the string variable.
3) Add the temporary string to your main password string using the original string manipulation icon.
Input_string = Input_string + Temp_String
In V4 it was decided that allowing bytes to be added to strings was a bit confusing so you will have to do the following workaround.
1) Create another string variable 1 byte in size eg Temp_String[1]
2) Using a calculation icon assign the value of the keypress to the string variable.
Code: Select all
Temp_String[0] = switch
Input_string = Input_string + Temp_String
- Attachments
-
- Keypad Password.fcf
- (15 KiB) Downloaded 333 times
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: 4 keys entered on keypad flow routine
Thank you for work around and posting file. Appreciated as always.
1) V4 where strings are concerned is not backward compatible. I believed V4 was supposed to be fully compatible with all V3 files.
2) By doing following steps:
To me that means two things.Benj wrote:In V4 it was decided that allowing bytes to be added to strings was a bit confusing so you will have to do the following workaround.
1) V4 where strings are concerned is not backward compatible. I believed V4 was supposed to be fully compatible with all V3 files.
2) By doing following steps:
Im not saying is complicated, but isn’t it more confusing than the original way in which strings are handled with V3?Benj wrote:Hello
1) Create another string variable 1 byte in size eg Temp_String[1]
2) Using a calculation icon assign the value of the keypress to the string variable.
3) Add the temporary string to your main password string using the original string manipulation icon.Code: Select all
Temp_String[0] = switch
Input_string = Input_string + Temp_String
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: 4 keys entered on keypad flow routine
Thanks. V4 version works great! Maybe it could be used as a tutorial file, it has a useful string application. The reason for the sound off on the previous post, is: we have a very good product, with great support but if we did not have internet and was playing/learning about flowcode. How could we have known to:
1) Create another string variable 1 byte in size eg Temp_String[1]
2) Using a calculation icon assign the value of the keypress to the string variable.
Temp_String[0] = switch
3) Add the temporary string to your main password string using the original string manipulation icon.
Input_string = Input_string + Temp_String
It does not say that in the help files! or is it me being dumb
(don't answer that one
) and I should of worked that one out easily. (you can answer that!)
Sorry If I sound ungrateful. Im not.
Keep up the good work.
1) Create another string variable 1 byte in size eg Temp_String[1]
2) Using a calculation icon assign the value of the keypress to the string variable.
Temp_String[0] = switch
3) Add the temporary string to your main password string using the original string manipulation icon.
Input_string = Input_string + Temp_String
It does not say that in the help files! or is it me being dumb


Sorry If I sound ungrateful. Im not.
Keep up the good work.
Martin
- 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: 4 keys entered on keypad flow routine
Hello Medelec
No I think your right it would have been hard to find out why that suddenly wasnt working anymore and also about the lack of mention in the help file. I can appreciate your reasons for concern. We are trying to fix this for V4.1 so the String manipulation allows bytes to be added directly again.
No I think your right it would have been hard to find out why that suddenly wasnt working anymore and also about the lack of mention in the help file. I can appreciate your reasons for concern. We are trying to fix this for V4.1 so the String manipulation allows bytes to be added directly again.
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: 4 keys entered on keypad flow routine
Thanks, that's great news.steve wrote:It has now been fixed in v4.1 - you can now "concatenate" strings, byte variables and byte array variables together.
Is there an estimated release date for V4.1 please?
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: 4 keys entered on keypad flow routine
Same applies with V3.6.11.53stubbornbull wrote: my version of flowcode(v3.1.0.31) wont open the example (keypad password.fcf), it says 'its of a newer version and may not load correctly' and it asks me if wish to continue, of course i hit yes, then it says 'flowcode could not load one of the components in the file because it is not registered on this machine. install the necessary component before opening this file.'
would you know of any way around this? mahalo's
@ben
Are you sure it was created with V3 and not V4?..... after all it was hot that day

Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: 4 keys entered on keypad flow routine
As you can guess the hot day comment was a joke, but was not joking when I said same applies with V3.6.11.53,medelec35 wrote:Same applies with V3.6.11.53stubbornbull wrote: my version of flowcode(v3.1.0.31) wont open the example (keypad password.fcf), it says 'its of a newer version and may not load correctly' and it asks me if wish to continue, of course i hit yes, then it says 'flowcode could not load one of the components in the file because it is not registered on this machine. install the necessary component before opening this file.'
would you know of any way around this? mahalo's
@ben
Are you sure it was created with V3 and not V4?..... after all it was hot that day
Is there a reason for it not to work on my V3? have I miss a update posted else where to get this file working?
Error message when load file is: The file you are loading ws made by a newer version of flowcode (31 > 20) and may not load correctly'
What does the (31>20) signify? I'm assuming a component that is V31 is opened in flowcode with V20 component in?
Martin
- 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: 4 keys entered on keypad flow routine
Hello Medelec
Your right it was too hot that day. I was sure I edited the file with V3 but after trying to open my multiple copies here I found out none of them would open with V3. So here is the file rewritten and guarenteed for V3.
Your right it was too hot that day. I was sure I edited the file with V3 but after trying to open my multiple copies here I found out none of them would open with V3. So here is the file rewritten and guarenteed for V3.

- Attachments
-
- Keypad_Password_V3.fcf
- (9 KiB) Downloaded 316 times
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
- 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: 4 keys entered on keypad flow routine
Hello
I took this example slightly further for another customer so I might as well post it here too. This simply allows you to do things once you have provided a valid password. The example lets you control an output pin (RA0, I think) once you have gotten past the password protection.
I took this example slightly further for another customer so I might as well post it here too. This simply allows you to do things once you have provided a valid password. The example lets you control an output pin (RA0, I think) once you have gotten past the password protection.
- Attachments
-
- Keypad_Alarm_V3.fcf
- (15 KiB) Downloaded 380 times
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