pyvcp help

More
11 Jan 2014 12:36 - 11 Jan 2014 12:36 #42605 by Willheg
pyvcp help was created by Willheg
Hello everyone,

I have my router working pretty well now, still needs a few upgrades to be better but I'm happy at the moment.

Anyway, i'm up to making LinuxCNC have a side bar with added buttons and LEDs and XYZ cords.

Well i have the LEDs working as i like as they where hooked up pretty easy to the touch plate.

The XYZ cords. where easy as well cause they just used the signal that is already there.

What I'm having trouble with is i have DTG (Distance to go) on the tab beside it but cannot workout how to get this to show up like in the DRO tab, if anyone could help me out that with what code i need here that would be great, I've been looking and playing with this for some time now and it's got me going round in circles.

Also looking at doing touch off buttons for Z X+ X- Y+ Y- to set the 000 point or each one by its self, i have studied all the docs i can see on the internet but the classic-ladder stuff has been doing my head in, does anyone have any good advice on how to achieve what I'm after or any tutorials on this that explain it in on go in "layman's terms".

Anyway hope all this understandable and hope you can understand what I'm trying to achieve.

Thanks
William
Last edit: 11 Jan 2014 12:36 by Willheg.

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

More
11 Jan 2014 15:01 #42609 by Rick G
Replied by Rick G on topic pyvcp help

Also looking at doing touch off buttons


Might want to look here...
gnipsel.com/linuxcnc/g-code/lathe02.html

Using a MDI command in your .ini file, a button and G10...

Rick G

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

More
11 Jan 2014 15:25 #42611 by Willheg
Replied by Willheg on topic pyvcp help
Thanks for that, and the fast response.

It helps a little bit.

Most of the ones i have seen run 2 lines of MDI code and use classic ladder and pyvcp, but they are doing my head in as I'm trying to do more than just one axis as I'd like to also do a x,y touch off to set 0 to one corner.

Also still stuck on the DTG, for all axis and each individual axis, will post a screen capture and the xml file (it's a bit messy) so anyone can see what I'm trying to achieve, may still make changes to the screen but this should give people the idea.

Any more help would be great.

William
Attachments:

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

More
11 Jan 2014 18:14 #42612 by ArcEye
Replied by ArcEye on topic pyvcp help

Also still stuck on the DTG, for all axis and each individual axis.........


There is not pin AFAIK which gives your distance to go, you need to subtract axis.N.joint-pos-fb from axis.N.joint-pos-cmd
ie actual from commanded position
www.linuxcnc.org/docs/devel/html/man/man9/axis.9.html

To do that you would have to set up a component to constantly read both and output a value

It might give a pretty, busy display, but I find DTG about as useful as a chocolate fire guard and have it turned off the whole time.

regards

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

More
11 Jan 2014 19:21 #42613 by BigJohnT
Replied by BigJohnT on topic pyvcp help
I could see where DTG could be useful info for a wire EDM perhaps but usless for milling and turning IMHO.

JT

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

More
11 Jan 2014 20:52 - 11 Jan 2014 20:53 #42616 by Rick G
Replied by Rick G on topic pyvcp help
If you want to do more than a single MDI command make a subroutine to do what you want and call it as a MDI command in your .ini file
for example to go home...

In your ini file use something like...

#MDI_COMMAND = o<home> call

Where the called sub is...
o<home> sub 
            (debug, CAUTION HIT RESUME TO RAPID MACHINE Z THEN X AND Y TO G53 HOME POSITION)
          M0 (pause)
          M110
          ;z to home first then x y to home
          G53 g0 z0
          G53 g0 x0y0

o<home> endsub

To set your touch off with gcode look at G10L2 and G10L20
linuxcnc.org/docs/html/gcode/gcode.html#sec:G10-L2_

Never had a reason to even look at DTG myself.

Rick G
Last edit: 11 Jan 2014 20:53 by Rick G.

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

Time to create page: 0.125 seconds
Powered by Kunena Forum