Flowcode6
Flowcode6
Hello! Please help with an example of entering a value (for example 1155, 8888... 4125) from the keyboard into a variable integer type
- 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: Flowcode6
Hello,
To do something like this you would have a routine like this. Written in pseudocode.
Hope this helps.
To do something like this you would have a routine like this. Written in pseudocode.
Code: Select all
done = 0
var = 0
while (done != 1)
{
key = ReadKeypad()
if (key < 255)
{
if (key > 9) then done = 1
if (key <= 9) then var = (var * 10) + key
}
while (key < 255)
{
key = ReadKeypad()
}
}
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
Re: Flowcode6
Hello! Thanks for the example. Please indicate an error in the attached file. It is necessary to reflect the value of the variable(var) on the indicator. Thanks in advance
- Attachments
-
- 1. Keypad.fcfx
- (6.74 KiB) Downloaded 153 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: Flowcode6
Hi buvaylov,
Does this work better for you?
Does this work better for you?
- Attachments
-
- 1. Keypad.fcfx
- (7.2 KiB) Downloaded 151 times
Martin
Re: Flowcode6
Hello Martin! Thank you for your help. I am making a winding machine and want to know if I can contact you for project advice in the future. Regards, Alexandr
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- 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: Flowcode6
Hi Alexandr,
Can you ask for help via main forums please and not via PM as its against forum rules.
Issues with your flowchart is you need to add a LCD start component before the main loop: &
Within configuration settings, you will need to change RC to XT as RC is only If you have an external resistor and capacitor connected and not a crystal or resonator.
Can you ask for help via main forums please and not via PM as its against forum rules.
Issues with your flowchart is you need to add a LCD start component before the main loop: &
Within configuration settings, you will need to change RC to XT as RC is only If you have an external resistor and capacitor connected and not a crystal or resonator.
Martin