Hello Guest it is May 01, 2025, 04:54:25 AM

Author Topic: Auto Tool Zero issue  (Read 10942 times)

0 Members and 1 Guest are viewing this topic.

Auto Tool Zero issue
« on: December 13, 2024, 03:39:16 PM »
The Smooth Stepper folks are not responding, so I will try here.

I have encountered an unusual problem with Mach 3 and the ESS that I cannot get past.  I am trying to set up the Auto Tool Zero function and it isn't working correctly.  I suspect the issue lies within the visual basic code, but I know little to nothing about visual basic.

Here is what is happening.

I have a 6 foot length of 16 gauge wire connected to the ESS ground and the machine chassis.  I have another 6 foot piece connected to port 2 pin 13.

When on the Mach 3 diagnostic screen, the digitize indicator turns green whenever I touch the input wire to the machine chassis or ESS ground.

When I click the ATZ button, the Z axis begins its slow, downward motion.  If it touch the input wire to ESS ground, the axis stops and auto zeros properly.  If I touch the input wire to the chassis, the digitize input flag turns green but the Z axis does not stop. Its almost like there is some kind of aura around the chassis that is interfering with the signal.  I am an electrical engineer and have extensive experience troubleshooting these types of issues, but this one has me stumped.  I even unwrapped the 120 VAC power cord to the computer monitor from around the  mill swing arm in case the current was inducing voltage on the arm.

Now, here's the strange part.  If I touch the input wire directly to ESS ground pin. I can start and stop ATZ as many times as I want and it works every time, UNTIL I touch the input wire to the machine chassis at the other end of the 6 foot ground wire.  When I do that, it does not stop the Z axis (even though the digitize flag in Mach turns green).  Once I have touched to the chassis, I can no longer stop it by touching to the ESS ground.  It is like there is a flag getting set somewhere in software that I cannot reset until I reset Mach.  Once I reset, It works again every time I touch directly to ESS ground UNTIL I once again touch to the chassis and then it locks up again.

I don't know how to continue.  You guys got any ideas?

Offline Tweakie.CNC

*
  • *
  •  9,284 9,284
  • Super Kitty
Re: Auto Tool Zero issue
« Reply #1 on: December 14, 2024, 12:14:32 AM »
Quote
I have a 6 foot length of 16 gauge wire connected to the ESS ground and the machine chassis.  I have another 6 foot piece connected to port 2 pin 13.

My thoughts...

Good chance you are picking up electrical noise.
The 6 foot Probe input wire should be shielded (screened) with the screen connected to GND at one end only.
Treat Earth and GND as two seperate circuits.
Check for and eliminate any Earth loops.

Tweakie.
PEACE
Re: Auto Tool Zero issue
« Reply #2 on: December 14, 2024, 04:22:46 AM »
Noise was my first thought as well.  I measured for it in every way I could with the voltmeter.  Both AC and DC readings settled to zero at very, very low levels (but should have been solid zeros).  That is why I unwrapped the AC power cord from the swing arm.  The readings, as low as they were, would trickle down slowly kind of like when you try to measure a circuit that has capacitance in it.

What gets me is the digitize flag in Mach turns on and off without fail.  My thinking as a programmer is that if Mach can see that the input has changed, it should implement the Auto Tool Zero routine.  I am not understanding how that flag can change and the routine not work, and especially how touching a possibly noisy ground source can lock the routine out until Mach is reset.  It seems like there is something going on there at a deeper programming level, kind of like those Windows bugs that Microsoft denies exist, but they go away when they release a new update.

Your suggestion of using shielded  wire is a good one.  I will try that.

Thanks for responding.
Re: Auto Tool Zero issue
« Reply #3 on: December 14, 2024, 05:43:09 AM »
OK, I tried the shielded wire.  I shielded both the ground wire and the input wire.  First I tried grounding the shield at the Smooth Stepper end and it made absolutely no difference.  On a whim, I reversed the wires so the shield was grounded at the machine end.  Again no difference.

As an electrical engineer, I have experience with assembly language programming of PIC and Motorola processors (not to mention many other computer languages), and circuit design of microprocessor based controllers (like the Smooth Stepper).  Everything in my 20+ year career as an engineer tells me this is a programming issue in Mach 3.  I don't understand what the physical difference in the electrical signal could be other than noise, but I am not having issues with any of the other I/O signals on the machine.  E-stop, motor controls, and even my home made tach circuit are working fine.

I shortened the wire to 4 feet hoping that might help a bit, but no joy.  The problem cannot be the Smooth Stepper because it sees the input change every time, as does Mach 3 (indicated by the digitize flag change).  The only thing that makes sense to me is that there is a software noise filter on the ATZ function that sets a 'no go' flag on the routine at a certain noise level.  This filter is not implemented on the digitize indicator flag, so it changes to green EVERY time.  However, as I said, if I touch the input to the machine chassis at any time, regardless of whether or how many times I have successfully auto zeroed by touching directly to the ESS ground terminal, it locks up the function and will not stop the Z axis downward travel until I reset Mach.  Then it works fine again as long as I touch the input directly to the ESS ground terminal.

