Hello Guest it is November 27, 2021, 12:55:14 AM

Author Topic: Verify button does not work in wxMach screen  (Read 575 times)

0 Members and 1 Guest are viewing this topic.

Verify button does not work in wxMach screen
« on: February 18, 2019, 02:40:51 PM »

I have Mach4 v4.2.0.3804.
In wxMach screen, in MDI tab there is a "Verify" button.
In the Mach4 Operation Manual.pdf it writes about this button:
"Verify: Sends the machine to the home position, using the homing sequence, however the home position is not set. The end position of the sequence is compared to the previously found home position when the machine was referenced. This is used to verify that the switches have not moved or steps been lost in running the machine."

When I press the Verify button it does nothing. I've entered Operation-->Edit Screen and the "Verify" button seems to have no function associated with it!?

How can I activate/implement this "Verify" function?

This is why I need it:
I have a CNC router with Home switches and no encoder.
I've noticed that it does no loose steps during milling, but sometimes (after several machine restarts and referencing) there are differences between the old and new home positions (relative to a fixed position on the machine bed).
I need to mill a plastic sheet on both sides and I use two bolts on the machine bed to place the workpiece in a certain position and to flip it in the same position.
Sometimes there are differences between the two faces of the milled part, usually about 0.3 - 0.7 mm on Y or Z axis.
Before upgrading the software to Mach4 I used a software that had such a "Verify" function (named RehomingCheck) and when the error was low <2-3 steps, the two faces of the plastic sheet were well aligned. Sometimes the error on Y or Z axis was about 30 steps (0.15mm) and I could see an offset between the two sides of the milled workpiece (~2 x 0.15 = 0.3 mm).

Re: Verify button does not work in wxMach screen
« Reply #1 on: February 19, 2019, 12:35:59 AM »
you need to ditch wxMach.set.

It was the very first and most basic Mach screen set. It has very limited (maybe even nil) editing properties.
I believe it was intended as a test bed only. You can if you crash Mach hard enough CAUSE wxMach.set to run but its crap
by comparison to wx4.set or wx6.set for instance.

Try View/Load Screen, make a selection other than wxMach.set and <open>. The screen will load and redraw itself. If you like
it close Mach and that will cause the new screen set to be flushed to the .ini file.

If you decide that you like wx4.set for example then you should make a copy of it and call it sberanwx4.set say, and then use
the copy. Any screen edits you make will be stored in the new an individualized screen set and not be overwritten when you
update to the newest build of Mac4 in a few months.

My wife left with my best friend...
     and I miss him!
Re: Verify button does not work in wxMach screen
« Reply #2 on: February 19, 2019, 03:19:00 AM »
Hi Craig,

Usually, I use a copy of wx4.set screen (named wx4_PK.set). I only loaded the wxMach.set screen in order to see how the Verify function/button works. As I wrote, I need it and I want to copy it in my wx4_PK.set screen.


Re: Verify button does not work in wxMach screen
« Reply #3 on: February 19, 2019, 04:13:02 AM »
well just code it and attach it to a button.

All that is required is a GoTo zero (machine coordinates) for all three axes.

My wife left with my best friend...
     and I miss him!
Re: Verify button does not work in wxMach screen
« Reply #4 on: February 19, 2019, 07:03:11 AM »

When I read in "Mach4 CNC Controller Operations Guide" how the "Verify" function works, I understand that it is already implemented and I only want to copy it in my screen. I want to avoid coding it if it is already done...

In fact I really don't know how to implement such a "verify" function.  :(

I think it should be something like G31 - Probe function, but instead of probe input it should be one of the X, Y and Z home microswitches... I need to (slowly) move on each axis in the home direction and stop motion when the microswitch triggers, save coordinates and then compare them with the home position X, Y and Z. But how can I do that?

Re: Verify button does not work in wxMach screen
« Reply #5 on: February 19, 2019, 02:18:35 PM »
homing is rightly the job of the motion controller.

When an axis homes it travels in a given (programmable) direction at a given (programmable) speed until the home switch
changes state. Then the axis is to stop. The axis must stop exactly when, or very close to, when the switch operates.
That makes it a real time detection, that is the axis must stop within a few or perhaps tens of microseconds.

If you programmed Mach to drive an axis until a switch activated it would fail because Mach is not a realtime controller.
When the switch activates it would take several or perhaps tens of milliseconds for the signal to propagate back to Mach
and then another several or tens of milliseconds for Machs STOP instruction to get back to the motion controller.
All precision is lost because of the communication delay.

Your motion controller is however very fast and normally has responsibility for homing. Most motion controllers cannot be
programmed by a user however. Thus if controller is instructed to home an axis, it will and reset the machine coordinate.
What you really want is for it to home an axis, ie drive slowly to the home switch until it activates , back up until it
deactivates, but NOT reset the machine coordinate.

I am still trying to contemplate a way of doing as you want.

If you were prepared for the axes to drive very VERY slowly so that the communication delay does not adversely affect
the accuracy of the result then programming it in Lua would be easy.

The other way I'm thinking of would require the button to cause the machine to drive (at traverse speed) to machine
cords 0,0,0 and THEN be instructed to <ref all> and detect the distance moved between the original 0,0,0 and the newly
minted 0,0,0 position. The difference between the two would represent lost steps/inaccuracy that had accumulated between
homing operations.

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