counting

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

stevel
Posts: 19
Joined: Sat Sep 05, 2009 2:18 pm
Contact:

counting

Postby stevel » Fri Jun 25, 2010 11:32 am

Can someone help me out i want to count up to 9 (1001) but its counting up to 15 (1111) how do i make it count up to 9 and reset the count and start again
Attachments
count.fcf
(5 KiB) Downloaded 152 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8335
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: counting

Postby medelec35 » Fri Jun 25, 2010 1:23 pm

here you are modified your software to count to 9.
Attachments
count to 9.fcf
(5.5 KiB) Downloaded 165 times
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: counting

Postby Sean » Fri Jun 25, 2010 1:27 pm

You will need to add a decision icon into the program loop to detect the count reset condition and clear the count back to 0.

The program is currently counting up to 255 (maximum byte value), but only displaying the lower 4 bits.