Hello Guest it is April 10, 2024, 02:19:26 AM

Author Topic: Mach3 multipies movement after loading program  (Read 962 times)

0 Members and 1 Guest are viewing this topic.

Mach3 multipies movement after loading program
« on: March 04, 2023, 07:12:14 PM »
  New to the forum but not new to Mach3.  I recently set up a new control cabinet using a CNC4PC UC300ETH with a C94 motion controller.  Everything plays nice until I load a program.  Using a wireless pendant or the GUI pendant movements are as commanded; that is, if I ask for 0.001, I get 0.001.  Then when I load a program, the movements amplify about 100 to 1.  That is to say, if I ask for 0.001 I get 0.100 of movement.  Mach thinks the machine moved by the amount I asked and has no clue that the Z is in the rafters :-\.  The only way to restore proper movement with the pendants is to close Mach and reboot it.  All is well until I load a program and then LOOK OUT.  I tried resetting Mach by going back to a previous time but to no avail.  Anybody?

Ed
Re: Mach3 multipies movement after loading program
« Reply #1 on: March 04, 2023, 07:48:53 PM »
Hi,
could it be that the machine is in inch mode whereas you are in mm or vice versa?

Try MDI'ing G21 and that should put the machine in mm mode and G20 put it in inch mode.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach3 multipies movement after loading program
« Reply #2 on: March 04, 2023, 07:59:50 PM »
  Thanks Craig,  I can give that a try.  I am using Mach 3/4 Arcs (inch) post processor as I have been for several years and I would think that the controller just does what it is told.  One other anomaly is that when I load a program, the machine position changes.  Which means that after I have zeroed things out, particularly the Z axis, I would have to re-zero after loading a program; not normal behavior at all based on my years of past experience.
  I'll have to get back tomorrow with the results of that effort as I am about to hang it up for this evening.
Thanks, Ed
Re: Mach3 multipies movement after loading program
« Reply #3 on: March 04, 2023, 08:44:59 PM »
  I did try the G20 G21 MDI command to no avail.  I programmed G20 G01 Z 0.001 F40 and got 0.100 (appx.) and then G21 G01 Z 0.000 F40 and the Z returned to 0.00.  Again, about 100 to 1.  So I brought up the GUI pendant and it still behaved correctly.  I must have something programmed wrong somewhere but I'm out of time for today.  One outside chance consideration; I am using a hybrid servo setup with integrated servo on the stepper drivers.  The servo loop is confined to the encoder/driver relationship and any following error simply puts the drivers into fault mode.  As far as I can see, there is no feedback to the controller or Mach at all.   Other than the alarm signal from the drivers, there is only pulse and direction communication from the C94 to the drivers.

Ed
Re: Mach3 multipies movement after loading program
« Reply #4 on: March 04, 2023, 09:25:02 PM »
Hi,

Quote
As far as I can see, there is no feedback to the controller or Mach at all.

That is correct, Mach is open loop. That is to say that mach issues a trajectory, which is a series of points in space in 1 millisecond time intervals. Mach issues
blocks of numeric data that describe the controlled point in 1ms time slices. The motion controller receives those pulses into the motion buffer. As those time slices are enacted
the motion controller returns to Mach where the controlled point is and that data is displayed by mach in its DROs. The fact that the DROs appear to 'move' tells us that
Mach is producing a trajectory and that the motion control is receiving the trajectory and that its issuing Step/Dir pulses to the motors and 'consuming' that trajectory.

In truth though the motion controller issues the Step/Dir pulses but really has no idea whether the motors actually got there, you might say its 'assuming' they got there.
With servos or closed loop steppers they can signal a Following Error fault if they do not get to the commanded location....so Mach has some justification in assuming that all is well.

When this fault occurs do the DROs reflect the actual movement or do they reflect the programmed movement? If the DROs reflect the actual movement then the programmed
movement is getting screwed up in Mach at the trajectory phase. If the DROs reflect the programmed or commanded movement then the motion controller is issuing way too many
Step pulse for a given distance.

Just as a matter of interest you don't have a G51 active do you? Just try canceling any scaling with a G50.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach3 multipies movement after loading program
« Reply #5 on: March 05, 2023, 07:11:23 PM »
  Thanks Craig, I got it figured out.  I have created two other machine profiles on this same copy of Mach 3 and did not have a problem.  For some reason Mach decided to default to mm in the native units menu.  That thought had crossed my mind but the settings screen indicated inch mode so I did not think to check the native units setting right away.  I still can't figure out why on boot up that the pendants/pulse generator worked as expected but I guess, all is well that ends well.
  Your thoughts are much appreciated.
Ed