reset counter at a hour

For general discussion related FlowStone
Post Reply
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

reset counter at a hour

Post by RZK »

Hi everybody, i want a counter reset, not with a trigger but with a time value like what i have posted i don't find the solution, if someone have please help me ! I can say i'm a noob in flowstone ^^
thanks !
Attachments
counter.fsm
(1.22 KiB) Downloaded 906 times
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: reset counter at a hour

Post by tester »

Like this?
Attachments
reset.fsm
(1.23 KiB) Downloaded 935 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

Re: reset counter at a hour

Post by RZK »

WTF I have tried this but in string... thank's a lot !
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: reset counter at a hour

Post by tester »

You can make it even simpler.
Attachments
reset-v2.fsm
(1.2 KiB) Downloaded 936 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

Re: reset counter at a hour

Post by RZK »

Thanks for your help tester. I need one more thing, if the computer is shut down at the hour of the reset this counter isn't reseted. i want to reset my counter at a new day if its possible.
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

Re: reset counter at a hour

Post by RZK »

UP
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

Re: reset counter at a hour

Post by RZK »

hi everybody, my counter need to do not reset my counter when i have a power failure, like a save of the value. i don't know if a program in flowstone can make that(ex: counter at 015==>power failure at restart of program start value of counter ==>015). Next stuff to develop is to reset this counter at 00:00 or at a new day even if i have the computer is shut down. Then at restart the day have changed. Is possible to use this value to reset the counter ? I know its a hard problem ^^ but i need to find solution with Computer program like flowstone. I tried to do that with a PLC its simple but the communication it's hard... in flowstone communication extra simple but programming hard xD. Thank's for reading guys ! (sry for my English :D)
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: reset counter at a hour

Post by tester »

If you save your reset date to text file on reset point, then at next app start - app can compare current date with last date that was saved in file (file is overwriten each time when it's saved). Have you tried to use that?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
RZK
Posts: 23
Joined: Mon Dec 23, 2013 9:50 am

Re: reset counter at a hour

Post by RZK »

i will, thanks for the advice !
Post Reply