Second or dual z controll

This forum is for requests and queries about machine tool support for Vectric Products
wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Second or dual z controll

Post by wcarrothers »

Hello.

I use mach3 for motion control. And am looking to control axis A as my second z. Tis would be moving on the same commands as the z fat as depth doing 2 parts side by side.

So for example I need the output to duplicate the z command with an a command or something like

G1X1.0000Y1.0000Z-0.5000A-0.5000F20

Or something like that..

Would love if the output was possiable based on doing a mod to the post processor.

Else I guess I'll have to make up a program to go though the output after and alter the file sticking in the A axis moves wheel it sees a z move.

Thanks for any help.

What are the people with the multiple axis machines like the stinger? Perhaps is a command based on the tool change in the motion software to swithch axis.

B.

User avatar
jimwill2
Vectric Wizard
Posts: 612
Joined: Tue Aug 31, 2010 1:48 am
Model of CNC Machine: CaMaster Stinger w/recoil, FTC
Location: Parkville, Missouri

Re: Second or dual z controll

Post by jimwill2 »

Mach is already running the z-axis, I believe all you have to do is piggy-back your second z-axis to the original one. You may need a stronger z-controller... I don't know about that.
Jim Williams

davewierenga
Posts: 20
Joined: Mon Apr 25, 2011 1:28 am
Model of CNC Machine: Stinger1

Re: Second or dual z controll

Post by davewierenga »

Mach has a feature where you can slave a controllers.

Dave 8)

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

Thanks, I'll look in to slaving.m but have to be able to move them independent to zero and such. Seeing the motor is already running on the a axis output and I can move it with my pendant or A g code command figured easiest just to have the output Goode to have the a command in it after the normal z.

System is running brushless AC moog servos with a kflop and kanalog interface control. Which works great by the way. By far the best external controll I've used.


B.

User avatar
Adrian
Vectric Archimage
Posts: 14639
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Second or dual z controll

Post by Adrian »

Should be easy enough to do with the Post Processor assuming you want complete duplicates of the Z movements.

Define a new A_POSITION variable and then duplicate any lines which have a [Z] move in them and change the [Z] to [A] if that's what you called the A_POSITION variable.

You'd probably need to do the same for the SAFE_Z_HEIGHT and Z_HOME_POSITION.

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

I think Adrian is closer to what I was thinking. But if anyone has more detail that would be great.

But yes the idea is, the z move up or down to what ever amount would be duplicated far as value as an A command right after the zmcommand in the Gcode


B.

User avatar
Adrian
Vectric Archimage
Posts: 14639
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Second or dual z controll

Post by Adrian »

What more detail are you looking for?

There is post processor editing guide on the vcarve/aspire help menu.

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

I downloaded that and will give it a look.

B.

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

Guess what I'm saying.

Is I can creat a variable

VAR A_HOME_POSITION = [ZH|A|A|1.4]

Wich in theory would use A as the preceding letter befor the ZH z home position.

Bt later in the program z height is referenced using ZH not the variable name A_HOME_POSITION

Like when you have
Var a_possitioin = [Z|A|A|1.4]

It reference that by saying

[n]g1[X][Y][Z][F]

Guess what I don't get is you are formatting the variable but then using that entry in the format to later reference it which also is the actual value.

Hard to explain while the wife is yelling to leave.

B.

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

Well started working on my post processor editor in vb.net.

Now it can add the a moves to z moves.

Delete z moves or a moves

And can add m7 and m9 codes to apropriate lines

So now have a bit of a work around anyway. Will probably add more features to it as I go..

B.

User avatar
Mark
Vectric Staff
Posts: 1058
Joined: Sat Aug 18, 2007 2:55 pm
Model of CNC Machine: CNC Shark, ShopBot, Roland PNC3000
Location: Alcester U.K.
Contact:

Re: Second or dual z controll

Post by Mark »

Hello Bill,

If all you wish to do is to output identical values for A & Z, within the post processor you could format
the Z & ZH similar to the following:

VAR Z_POSITION = [Z|A||1.4]
VAR Z_HOME_POSITION = [ZH|A||1.4]

When calling the values, use something similar to:


"[N] G01 [X] [Y] Z[Z] A[Z] [F]"

I hope that this helps.

Cheers,

Mark.

davewierenga
Posts: 20
Joined: Mon Apr 25, 2011 1:28 am
Model of CNC Machine: Stinger1

Re: Second or dual z controll

Post by davewierenga »

Bill
Let me try again. If you slave the A axis to the Z axis in Mach, there is nothing to be changed in the G code generated by the pp. Mach will output identical pulses and directional info to the A axis. This does mean that you will need an additional driver, motor, and cabling for the A axis. Assuming that the A axis is mounted to your X axis some set distance from the initial Z axis, I would put the desired bits in both spindles, tightening the the collet in the Z axis and leaving the one in the A axis a bit loose. Then when you find your Z Zero, the bit in the A axis will be pushed down to Z zero or in this case A zero. You can then tighten the collet on the A axis, use Mach to go to safe Z and be ready to cut. Both A and Z will both to to safe Z.

Clear as mud?

Dave

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

Yes mark that is what I want to do. Will try it. Already started making up a little app for my self which can modify the g code in some ways specific to what work I'm doing.

Such as including or removing m7 and m9 commands. In addition to swapping z entries for a's and duplicating the z with a commands . I suspect over time I'll add other functions so good I started this.

But I like the way you said to do it.

I have separate controlls for the 2 z motors so it is a omelette second axis. So want to treat it that way.

Just was not understanding how the variables were referenced and didnt know you could leave out the imbedded letter when creating the variable. So later you stick it in the statement..

B.

Thanks everyone

wcarrothers
Vectric Wizard
Posts: 349
Joined: Sun Nov 19, 2006 2:20 am
Location: Michigan

Re: Second or dual z controll

Post by wcarrothers »

Guess the only downside to doing it that way is the values have to be always written rather then only on change since if only on change you would end up with letters Z and A in the code with no values.

Wondering what the rules are on posting EXE's like the one I created to do the simple alternations that my little app does.

here is a pic of it though. Seems to work well. Basically you can open the file. Select a mod type, modify it then transfer it back and do multiple passes (if you want to apply more then one change)..

b.
Attachments
BillsGcodeEditor.jpg

kilrabit
Vectric Wizard
Posts: 498
Joined: Thu Feb 26, 2009 4:04 am
Location: Uvalde Texas

Re: Second or dual z controll

Post by kilrabit »

PM Sent

Post Reply