disable home button while running

More
14 Apr 2011 13:44 - 14 Apr 2011 17:17 #8903 by piasdom
THANKS.
i understand it better now.
in0 "creates" the pin halui
in1 "links" that to "out"

i didn't know i was creating a pin at all
but create - link - do :)

and in the examples i saw, the and2.0.in0 was at the end of it,
didn't know it could be there. but now that i got create-link-do,
it a WHOLE lot better.
THANK you for your time and patience !!!!

Attachments:
Last edit: 14 Apr 2011 17:17 by piasdom.

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

More
14 Apr 2011 16:19 - 14 Apr 2011 17:40 #8908 by piasdom
can i use halui.mode.is-manual more then once.
which is it, i can have more then one "out" and only one "in"?
or the other way ? don't know how to reuse halui.mode.is-manual
i have this in hal
loadrt and2 count=3
addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread

trying to repeat what i have for X.





p.s. last question for today :) (tomorrow is a another day)
Last edit: 14 Apr 2011 17:40 by piasdom.

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

More
14 Apr 2011 18:28 - 14 Apr 2011 18:48 #8910 by piasdom
even trying thsi

net home-x-btn home-y-btn home-z-btn <= pyvcp.just-home-x pyvcp.just-home-y pyvcp.just-home-z
net home-x-in-manual and2.0.in1 <= halui.mode.is-manual
net home-x halui.joint.0.home halui.joint.1.home halui.joint.2.home <= and2.0.out

got this to work

#and2 x
net home-x-btn and2.0.in0 <= pyvcp.just-home-x
net home-x-in-manual and2.0.in1 <= halui.mode.is-manual
net home-x halui.joint.0.home <= and2.0.out

#and2 y
net home-y-btn and2.1.in0 <= pyvcp.just-home-y
net home-y-in-manual and2.1.in1 <= halui.program.is-idle
net home-y halui.joint.1.home <= and2.1.out

#and2 z
net home-z-btn and2.2.in0 <= pyvcp.just-home-z
net home-z-in-manual and2.2.in1 <= halui.mode.is-joint
net home-z halui.joint.2.home <= and2.2.out

but don't know if i'm killing emc2 a little at a time.
Last edit: 14 Apr 2011 18:48 by piasdom.

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

More
14 Apr 2011 19:37 #8915 by andypugh
piasdom wrote:

can i use halui.mode.is-manual more then once.

Not by name, but you can re-use the signal name.

So, if you have somewhere

net sig1 halui.mode.is-manual and2.0.in0

Then somewhere else you could use

net sig1 and2.1.in0

because the "value" of sig1 is always the same as halui.mode.is-manual.

What I would normally do, though is

net mode-check halui.mode.is-manual => and2.0.in0 and2.1.in0 and2.2.in0

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

More
15 Apr 2011 11:44 #8926 by piasdom
THANKS, i ended up with;

#and2 x
net home-x-btn and2.0.in0 <== pyvcp.just-home-x
#net home-in-manual and2.0.in1 <== halui.mode.is-manual
net home-x halui.joint.0.home ==> and2.0.out

#and2 y
net home-y-btn and2.1.in0 <== pyvcp.just-home-y
#net home-in-manual and2.1.in1 <== halui.program.is-idle
net home-y halui.joint.1.home ==> and2.1.out

#and2 z
net home-z-btn and2.2.in0 <== pyvcp.just-home-z
#net home-in-manual and2.2.in1 <==
net home-z halui.joint.2.home ==> and2.2.out

net home-in-manual and2.0.in1 and2.1.in1 and2.2.in1 <= halui.mode.is-manual

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

More
15 Apr 2011 12:07 #8931 by piasdom
i'm having trouble figuring out which to use on the second line(for what i'm doing)
i try to fine others to use there, but it disable the button. emc load but the button
doesn't work. what the idea behind picking something for that.


net home-z-btn and2.2.in0 <== pyvcp.just-home-z
net home-in-manual and2.2.in1 <== halui.mode.is-manual
net home-z halui.joint.2.home ==> and2.2.out

in the above three lines, i don't understand the middle line too much
i know and is the sig and halui is the pin. the pin goes(in) to the sig always
like if i put halui.mode.is-manual ==> and2.2.in1 this is going out to the sig,
and the other way and2.2.in1 <== halui.mode.is-manual the sig is sending this out

what i think i know;

net = command
second & third position = in or out
depending on the position of the sig and pin.

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

More
15 Apr 2011 12:41 #8938 by BigJohnT
The order you place the pins has no meaning at all. The arrow is ignored by the processor and has no meaning at all.

net must be first.
signal-name must be next

So:

net my-signal-name and2.2.in1 <= halui.mode.is-manual
net my-signal-name and2.2.in1 => halui.mode.is-manual
net my-signal-name halui.mode.is-manual <= and2.2.in1
net my-signal-name halui.mode.is-manual => and2.2.in1

are all the same.

John

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

More
15 Apr 2011 12:47 #8939 by andypugh
piasdom wrote:

second & third position = in or out
depending on the position of the sig and pin.


No, absolutely not.

The position has no control over whether something is an input or an output.

A pin is either an input or an output. This is fixed and immutable, nothing that you can do can change the direction of a pin.
The position in the line is irrelevant.
The position in the line does not matter.
It is completely unimportant where in the sequence you put the pins. They are an input or an output dependent only on their hard-coded definition.
Some pins are inputs, some pins are outputs.

You can have one or fewer output pins on any "net" line
You can have zero or more input pins on any "net" line.
You must have a signal name after the "net command"
You can arrange the order of the input and output pins on the line in any way that suits you.
You will quite often see lines like this:

net example input-pin-1 <= shared-output-pin => input-pin-2

You keep making this statement, and we keep correcting you.

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

More
15 Apr 2011 14:54 #8945 by piasdom
thanks BigJohnT and andypugh

i'll keep at it. i just can't get my head around what does what.
the position of the pin and sig mean nothing.and this <== and ==> mean nothing(<==> i got awhile back i shouldn't have
used em here because it just confuses me :)

that being said,i'm trying to figure out what "happens" when switching sig and pin position.
i need to see(in my head) "what" is happening. ya'll can wire this from scratch. ya'll can "see"
the "wiring", where it goes,what it does.
i hope i'm making this clearer, as i think it is "me" not explaining myself in "yall" terms.
took me awhile to figure out what i pin and what is sig. i Do really understand that part.
but i'm not explaining this correctly and it gets me deeper into trouble :)
i really do appreciate all ya'll time and a lot of patience:)
Thanks !

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

More
15 Apr 2011 15:10 #8946 by BigJohnT
piasdom wrote:

thanks BigJohnT and andypugh

i'll keep at it. i just can't get my head around what does what.
the position of the pin and sig mean nothing.and this <== and ==> mean nothing(<==> i got awhile back i shouldn't have
used em here because it just confuses me :)


The signal name MUST be next after the word net. You can not put it anywhere else on the line.

that being said,i'm trying to figure out what "happens" when switching sig and pin position.
i need to see(in my head) "what" is happening. ya'll can wire this from scratch. ya'll can "see"
the "wiring", where it goes,what it does.


What happens when you switch the signal name with a pin is EMC crashes and won't run.

i hope i'm making this clearer, as i think it is "me" not explaining myself in "yall" terms.
took me awhile to figure out what i pin and what is sig. i Do really understand that part.
but i'm not explaining this correctly and it gets me deeper into trouble :)
i really do appreciate all ya'll time and a lot of patience:)
Thanks !


I know your having a hard time getting a grasp of this... but you are making progress.

John

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

Time to create page: 0.549 seconds
Powered by Kunena Forum