By the way, if I disconnect the 4 foot ground wire from the machine chassis and touch the wires together, the ATZ works fine, even with unshielded wire.  It's just the machine chassis that is screwing up the signal.  I guess it's time to pull out the oscilloscope and look at the signal, but I will be surprised if it shows anything different at the two ends of the wires, especially the shielded ones.

This is a tough one.

Offline Tweakie.CNC

*
  • *
  •  9,284 9,284
  • Super Kitty
Re: Auto Tool Zero issue
« Reply #4 on: December 14, 2024, 09:00:14 AM »
Quote
Now, here's the strange part.  If I touch the input wire directly to ESS ground pin. I can start and stop ATZ as many times as I want and it works every time, UNTIL I touch the input wire to the machine chassis at the other end of the 6 foot ground wire.  When I do that, it does not stop the Z axis (even though the digitize flag in Mach turns green).  Once I have touched to the chassis, I can no longer stop it by touching to the ESS ground.

That sounds like there is a potential difference between one end of the 6 foot ground wire and the other end. If your multimeter can measure current I would be interested to hear if any current is flowing in that 6 foot wire.

Tweakie.
PEACE
Re: Auto Tool Zero issue
« Reply #5 on: December 15, 2024, 05:54:03 PM »
I've not had a chance to get back to this issue yet, but I was thinking it through logically and I realized what I said about a software noise filter in Mach cannot be true.  The only thing Mach knows is what the Smooth Stepper sends it over the ethernet link.  The ESS will have digital logic level inputs, so there will be a threshold voltage, generally about one volt on 5 volt logic.  The ess will have noise considerations, but the logic is either on or off in the end.  Since the digitize flag comes on without fail in Mach, the ESS is obviously detecting the ground input from the possibly noisy chassis of the machine.  The noise would possibly affect the ESS, but not Mach since Mach has no physical connection to the circuitry, only a datastream connection.  What on earth can Mach be seeing that is preventing it from running the ATZ function?  It obviously sees that the input has been triggerd because the digitize flag always turns green.
Re: Auto Tool Zero issue
« Reply #6 on: December 16, 2024, 04:19:57 AM »
I would have thought that the ESS will handle all the probing process internally since tha additional delay in the link would be fatal for accuracy.
Re: Auto Tool Zero issue
« Reply #7 on: December 16, 2024, 04:39:33 AM »
That cannot be because Mach obviously has a standardized communication protocol that allows it to function with a variety of machine controllers.  I have used several.  Mach is configurable to use any input pin on the controller.  The controller has no way of knowing which pin you will select for that, but Mach knows because you select it in the Mach configuration.
Re: Auto Tool Zero issue
« Reply #8 on: December 16, 2024, 06:23:09 AM »
No, it's not standardised which is why each motion controller needs its own plugin!  If you think about what is happening in the probing process it is clear that any delay between the probe hitting the workpiece and the system telling the axis to start decelerating will cause a dimension error and potentially damage the probe.  The original Mach3 used the PP, or more than one, and allowed different pins to be allocated to given functions.  Probing worked by starting to decelerate when the probe signal was asserted and taking the axis reading when it had stopped moving.  With a Motion Controller, if the probe signal has to wait while it's queued to get across the serial protocol, then wait again for the decelerate command, during that delay the axis just carries on.

When motion controllers came along they essentially mirrored the parallel port so they could plug into a BoB instead of the parallel cable.  So part of the connection process between Mach and the MC is to tell the latter which pins are allocated to what.   But some time-critical functions need to be delegated to the controller to make sure they work properly.   
Re: Auto Tool Zero issue
« Reply #9 on: December 16, 2024, 07:18:27 AM »
It's refreshing to meet someone who can knowledgeably talk about a subject like this.

My fist question was, how does the ESS know which pin I am going to select for the ATZ function?  Then it occurred to me that this is not a one way communication with the ESS sending data to Mach.  Apparently the ESS is querying Mach to find out which pin to send the ATZ data to.  That makes the can of worms deeper.

It means that even though the ESS is telling Mach the input status has changed, therefore causing Mach to set the digitize flag to green.  It must also, however, be telling Mach something more that is causing Mach not to process the ATZ command.  Perhaps the noise filter IS on the ESS.

I've got to get busy and figure out what is wrong with that ground signal.

What bugs me is when I first tried to use this function seveal years ago, it worked, but I think I was using that Chinese controller from Xulifeng at that time.  It apparently did not have as discriminating an input circuit as the ESS.

That Xulifeng controller worked fine, but the precision and sensitivity of the ESS on manual jog commands is far superior and worth the extra bucks.  I just did not anticipate a problem like this one popping up.