Timer
28 Jul 2011 22:12 #11973
by BigJohnT
piasdom wrote:
Yep
That is also correct with the or2 if either input is on then the output is on.
Each component will have pins that you can connect appropriate things to. In the case of the or2 component you have three pins
or2.n.in0
or2.n.in1
or2.n.out
so you have two inputs and one output... if you have the output from a pyvcp button connected to or2.n.in0 and press the button the or2.out will be on as long as one of the in's are on.
John
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 ?
Yep
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 !!!!!!
That is also correct with the or2 if either input is on then the output is on.
Each component will have pins that you can connect appropriate things to. In the case of the or2 component you have three pins
or2.n.in0
or2.n.in1
or2.n.out
so you have two inputs and one output... if you have the output from a pyvcp button connected to or2.n.in0 and press the button the or2.out will be on as long as one of the in's are on.
John
Please Log in or Create an account to join the conversation.
29 Jul 2011 11:42 - 29 Jul 2011 13:28 #11985
by piasdom
Last edit: 29 Jul 2011 13:28 by piasdom.
Please Log in or Create an account to join the conversation.
08 Aug 2011 11:26 - 08 Aug 2011 11:50 #12297
by piasdom
when the counter script(m123) gets to g43 h4, it resets to zero.
is this suppose to work like this? i'm using m123 to increase the count
and m124 to reset to zero.
script -
#!/bin/bash
COUNT=$(halcmd getp pyvcp.count)
let "COUNT += 1"
halcmd setp pyvcp.count $COUNT
exit 0
Thanks
kenneth
is this suppose to work like this? i'm using m123 to increase the count
and m124 to reset to zero.
script -
#!/bin/bash
COUNT=$(halcmd getp pyvcp.count)
let "COUNT += 1"
halcmd setp pyvcp.count $COUNT
exit 0
Thanks
kenneth
Last edit: 08 Aug 2011 11:50 by piasdom.
Please Log in or Create an account to join the conversation.
23 Sep 2011 12:19 - 23 Sep 2011 12:23 #13389
by piasdom
Last edit: 23 Sep 2011 12:23 by piasdom.
Please Log in or Create an account to join the conversation.
23 Sep 2011 16:58 #13398
by andypugh
I am not sure I really understand your question, but the "time" component does have three u32 outputs. You should be able to connect those to Glade
According to www.linuxcnc.org/docview/devel/html/gui/...l#gladevcp:HAL_Label
You would need to set the type to 2 and choose a suitable format specifier. For time values I would try "%02i" I think.
Python format strings are a subject all of their own:
docs.python.org/release/2.5.2/lib/typesseq-strings.html (which I feel could be more clearly written)
According to www.linuxcnc.org/docview/devel/html/gui/...l#gladevcp:HAL_Label
You would need to set the type to 2 and choose a suitable format specifier. For time values I would try "%02i" I think.
Python format strings are a subject all of their own:
docs.python.org/release/2.5.2/lib/typesseq-strings.html (which I feel could be more clearly written)
Please Log in or Create an account to join the conversation.
23 Sep 2011 17:17 - 23 Sep 2011 17:21 #13399
by piasdom
Thanks andypugh ,
i had time in pyvcp and know about the u32. i do have the label
in glade set to u32. and have the pin/signal linked in my post hal to
time.0.hours. but it says pin(gladevcp.Time_hour) doesn't exist.
and i have text set %2.0f. Will keep looking.
Thanks
kenneth
net power-hours time.0.hours == gladevcp.Time_hour
i had time in pyvcp and know about the u32. i do have the label
in glade set to u32. and have the pin/signal linked in my post hal to
time.0.hours. but it says pin(gladevcp.Time_hour) doesn't exist.
and i have text set %2.0f. Will keep looking.
Thanks
kenneth
net power-hours time.0.hours == gladevcp.Time_hour
Last edit: 23 Sep 2011 17:21 by piasdom.
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds