disable home button while running

More
13 Apr 2011 18:54 #8859 by BigJohnT
Ok, take all the and2 hal stuff out of the xml file. Only PYVCP goes in the xml file like <button>... etc.

In the hal configuration you will see that and2.0 exists because you only created one instance. You can create more than one of some comps. So if you created two and2's you would see and2.0 and and2.1. To add a function (addf) to a thread (servo-thread) you have to add each specific instance. So your addf line would look like:

addf and2.0 serv-thread

and you can place that right after your loadrt and2 line.

Once that is up and going and you have an and2 loaded and added to a thread (it does nothing if not added to a thread)...

In your posgui hal file you have to create a net line to connect the pins together like before. And remember as you are connecting a pyvcp button to something you have to connect it after it is created so that is why you put the code in your postgui hal file.

Do one line at a time... first try and create a net that connects the halui.mode.is-manual to the in0 pin of the and2... and don't forget to give it a signal name after the net.

John

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

More
13 Apr 2011 18:55 #8860 by piasdom
think i need to create it in xml?
just -
<halpin>"and2"</halpin>

nothing else. no button . bar.
don't think it needs that

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

More
13 Apr 2011 18:55 #8862 by piasdom
it starts but can't find and2

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

More
13 Apr 2011 19:00 - 13 Apr 2011 19:01 #8865 by piasdom
i have nothing in my xml yet. looks like i don''t need?

in axis.hal
loadrt and2
addf and2.0 servo-thread (i didn't have .0 in and2.0, just and2)

emc starts
Last edit: 13 Apr 2011 19:01 by piasdom.

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

More
13 Apr 2011 19:08 #8868 by piasdom
net AND2 halui.joint.0.home. and2.0.in0
net AND1 halui.mode.is-manual and2.0.in1

can't find pin

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

More
13 Apr 2011 19:09 #8870 by BigJohnT
Great, now try and connect the first thing to the and2.0.in0 with a net command in your postgui hal file.

John

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

More
13 Apr 2011 19:14 - 13 Apr 2011 19:17 #8871 by piasdom
net AND2 halui.joint.0.home. and2.0.in0 <
had a . after home

now says already linked to AND2 <---my name



net AND2 halui.joint.0.home and2.0.in0
net AND1 halui.mode.is-manual and2.0.in1

do i need another net command for out
net AND3 and2.0.out
Last edit: 13 Apr 2011 19:17 by piasdom.

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

More
13 Apr 2011 19:18 - 13 Apr 2011 19:19 #8872 by BigJohnT
You can't use and2 as a signal name as it is already a component name so pick something else.

The two inputs to your and2 are halui is manual and your button.

The output of your and2 goes to the home pin.

John
Last edit: 13 Apr 2011 19:19 by BigJohnT.

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

More
13 Apr 2011 19:26 #8873 by piasdom
can i use My AND2?
now it says my is manual is already connected to MyAND2




net MyAND2 halui.mode.is-manual and2.0.in0
net MyAND1 halui.mode.is-manual and2.0.in1
net MyAND3 halui.joint.0.home and2.0.out

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

More
13 Apr 2011 19:28 #8874 by piasdom
net just-home-x halui.mode.is-manual and2.0.in0
net just-home-x halui.mode.is-manual and2.0.in1
net just-home-x halui.joint.0.home and2.0.out

better ?

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

Time to create page: 0.470 seconds
Powered by Kunena Forum