Hello Guest it is April 19, 2024, 10:13:30 AM

Author Topic: Configuration of Mach4 for homing with reference contacts  (Read 5811 times)

0 Members and 1 Guest are viewing this topic.

Configuration of Mach4 for homing with reference contacts
« on: January 03, 2017, 04:26:01 AM »
Hello,

I’m from Brunswick (Germany) and I’m a very new user of Mach4. I have used Mach3 with Windows XP via parallel ports in the past.
Now I want to try Mach4 on Windows 10 via SmoothStepper.

I have configured Win 10 to be a very “speechless” system and the communication with the SmoothStepper works well.
I want to control a portal milling machine with 3 axes.
X & Y has got to limit switches and one reference contact in the middle.
Z has got just one limit switch (top) and one reference contact.

All limits are combined together to one output by my controller. That signal I have configured as just one input (‘A ++’) on the ESS.
The reference contacts of each ax are configured as individual input’s (‘X Home / Y Home / Z Home’) on the ESS.

With Mach3 it was possible to make the homing on that way that the machine was running first to the reference contacts (in the middle of each ax) and than a configured distance to the homing position.
I know that therefore a macro must be used in Mach4 (e.g. based on the description of DazTheGas) but I’m not able to do so.
First of all the home signal is coming (on ‘Machine Diagnostics Screen’) whenever I trip a contact.
But the status LED-field (next to the position field) is not changing to green. ???

Hope someone can help me to configure Mach4 to go forward!
Marc
Upadte: Configuration of Mach4 for homing with reference contacts
« Reply #1 on: January 05, 2017, 03:21:54 AM »
Hi,

Meanwhile I have found the problem. I have made some mistakes in the configuration of the ESS.
The ‘Reference All Axes’ of Mach4 is working now like it should.

But it looks like that the version of Mach4 (or the wx4.set) I have installed is different to the one which is used by DazTheGas in his video.
1.   After ‘Reference All Axes’ the machine is moved to the reference positions and the exact OffSet values from the configuration of the ‘Homing’ are shown. (Pic. 01)
2.   I have debugged the code and figured out that the problem starts within the ‘Signal Script’. The variable ‘sig’ is not set and based on that the ‘if (sig == …)’ can’t work. (Pic. 03)
3.   In the ‘Screen Load Script’ is now a function ‘RefAllHome’ (Pic. 04) which is called by all ‘Reference All Axes’ buttons (Pic. 05)

I guess with this version of the wx4.set just a GCode must be run right before the ‘Referencing is complete’ message box is called. The GCode must move the machine to coordinates ‘all zero’. But I’m a very inexperienced user of Mach4 and I would like to have a solution which is based on the knowledge of the experienced users here!

Marc
Re: Configuration of Mach4 for homing with reference contacts
« Reply #2 on: May 09, 2017, 08:00:24 PM »
Wow. Nothing for comments here??? Being new I had hoped to find a solution to the offset issue that still plagues Mach4.
Re: Configuration of Mach4 for homing with reference contacts
« Reply #3 on: May 09, 2017, 09:10:41 PM »
Hi,
not sure that I understand exactly what you want to achieve.

My understanding of Mach4 Homing functions in this manner:
1)Ref All instruction
     [Turns off Homed LEDs, initiates movement on each axis according to homing order, direction and speed per user applied
       settings]
2)Home switch activation
     [Stops axis motion, reverses direction and backs off the switch until activation, set axis machine zero, apply user defined offset
       to axis DRO]
3) Home remaining axes in order
4) Turn on Axis Homed LEDs
       [Issues 'Referencing Complete' notice]

The important point is that each axis has a machine co-ord zero reference at the location where its Home switch reactivates. The offset
is applied to the DRO relative to that zero. Your post suggests that you wish to nominate a different location as machine zero. I don't
believe 'offset' will do that for you.

I can see a way around it tho.
If you drive your machine to the home location with the Ref All button per normal, then MDI to the desired machine zero, presumably one
corner of your travel envelop, then 'machine zero in place' This could be achieved by adding suitable code to your Ref All button.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Configuration of Mach4 for homing with reference contacts
« Reply #4 on: May 10, 2017, 06:57:50 AM »
 Thank you for the tip off. I am using the ESS and have read that the offsets don't work. They don't seem to work on my set up.  But if I can add to the ref all button to solve this, that would be great. Currently, every time I go to move from home after doing a ref all my machine limits out  and I have to keep diddling with it to get going. I will search for a thread that explains how to add suitable code to my roof all button. 
Re: Configuration of Mach4 for homing with reference contacts
« Reply #5 on: May 11, 2017, 07:42:22 PM »
Hi,
its not so much that offsets don't work but rather they're totally different to what you want.

Trying to find a 'home in place' instruction, if you are familiar with Mach3 it was an optional facility you could use to reference your machine.
I can't find a direct equivalent in Mach4. Mach4 Core does have a 'home in place' flag but the expectation is that the motion plugin actually does
the work. I use an ESS and I cannot see that 'home in place' is implemented.

I've yet to try... but from Mach4 API I found:
rc = mc.mcAxisHomeComplete(
      number mInst,
      number axisId);
which may do as you require. I will experiment some and report back.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Configuration of Mach4 for homing with reference contacts
« Reply #6 on: May 12, 2017, 12:53:17 PM »
Home in Place works fine here in Mach4 with the ESS.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Configuration of Mach4 for homing with reference contacts
« Reply #7 on: May 13, 2017, 02:49:07 AM »
Hi,
what build ESS plugin, I have 186 installed but it doesn't have home in place.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: Configuration of Mach4 for homing with reference contacts
« Reply #8 on: May 13, 2017, 03:47:58 AM »
At the moment the current release of the plugin is build 202, the "Home In Place" is not located in the ESS Config, it can be found in the Mach4 Config under the Homing tab.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: Configuration of Mach4 for homing with reference contacts
« Reply #9 on: May 13, 2017, 06:05:22 PM »
Hi Daz,
don't know how I missed it...

Still not sure that its going to help. My original suggestion to the original poster was to home to the centrally
located home switches using 'reff all' per normal, MDI to a more sensible machine zero and 'home in place' at that
location.

It rather looks like the 'home in place' option in Mach allows one or t'other method.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'