NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC pyVCP PYVCP format help

Welcome, Guest
Username: Password: Remember me

TOPIC: PYVCP format help

PYVCP format help 05 Apr 2011 09:12 #8588

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
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 09:43 by piasdom.
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 09:41 #8590

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 4948
  • Thank you received: 85
  • Karma: 134
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
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 09:50 #8592

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
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 09:52 by piasdom.
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 09:57 #8593

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 4948
  • Thank you received: 85
  • Karma: 134
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 09:58 by BigJohnT.
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:06 #8594

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
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.
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:18 #8595

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
checked to make sure i had PYVCP = MyVCP.xml in the ini. i do.
but it would be as MDI works.
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:22 #8596

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
i must have the wrong file as i took out MDI Command and it still works.
but the xml file is in /emc2/configs
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:23 #8597

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 4948
  • Thank you received: 85
  • Karma: 134
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>
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:24 #8598

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 4948
  • Thank you received: 85
  • Karma: 134
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
The administrator has disabled public write access.

Re:PYVCP format help 05 Apr 2011 10:28 #8599

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
you're right. i got buttons :):)
The administrator has disabled public write access.
Time to create page: 1.013 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.