Timer

More
26 Jul 2011 15:33 - 26 Jul 2011 15:40 #11873 by piasdom
Timer was created by piasdom
is there a way to reset the timer without pausing
or stopping the program ? a reset button/pin ?

i used
www.linuxcnc.org/docview/devel/html/man/man9/time.9.html


thanks john
kenneth
Last edit: 26 Jul 2011 15:40 by piasdom.

Please Log in or Create an account to join the conversation.

More
26 Jul 2011 15:53 #11874 by BigJohnT
Replied by BigJohnT on topic Re:Timer
Sure you just need to stop and start the timer and it will reset.

John

Please Log in or Create an account to join the conversation.

More
26 Jul 2011 15:56 - 26 Jul 2011 15:59 #11875 by piasdom
Replied by piasdom on topic Re:Timer
there's no reset button(i didn't make one). you mean
using stop or pause ?

thanks
kenneth




use time.0.start pin again to reset ?
Last edit: 26 Jul 2011 15:59 by piasdom.

Please Log in or Create an account to join the conversation.

More
26 Jul 2011 16:03 #11876 by BigJohnT
Replied by BigJohnT on topic Re:Timer
Yes, if you interrupt the signal to time.n.start with a reset button it will zero the timer and restart it.

John

Please Log in or Create an account to join the conversation.

More
27 Jul 2011 09:56 - 28 Jul 2011 10:28 #11912 by piasdom
Replied by piasdom on topic Re:Timer
any way not to reset the timer when i use m1 or m0 ?







p.s. this won't be my last stupid question :)
Last edit: 28 Jul 2011 10:28 by piasdom.

Please Log in or Create an account to join the conversation.

More
28 Jul 2011 13:47 - 28 Jul 2011 13:52 #11957 by piasdom
Replied by piasdom on topic Re:Timer
the script counter doesn't work if i connect like this;
net reset-m123 and2.12.in0 == pyvcp.reset-m123
net m123-reset halui.mdi-command-05 == and2.12.out

works with this.
net reset-m123 halui.mdi-command-05 == pyvcp.reset-m123

it has to be directly connected ?


the script(Andys')
#!/bin/bash
COUNT=$(halcmd getp pyvcp.count)
let "COUNT += 1"
halcmd setp pyvcp.count $COUNT
exit 0
Last edit: 28 Jul 2011 13:52 by piasdom.

Please Log in or Create an account to join the conversation.

More
28 Jul 2011 14:06 #11960 by andypugh
Replied by andypugh on topic Re:Timer
piasdom wrote:

the script counter doesn't work if i connect like this;
net reset-m123 and2.12.in0 == pyvcp.reset-m123
net m123-reset halui.mdi-command-05 == and2.12.out


and2.12.in1 is never set to 1, so the and2 output is always zero.
Did you mean to use Or2?

Please Log in or Create an account to join the conversation.

More
28 Jul 2011 19:23 - 28 Jul 2011 20:26 #11969 by piasdom
Replied by piasdom on topic Re:Timer
not sure what and2 and or2 do. so i didn't know which to use.
i'll go look at or2. Thanks andy


kenneth
Last edit: 28 Jul 2011 20:26 by piasdom.

Please Log in or Create an account to join the conversation.

More
28 Jul 2011 21:12 #11971 by BigJohnT
Replied by BigJohnT on topic Re:Timer
The components and2 and or2 are logic gates. Each one takes two inputs and has one output...

and2 works like this:

if input0 AND input1 is on then the output is on.



or2 works like this:

if input0 OR input1 is on then the output is on.

John

Please Log in or Create an account to join the conversation.

More
28 Jul 2011 21:44 #11972 by piasdom
Replied by piasdom on topic Re:Timer
BigJohnT wrote:

The components and2 and or2 are logic gates. Each one takes two inputs and has one output...
and2 works like this:
if input0 AND input1 is on then the output is on.


if either one is off, out is off ?

or2 works like this:
if input0 OR input1 is on then the output is on.
John


this i get lost, as i understand this. if either is ON,
then out is ON. but at least ONE will be on at all times.
so it would stay ON ? and ya'll talk about input/output,
i don't see(mentally) what's going "which" way when i press
the button. i understand when i click the button it will turn on
or off. but this wiring(logic) gets me. but i'll keep fighten :)
Thanks !!!!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.169 seconds
Powered by Kunena Forum