PYVCP format help

More
05 Apr 2011 16:12 - 05 Apr 2011 16:43 #8588 by piasdom
PYVCP format help was created by piasdom
ok, i have the below. i know the halpins are correct as some very nice people told me where to look(THANKS). i want to create three more button after the first. first i want to create the buttons in my xml file and hopefully make the links in my hal later(as suggested by one of those nice people). i have HALUI = halui in my ini file and the first buttons' command.
the first button shows and works, but the other three don't even show. i'm not sure if i need <labelframe> </labelframe> on each pin.
tried both ways. is there another file i need to work with to just get buttons in axis 2.4.6 or is there some wrong in what i have. i can't see
what that could be as the first button show and works great. and i used that pattern to make my other buttons. Thanks for any help !


<pyvcp>
<labelframe text="MDI Commands">
<button>
<halpin>"rapid-to-home"</halpin>
<text>"Rapid to Home"</text>
<font>('Helvetica',20)</font>
</button>
</labelframe>
</pyvcp>

<pyvcp>
<labelframe text="Just Home X">
<button>
<halpin>"halui.joint.0.home"</halpin>
<text>"Home X"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>

<pyvcp>
<labelframe text="Just Home Y">
<button>
<halpin>"halui.joint.1.home"</halpin>
<text>"Home Y"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>

<pyvcp>
<labelframe text="Just Home Z">
<button>
<halpin>"halui.joint.2.home"</halpin>
<text>"Home Z"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>

reading better i see i may have misunderstood:) in <halpin> </halpin>, is THAT suppose to be the name i pick or does it have to be one of the available pins in the list?
Last edit: 05 Apr 2011 16:43 by piasdom.

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

More
05 Apr 2011 16:41 #8590 by BigJohnT
Replied by BigJohnT on topic Re:PYVCP format help
The only part of your xml file that will be used is what is between the first two <pyvcp></pyvcp> tags so remove all but the first and last one.

John

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

More
05 Apr 2011 16:50 - 05 Apr 2011 16:52 #8592 by piasdom
Replied by piasdom on topic Re:PYVCP format help
now i have this, but only the first button show. does the name in <halpin> </halpin> something i choose or has to
be one of the available pins ?
i'm lost as i don't know if the rapid-to-home(first button) pin was there already or you made it :)

<pyvcp>
<labelframe text="MDI Commands">
<button>
<halpin>"rapid-to-home"</halpin>
<text>"Rapid to Home"</text>
<font>('Helvetica',20)</font>
</button>
</labelframe>

<labelframe text="Just Home X">
<button>
<halpin>"just-home-x"</halpin>
<text>"Home X"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>

<labelframe text="Just Home Y">
<button>
<halpin>"halui.joint.1.home"</halpin>
<text>"Home Y"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>

<labelframe text="Just Home Z">
<button>
<halpin>"halui.joint.2.home"</halpin>
<text>"Home Z"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>
Last edit: 05 Apr 2011 16:52 by piasdom.

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

More
05 Apr 2011 16:57 - 05 Apr 2011 16:58 #8593 by BigJohnT
Replied by BigJohnT on topic Re:PYVCP format help
Works for me. Did you save the file after changing and shut down EMC then restart it?

You might want to change the halpin names so it makes more sense to you after the buttons show up
like just-home-y and just-home-z...

John
Last edit: 05 Apr 2011 16:58 by BigJohnT.

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

More
05 Apr 2011 17:06 #8594 by piasdom
Replied by piasdom on topic Re:PYVCP format help
yes i did save it, i just now closed emc and the did "save as" and looked for the correct folder. it asked to replace file.

i thought this had to be the hal pin in the list <halpin>"halui.joint.1.home"</halpin>, but i "can" change it to what i want?
i thionk that's where i'm getting confused. but i still don't understand why the button don't show. MDI command still shows.
i moved "just home x" to the top of the xml file, but MDI Command is the only one to show.

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

More
05 Apr 2011 17:18 #8595 by piasdom
Replied by piasdom on topic Re:PYVCP format help
checked to make sure i had PYVCP = MyVCP.xml in the ini. i do.
but it would be as MDI works.

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

More
05 Apr 2011 17:22 #8596 by piasdom
Replied by piasdom on topic Re:PYVCP format help
i must have the wrong file as i took out MDI Command and it still works.
but the xml file is in /emc2/configs

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

More
05 Apr 2011 17:23 #8597 by BigJohnT
Replied by BigJohnT on topic Re:PYVCP format help
I know you did not save it to the same directory that the config is in as the code works for me. Put the following in there and save it to the same directory as your ini and hal files are in.

<pyvcp>
<labelframe text="MDI Commands">
<button>
<halpin>"rapid-to-home"</halpin>
<text>"Rapid to Home"</text>
<font>('Helvetica',20)</font>
</button>
</labelframe>

<labelframe text="Just Home X">
<button>
<halpin>"just-home-x"</halpin>
<text>"Home X"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>

<labelframe text="Just Home Y">
<button>
<halpin>"just-home-y"</halpin>
<text>"Home Y"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>

<labelframe text="Just Home Z">
<button>
<halpin>"just-home-z"</halpin>
<text>"Home Z"</text>
<font>('Helvetica',10)</font>
</button>
</labelframe>
</pyvcp>

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

More
05 Apr 2011 17:24 #8598 by BigJohnT
Replied by BigJohnT on topic Re:PYVCP format help
The xml file has to be in the same directory as your ini an hal file emc/configs/axis I think you called it.

John

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

More
05 Apr 2011 17:28 #8599 by piasdom
Replied by piasdom on topic Re:PYVCP format help
you're right. i got buttons :):)

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

Time to create page: 0.376 seconds
Powered by Kunena Forum