Hello Guest it is July 13, 2020, 12:02:42 PM

Author Topic: How do you apply a different offset from home on a slaved axis?  (Read 436 times)

0 Members and 1 Guest are viewing this topic.

Trying to slave two axes together (Y and C) but in our case we will need to be able to apply a different offset from home for each. Is this possible in either Mach3 or Mach4?

Offline RICH

*
  • *
  •  7,411 7,411
    • View Profile
Re: How do you apply a different offset from home on a slaved axis?
« Reply #1 on: May 14, 2019, 06:56:43 AM »
Note that the primary axes are:
X     Y      Z     the related rotary to the primary axes are
A      B     C     
Rotary axes allow for indexing and rotate about the associated primary axes.
Rotary axes steps per units are in terms of degrees.

Offset needs definition since there are diffferent kinds of offsets.
Home can be anywhere, but, home is defined by the user to the controlling software which is  Mach3.
Home location can be defined as machine coordinates 0,0,0 thus once defined to Mach3 it is
said that the machine is referenced.

That said,
Do you have the C (slaved axis) moving correctly for a commanded distance of  Y yet?
Post your xml file.

RICH

Offline ger21

*
  • *
  •  6,282 6,282
    • View Profile
    • The CNC Woodworker
Re: How do you apply a different offset from home on a slaved axis?
« Reply #2 on: May 14, 2019, 07:31:45 AM »
I think he wants to offset each side different amounts from the home switch.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: How do you apply a different offset from home on a slaved axis?
« Reply #3 on: May 14, 2019, 09:15:08 AM »

"I think he wants to offset each side different amounts from the home switch."

Yes this is is what I want to do. In my case both axis are rotating the material but they need separate homing sensors and it will be extremely difficult to get each homing sensor in the same location relative to eachother.

At this point we have both axes slaved together, and each are homing to there individual sensors. Now I would like to make their 0 location at different values away from their individual homing sensors. Is this possible? 

Offline ger21

*
  • *
  •  6,282 6,282
    • View Profile
    • The CNC Woodworker
Re: How do you apply a different offset from home on a slaved axis?
« Reply #4 on: May 14, 2019, 09:40:06 AM »
It sounds like there's no reason for each to have their own home switch? Just disable the home switch on the slave axis, and check "Home Slave with Master" in General Config?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: How do you apply a different offset from home on a slaved axis?
« Reply #5 on: May 14, 2019, 10:44:02 AM »
We could do that if we made sure Y and C were in the same orientation to each other before turning on the machine, but we would like to avoid having to do that as it adds a manual step to our homing process.
Re: How do you apply a different offset from home on a slaved axis?
« Reply #6 on: May 16, 2019, 03:07:02 PM »
Hi,
I suspect that Mach4 offers features you can use for this purpose.

Like Mach3 you can slave one motor (in fact up to four motors) to another, the master. Like Mach3 the slave motors are
anticipated to have the same steps/per, accel and velocity as the master.

You can however programmatically un-link the motors. Say as part of the homing routine a slave motor can be temporarily
unlinked from the master, jiggled back and forth say and then linked together again. The slave motor does not have its own DRO
and it is less clear to me that it could have a separate offset, as an offset is associated with an axis, ie a master AND its slaves.

Still its worth experimenting. You can download Mach4 for free and try it out. If you don't load a motion control plugin
but use the Sim(ulator) Motion plugin the Demo version is time unlimited. If you load a motion plugin like the ESS
plugin for instance then Mach4 Demo will run unrestricted for six minutes before requiring a reset.

If you do want to have a look then in the API.chm document you might have a look at these functions:
mc.mcAxisUnmapMotor()
mc.mcAxisMapMotor()

Craig
My wife left with my best friend...
     and I miss him!

Offline TPS

*
  •  1,612 1,612
    • View Profile
Re: How do you apply a different offset from home on a slaved axis?
« Reply #7 on: May 17, 2019, 02:41:57 AM »
i am nor realy sure wther a slave axis can be homed seperatly by VBScript (never used one), but you can try this code in VB Scripter window.

Code: [Select]
DoButton(27) 'reference C
While IsMoving()
Sleep(10)
Wend
SetDro(5,123) '123 is the offsetposition you want
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline RICH

*
  • *
  •  7,411 7,411
    • View Profile
Re: How do you apply a different offset from home on a slaved axis?
« Reply #8 on: May 17, 2019, 08:26:09 AM »
both axis are rotating the material but they need separate homing sensors

At this point we have both axes slaved together, and each are homing to there individual sensors.
Now I would like to make their 0 location at different values away from their individual homing sensors.
Is this possible? 


I think it can be done, but how automated it can be i don't know, without playing around.
Not going to spend time playing around.

A modified screen page with proper DRO's, buttons, and VB can be used to manipulate
conditions. Typical setup is to reference the machine then define a Work Offset to the part.
Using the generic sceen you are restricted as that is for conventional / typical setups.
When you reference a machine you define to the controller where the axes are and the play on words is
that  homing / referencing is the same and that is not exactly true.

Conventionaly Y axis is linear C axis is rotational. Uncoventualy you can do whatever ....which can create problems
,but, the controller is stupid and only knows what you tell it!

Attach your xml file so your cofiguration can be reviewed.

RICH