Hello Guest it is April 25, 2024, 03:23:01 PM

Author Topic: Shared Home/Limit Switch "RefAllHome" Procedure  (Read 790 times)

0 Members and 1 Guest are viewing this topic.

Shared Home/Limit Switch "RefAllHome" Procedure
« on: June 13, 2022, 01:00:19 PM »
Hello everyone. I just acquired a used CNC router machine & PC (Mach 3 ver 2.0, Windows 7) and am trying to get it up and running in a way that I know how to use it. I am a CNC instructor at our local makerspace on a ShopBot PRS Alpha machine, so I am conversant in CNC principles in general but I am relatively new to Mach3 so that's why I came here for help.

My new machine is a ~35x38" Chinese 3-Axis kit with a 2.2 KW Spindle and NEMA 23 motors that the previous owner bought on Ebay and assembled and used. It is in running condition and works fine, I'm just trying to work through a few config/setup issues so I can safely use it for my needs.   

The issue I am working through currently and asking for help with in this post is how to get this new machine to Reference Home and establish Machine Coord X/Y to 0. All three of the Axes have physical normally open mechanically activated limit switches at each end. The machine does not have separate Home and Limit switches, so they are shared.

At our makerspace, we have a CNC plasma table that runs on Mach 3, and when you hit "REF ALL HOME" the machine will jog to a specific corner of the table, hit each Limit switch, then back off in reverse a few mm and hit it again more slowly, set the machine coordinate to 0.0 for that axis, then move onto the next axis and do the same thing. Then the borders of the "Zero X" and "Zero Y" buttons in Mach 3 Program Run screen turn green. You'd then move the torch to your desired work coordinates and zero from there.

I don't think the previous owner of my new machine set Mach 3 up setup to do this, because when I hit REF ALL HOME, the machine just travels to a corner of the table and hits the Limit switch and just stops there paralyzed in the "LIMIT TRIGGERED" condition.

When I viewed the "REF ALL HOME" Button VBScript, this is what I see:

Code: [Select]
'DoButton( 24 ) 'Ref Z Axis
DoButton( 23 ) 'Ref Y Axis
DoButton( 22 ) 'Ref X Axis
DoButton( 25 ) 'Ref A Axis

'DoOEM Button (133) 'Zero X Encoder
'DoOEM Button (134) 'Zero Y Encoder
'DoOEM Button (135) 'Zero Z Encoder



Under the Motor Home/Soft Limits Configuration Screen:
  • X/Y/Z are reversed, with a soft Max of 100/-100, And "Home Neg" and "AutoZero" are green checks.
  • Home Off is set to 0.000

Other notable items from the current configuration:
  • X axis is slaved to None, Y Axis is Slaved to A, Z to none
  • In General Config "Home Sw. Safety" is checked.
  • Debounce settings are 0
  • Motor units are in inches
  • In the "Diagnostics" screen, when ANY limit switch on any of the three axes is triggered, the same LEDs light up

Can anyone help me determine how to change the configuration so that when I hit "REF ALL HOME" my CNC machine will travel to the X and Y limit switches, back off a specified amount, and then establish that point as Machine Coordinate 0? Can this be done with shared Home and Limit switches? Or Do I need to source and install separate home switches?

From the manual PDF this is exactly what I want to happen:
Quote
4.6.5 Referencing in action
When you request referencing (by button or G-code) the axis (or axes) which have home
switches defined will travel (at a selectable low speed) in the defined direction until the
home switch operates. The axis will then move back in the other direction so as to be off the
switch. During referencing the limits do not apply.
Re: Shared Home/Limit Switch "RefAllHome" Procedure
« Reply #1 on: June 13, 2022, 04:03:04 PM »
Also, from ports and pins:
X++ (Enabled, Port #3, Pin #2, Active Low)
X-- (Enabled, Port #3, Pin #2, Active Low)
X Home (Enabled, Port #3, Pin #3, Active Low)
Y++ (Enabled, Port #3, Pin #2, Active Low)
Y-- (Enabled, Port #3, Pin #2, Active Low)
Y Home (Enabled, Port #3, Pin #3, Active Low)
Z++ (Enabled, Port #3, Pin #2, Active Low)
Z-- (Enabled, Port #3, Pin #2, Active Low)
Z Home (Enabled, Port #3, Pin #3, Active Low)
A++ (Enabled, Port #3, Pin #2, Active Low)
A-- (Enabled, Port #3, Pin #2, Active Low)
A Home (Enabled, Port #3, Pin #3, Active Low)
(the rest are not enabled)

End I have RnR Motion Controller PlugIn, which has
Home Setup Pull Off = Unchecked
« Last Edit: June 13, 2022, 04:08:33 PM by gktrk »
Re: Shared Home/Limit Switch "RefAllHome" Procedure
« Reply #2 on: June 14, 2022, 12:45:10 PM »
Here's a picture of the way the BOB inputs are wired (Model #JDSW43R aka TB6065, uses RnRMotion.dll Plugin):

The output from all six of the limit switches is wired in series to input #2:

I tried changing the Ports # Pins in mach 2 config last night so that all of the Inputs map to port #3, Pin #2 as there is no wire going to "IN3," but REF ALL HOME is still triggering the Limit and halting with no further action.

While everything "works" on this machine, I am beginning to think it might be worth the $ so upgrade to a supported Mach 4 card and just start over form scratch so I know everything is correct. Can you guys recommend a good Mach 4 USB card so I can do some research?
« Last Edit: June 14, 2022, 12:54:38 PM by gktrk »
Re: Shared Home/Limit Switch "RefAllHome" Procedure
« Reply #3 on: June 14, 2022, 05:12:37 PM »
Ok - I kept tweaking settings and eventually figured this out and now things are working properly.

If anyone else has the same issue. it is possible to get REF ALL HOME to function as intended using the limit switches as Homing switches all wired together in series to one input on a BOB.

The important things I determined necessary for my setup to work:
  • General Config / "Home Sw. Safety" = Unchecked
  • General Config / "Home Slave with Master Axis" = Checked
  • All Axes (X/Y/X/A) Set to Monitor Port 3 / Pin 2 / Active Low
  • REF ALL Home VB Script (with no Z Homing):
Code: [Select]
DoButton( 23 ) 'Ref X Axis
DoButton( 22 ) 'Ref Y Axis
DoButton( 25 ) 'Ref A Axis
  • Homing reverse/Location depends on how you set your table up

Time to see what this little machine can do!