Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Tarak on June 12, 2013, 08:07:13 AM

Title: VB to enable/disable "A axis rotations" in toolpath display.
Post by: Tarak on June 12, 2013, 08:07:13 AM
Is it possible to use VB script to change the appearance of the toolpath display?
The main thing I was hoping, is to enable/disable A axis rotations.
Darc
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: stirling on June 12, 2013, 08:36:55 AM
what are you hoping to achieve?

Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: Tarak on June 12, 2013, 05:09:53 PM
Hi Stirling,
I use the rotary axis in a profile type grinder (similar to a lathe or a cylindrical grinder, but the rotary axis is controlled via a servo motor, so I can put relief on items).
Basically it's a hob grinder.
X= Ø (same as a lathe)
Z=left and right (same as a lathe)
A=Rotation (controlled via a servo)

When I use a profile that only uses X and Z the tool path profile looks good.
If I need to use X,Z and also A rotating a controlled amount (e.g 90°) the tool path profile looks good also, if A isn't moving too far.
But if I need to have A axis basically just rotating, I need to put in X_ _ Z_ _ A3600 because it is controlled via a servo motor, I cannot just turn the rotary axis on like a lathe.
So I was hoping in this instance, I could just have the code change the tool path display to not include the rotary axis, rather than turning it on and off manually in the tool path options all the time.
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: stirling on June 13, 2013, 04:41:16 AM
Hi Darc - AFAIK you can't toggle this with script. However - off the top of my head you could have two Mach profiles OR maybe you could use B in your constant rotations code instead of A.

Ian
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: BR549 on June 13, 2013, 09:40:36 AM
Something you can try. Set up the rotary axis in mach both ways . As a spindle and as a rotary axis. USE the same port and pins for both. When you need a spindle call the spindle . When you need the rotary call the rotary, home it and then use it.

It HAS worked well here that way in testing(;-).

Just a thought, (;-) TP
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: stirling on June 13, 2013, 09:53:55 AM
Isn't that what I said Terry?

Ian
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: BR549 on June 13, 2013, 10:17:47 AM
HIYA IAN but you suggested 2 different profiles Mine runs in 1 profile. This way you have the option of spindle or rotary via Gcode.

(;-) TP
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: stirling on June 13, 2013, 10:22:46 AM
No - I suggested two different profiles OR... - do try to keep up Terry  ;D

Ian
Title: Re: VB to enable/disable "A axis rotations" in toolpath display.
Post by: Tarak on June 13, 2013, 04:57:46 PM
Thanks guys, I'll try that on the weekend.