Hi. I'm having a little problems with a flowchart I set up. I believe someone can help me fix it. This is a SetPoint that I'm slowly developing. It works as follows: Setpoint starts with initial zero value. When the A1 input is activated for at least 2 seconds, the Setup mode is activated. A led signals active setup via port C0. Once the Button_Up or Button_Down buttons are pressed, add or subtract 1 to the value of the "Count" variable. If any of these buttons are continuously pressed, successive increments or decrements will be made while the button is being pressed. To deactivate the Setup mode, the A1 input is restarted for at least 2 seconds.
The "Count" value is shown in a display.
Some problems I encountered:
1 - If the "Button_Up" or "Button_Down" control buttons are pressed too fast, the program locks.
2 - When any of these buttons is pressed continuously, the program locks, not obtaining the desired effect.
I am sending the code attached.
Problems setting up setup
- 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: Problems setting up setup
Hello,
You have loops for while button down and while button up but inside the loops you are not refreshing the Button_Down and Button_Up variables.
You just need to copy the input icons inside the loops.
You have loops for while button down and while button up but inside the loops you are not refreshing the Button_Down and Button_Up variables.
You just need to copy the input icons inside the loops.
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: 37
- Joined: Tue Jul 17, 2018 11:30 am
- Has thanked: 7 times
- Been thanked: 3 times
- Contact:
Re: Problems setting up setup
It did not occur to me that I was not reading the door during the loop. Thank you very much. I was able to fix this quickly.