Hello Guest it is April 28, 2024, 08:32:44 AM

Author Topic: Homing scripts  (Read 880 times)

0 Members and 1 Guest are viewing this topic.

Homing scripts
« on: January 15, 2022, 06:39:51 AM »
I watched the Homing and Soft Limits video on YouTube. I copied “edit scripts” for “Ref All Home and Set Soft Limits” and delete the original script from line 198 or so and paste new script in copied from “show more” on YouTube page but kinda get lost after that as to “save as” screen set ? Ive watched it any times but she moves pretty quick and i get lost. Sorry for this question again but step me through the steps after pasting the new script in to the “edit screen”. I’m lost xx(
Thanks, Brad
Re: Homing scripts
« Reply #1 on: January 15, 2022, 04:13:40 PM »
Hi,
 I am assuming you are using one of the supplied screensets, say wx4?

wx4 is a common choice for a mill, but as the name suggests it is for a four axis machine.....but what happens if you only have three axes? Then when a homing move or similar is called
the machine will attempt to move your fourth axis....but its not installed and therefore you get an error.

The solution is to, in the ScreenLoad script, remove or edit any instructions that reference the fourth axis, and then save it. What you have done is modified your original screenset wx4....and now
it's slightly different.

At some time in the future when you get the newest, latest and greatest build of Mach4 it will install a new copy of wx4...and your modified copy of a few months, also called wx4, will get overwritten.
and all your edits and tweaks will be lost. Bugger! The correct solution for this problem is to make a copy of wx4, as a good starting point, and call it something unique, like MyVesrion_wx4, and then
use that screenset. Any modifications you do on that screenset, like the homing modifications will happen on the copy. Thus when you get a fresh wx4 when you update Mach then your screenset will
not get overwritten.

The procedure is go to  C:\Mach4Hobby\Screens and make a unique copy of the screenset you like the most, in this example wx4. Now fire up Mach and in the View\Loadscreen menu you will be able
to choose your unique copy of your preferred screenset. Once you do so your profile will be updated so that every time you fire up Mach it will select this screenset. At the very lowermost right hand
side of Machs screen you will see the name of the screenset in use, and incidentally the name of the profile in use also.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Homing scripts
« Reply #2 on: January 15, 2022, 07:04:44 PM »
Craig, Appreciate your taking the time to reply as to my “Homing” scripts change as to the wx4 screen set. I was doing this on my laptop so my plasma computer (Minix) running Win10 is still un F’d up. What i was attempting to do was setup my soft limits and then have the table home to the lower left corner as the Home position each time i fire up the table.
Thanks, Brad
Re: Homing scripts
« Reply #3 on: January 15, 2022, 07:23:53 PM »
Hi,
I understand....but you have a faulty procedure. SoftLimits ONLY work and make any sens AFTER the machine is Homed or Referenced.

For instance lets say your machine has Home switches such that the machine coordinate zero, ie Home is 50mm from the left hand side and 50mm up from the bottom.
If your machine has travel dimensions of 1200mm x 2400mm then your SoftLimits would be:

X++ 1150mm
X--  50mm
Y++ 2350mm
Y--  50mm

The SoftLimits describe the travel boundaries of your machine but are REFENENCED to your Home location.

When you first turn on Mach it has no idea where it is. Lets say the machine has been parked roughly in the centre of the table, thus when you turn on and engage SoftLimits then
the machine could travel 1150mm to the right...from the centre of the table.....a F..UP!!!

The correct procedure is turn on the machine...then <Ref All>, then <Enable SoftLimits>.

In order for SoftLimits to do you any good you must have Home switches or some other means of repeatably and exactly referencing your machine to Home EVERY startup.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Homing scripts
« Reply #4 on: January 15, 2022, 09:57:15 PM »
Craig, i’m sorry i guess i kind of explained homing and such in a lame description. Yes, i have Fuchs prox sensors on my home built table on - + X, - + Y, and +Z and also float switch on torch mount. Yes, understand Mach has no idea where the table is when it is initially fired up, i was relying on -X and -Y as home to positions or “ref all home”. Does that sound about right?
Thanks,
Brad
Re: Homing scripts
« Reply #5 on: January 15, 2022, 11:00:50 PM »
Hi,

Quote
i was relying on -X and -Y as home to positions or “ref all home”. Does that sound about right?

Yes, that sounds OK.

My first mini-mill never had Limit switches, I had Home switches near the end of each axis but not right at the end. Thus I used the Home switches
and SoftLimits, and did so for seven years, mostly without bother.

My new mill is much bigger, faster and way more powerful so I decided I'd be a fool not to have Limit switches, and so my machine has them AND
separate Home switches, that is nine roller plunger snap action microswitches in all, each one on their own input.

Once upon a time controllers had so few inputs it was necessary to combine a number of switches together on one input.....but why now? My ESS has 51 IO's,
so why not use them?. It means that Mach is NEVER confused about what is a Limit and what is a Home. If the X++ limit activates then Mach knows absolutely
to disallow any jog in the '+' direction but will allow jogging in the '-' direction, no questions, if or buts, or guessing, Mach knows.

My procedure is:
1) Fire up the machine
2) <Ref All>
3) <Enable SoftLimits>

So I still have soft limits, they are set up to be 2mm 'inside' the actual Limit switches, and the Limit switches are 2mm 'inside' the physical hardstop.
The Home switches are 4mm 'inside' the Limit switches.

If a physical Limit switch is activated the machine Estops, as it supposed to, but an Estop results in a loss of reference and so you have to touch off to
your job, if possible, before restarting the job, a PITA. That's why I still use SoftLimits, because Mach will prevent you from going out-of-bounds WITHOUT
losing reference. Should SoftLimits fail for any reason or Mach becomes confused about them then the actual physical limit switches are still there, but with any
sort of luck never actually triggered. In fact every once and a while I deliberately turn SoftLimits off just to test the Limit switches.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Homing scripts
« Reply #6 on: January 16, 2022, 06:46:31 AM »
Craig, This is all great information for me to know how others have set up their machines and their Mach software as well. Seems that maybe i need to learn how to write and edit basic scripts to fix ********* or just get a lot out of my basic Mach 4 program? Is this something you had to learn how to do?
   I am going to run this plasma table using a PMDX 424 BOB, a Price CNC Torch Height Controller and the Minix small format computer running Win10 with an Everlast Power Plasma 60s/w machine torch and floating Z switch. Have been dabbling with this build fir a couple of years Off/On now, almost finished.
    Also building a PM727 cnc mill using an Acorn motion controller, their software and servos from DMM. Partially completed as well using CNC4RX7 plans. Fun stuff for me as the mill will be a real versatile tool to have working at home, have to depend on a Bridgeport at work as of now.
Brad
Re: Homing scripts
« Reply #7 on: January 16, 2022, 06:48:47 AM »
Slight correction! CNC4XR7, i had put “CNC4RX7”.
Brad

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Homing scripts
« Reply #8 on: January 17, 2022, 08:31:41 AM »
Brad,

Here is a starter for you to start learning how to modify your Mach4.
Hope it helps.
https://www.machsupport.com/forum/index.php?topic=45397.0

Bill
Re: Homing scripts
« Reply #9 on: January 17, 2022, 09:43:10 AM »
Good Morning Bill,
   Sure appreciate the reach out as to you sending me an information link to help me better navigate my uncharted waters. Sometimes my brain feels pretty thick 😵😵. I guess i need to remember that none of us are born knowing this stuff are we? Thanks again for sharing, i’ve got miles to go in my scripting journey 🥶🥶.
Brad