PIC1684F - Counter reset(SOLVED)
Moderator: Benj
-
- Posts: 4
- Joined: Sat Nov 09, 2013 7:17 pm
- Has thanked: 4 times
PIC1684F - Counter reset(SOLVED)
----------------------------
Last edited by Carl_Smith93 on Sat Nov 16, 2013 5:28 pm, edited 1 time in total.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: PIC1684F - Counter reset
Does the attached code do what you want?
- Attachments
-
- FFC Count100Reset.fcfx
- (8.24 KiB) Downloaded 331 times
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 4
- Joined: Sat Nov 09, 2013 7:17 pm
- Has thanked: 4 times
Re: PIC1684F - Counter reset
I can't open it.
I am getting the error.
Failed to open document. Attribute<array> is not found.
I am getting the error.
Failed to open document. Attribute<array> is not found.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: PIC1684F - Counter reset
Hi Carl,
Can you make sure your running the latest version of 6.0.3?
You can look in 'Help', 'Check for updates'
or
'Help', 'about Flowcode' to check.
Can you make sure your running the latest version of 6.0.3?
You can look in 'Help', 'Check for updates'
or
'Help', 'about Flowcode' to check.
Martin
-
- Posts: 4
- Joined: Sat Nov 09, 2013 7:17 pm
- Has thanked: 4 times
Re: PIC1684F - Counter reset
------------------------------------------------
Last edited by Carl_Smith93 on Sat Nov 16, 2013 5:28 pm, edited 1 time in total.
Re: PIC1684F - Counter reset
Dear Carl,
i taked a fast look on your flowchart and as i see, it's working as you're expecting. It counts till 100 and then reset the counter. It just does not reset the display after reach 100.
It's not counting till 199, that number 1 you see in front the 99 is the 1 showed when count = 100. You just need to clean the display, so the 1 of 100 will disaper an it will look as you wish.
Cheers!
i taked a fast look on your flowchart and as i see, it's working as you're expecting. It counts till 100 and then reset the counter. It just does not reset the display after reach 100.
It's not counting till 199, that number 1 you see in front the 99 is the 1 showed when count = 100. You just need to clean the display, so the 1 of 100 will disaper an it will look as you wish.
Cheers!
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: PIC1684F - Counter reset
This will only work once. As soon as a digit has been used that value will stay visible. So once three digits have been used to display 100 you can not erase the second and third digit. This means the display will show 100, 200, 300, 400 etc when it should show 1, 2, 3, 4...Carl_Smith93 wrote: Not exactly , as the way I need do is like so :
If the number is less then 9.
Output : 0,1,2,3,4,5,6,7,8,9 in a single segment of display-- nothing else can be displayed in the others hence why I used decision/if.(3) = segment
If the number is less then 19 but more then 9.
Output:10(3,2) 11(3,2)12(3,2)13(3,2) and so on until the number is 19 which would need a additional if statement for 21,22,23 etc.
So, at this point :: For 1 - 9 their will be 1 segment in use at the time.
When you gets 10 - 99 their will be 2 segments being used at one time(so to speak).
When you get to 100 their will be 3 segments being used at one time.
To show 000 to 100:Carl_Smith93 wrote: But, when what you have done, is their any of doin the process but making it show up 100 rather then 99? (Edit) -- Additional: Possible to get to count upto 100& reset to 000?
Add another led_7seg_quad1::ShowDigit1 macro with arguments 0, Number/100, 0.
Change Decision to: Number > 100
Count is read from the position of the switch (Input icon A4->Count). Reset would mean changing the position of the switch lever. This can be done in simulation, but not in hardware (without mechanical components).Carl_Smith93 wrote: I would like is possible to reset the counter on the file uploaded? If, so how?
What do you want to achieve?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 4
- Joined: Sat Nov 09, 2013 7:17 pm
- Has thanked: 4 times
Re: PIC1684F - Counter reset
Ok I understand I'll try that now.balles wrote:Dear Carl,
i taked a fast look on your flowchart and as i see, it's working as you're expecting. It counts till 100 and then reset the counter. It just does not reset the display after reach 100.
It's not counting till 199, that number 1 you see in front the 99 is the 1 showed when count = 100. You just need to clean the display, so the 1 of 100 will disaper an it will look as you wish.
Cheers!
Thanks.
Yes, I changed what you did to meet what I needed and like another person said cleared the screen. Now the program is doing exactly what I wanted.kersing wrote:This will only work once. As soon as a digit has been used that value will stay visible. So once three digits have been used to display 100 you can not erase the second and third digit. This means the display will show 100, 200, 300, 400 etc when it should show 1, 2, 3, 4...Carl_Smith93 wrote: Not exactly , as the way I need do is like so :
If the number is less then 9.
Output : 0,1,2,3,4,5,6,7,8,9 in a single segment of display-- nothing else can be displayed in the others hence why I used decision/if.(3) = segment
If the number is less then 19 but more then 9.
Output:10(3,2) 11(3,2)12(3,2)13(3,2) and so on until the number is 19 which would need a additional if statement for 21,22,23 etc.
So, at this point :: For 1 - 9 their will be 1 segment in use at the time.
When you gets 10 - 99 their will be 2 segments being used at one time(so to speak).
When you get to 100 their will be 3 segments being used at one time.
To show 000 to 100:Carl_Smith93 wrote: But, when what you have done, is their any of doin the process but making it show up 100 rather then 99? (Edit) -- Additional: Possible to get to count upto 100& reset to 000?
Add another led_7seg_quad1::ShowDigit1 macro with arguments 0, Number/100, 0.
Change Decision to: Number > 100
Count is read from the position of the switch (Input icon A4->Count). Reset would mean changing the position of the switch lever. This can be done in simulation, but not in hardware (without mechanical components).Carl_Smith93 wrote: I would like is possible to reset the counter on the file uploaded? If, so how?
What do you want to achieve?
Thank you for your help & time

# Can be closed or whatever now