Hello Guest it is March 29, 2024, 09:59:41 AM

Author Topic: Losing steps or something?  (Read 53895 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Losing steps or something?
« Reply #100 on: November 04, 2010, 04:43:18 AM »
Corrected version - got interrupted for dinner...

Hi Dan

I would like to note that it is not as easy as it may look trying to capture the timing between the step and direction signals using a plain scope. Thing is there is also the motor acceleration factor and the step pulse stream is not going to be constant frequency. One could probably try a very slow speed and VERY small acceleration and even then it's not going to be easy.

True, true, but I think the arrangement I have described should work.

First of all, the CRO will trigger off the Dir transition in one direction only. That's the nature of CRO triggering, especially with something as simple as a BK Precision.
What will be seen on the CRO when it triggers off the Dir transition will be the Step pulses as they ramp up in speed, so their spacing will of course vary.
But if the machine is set to do 100 cycles back and forth, each cycle will be the same. So it should be possible to see the pulses on the screen. If 100 is not enough, try 200 ...

Cheers
Re: Losing steps or something?
« Reply #101 on: November 04, 2010, 05:33:03 AM »
Land of the strange anomalies, here.  I hooked up the O'scope.  It works.  I think.  First the program I am running that gives me enough time to observe the traces.  I found that slowing the feedrate too much gives either to short blips instead of pulses, or trace scans that are very hard to watch...
Program: F10
G20G90
M98P1234L100
M30
O1234
G1X1.0
G1X0.
M99

Scope settings:  Channel 1 hooked to pin 2  (step) Lower Trace in Pictures.    Channel 2 is hooked to pin 3 (Dir) upper trace in pictures.
External trigger is hooked on the Dir pin.  Coupling is DC for all.  Amplitude is set to 1 Volt per division for both channels, Triggering is set Ext., DC, Auto level, Normal mode.

First observation was that the upper trace is only showing a 1 volt signal...  lower trace is showing 3 volts.  That is unusual.  Both signals are set to Low Active in the motor outputs
The first 2 pictures show going out, and going back .1mS per division time.
Re: Losing steps or something?
« Reply #102 on: November 04, 2010, 05:46:08 AM »
Continued,  The next pair of screen shots is time base set to 5uS/div.  Starts out with Direction pulses- oh, yeah - Pulses, not steady state.???  Is this a clue?  Step pulse is delayed about 2-3 uS on rise from Dir pulse.  Both fall together. 

I changed the Dir in Motor Tuning from 0 to 5uS and the delay changed to 5uS - a full division on the scope.  Both still fall together.
Changed Dir to 0 and Step to 5uS and step is delayed 2-3 us from Dir.
I didn't take pics of those traces.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Losing steps or something?
« Reply #103 on: November 04, 2010, 06:02:27 AM »
img-0815:  HUH???????
NO WAY!!!!!!!!
I do not know what is going on here, but no way should you get anything like that trace! It seems to show that the DIR line is pulsing in sync with the Step line. I have not put a CRO on my system, but I will stick my neck out and say this should NOT be happening! Dir is meant to be a 'static' state.
Second, and related: 1 v pulses? Something very faulty here.

Question: is this a bare PP output, or is there anything hanging off it?
Comment: either way, something has one (I hope just one) big internal fault. Either you have the wrong lines, or the PP has a major defect, or whatever is connected to the PP has a major defect. I just cannot believe Mach would pulse the Dir line like that. Far too much potential for disaster.

Quote
Step pulse is delayed about 2-3 uS on rise from Dir pulse.  Both fall together. 
Well, the step pulse making its rising transition a little time after the Dir pulse is right, but everything else is way wrong.

Positive news: you now have the means to properly investigate what is going on. With this gear you should be able to crack the bug.
Negative news: you have a fault somewhere ... but you knew that anyhow.
Also, I will be off the air for a week+ from Saturday. Sorry about that. Give you time to really explore combinations.

Cheers


Re: Losing steps or something?
« Reply #104 on: November 04, 2010, 06:13:42 AM »
Hi, Roger, Have a nice vacation.  Yeah, I couldn't believe it either.  Something seems very wrong.
All that is attached to the parallel port is my cheater cable to which I have hooked the probe leads to the outer end.  Nothing else.  The 1V pulses concern me too.  I even swapped channels, then cables, to verify it was NOT coming from the testleads or Scope.  I'm going to drag out the other computer and hook up the scope to see if it exhbits similar behavior.  Also, I have recieved another PCI parallel port card from Ebay, I might install in the current computer.  Might be interesting to see what voltages it puts out.  I'll try to keep things orderly, and take notes so you can see when you get back.  Thankyou for the help.  At least we are finding something.

Don
« Last Edit: November 04, 2010, 06:20:17 AM by cncnovice2 »
Re: Losing steps or something?
« Reply #105 on: November 04, 2010, 06:18:39 AM »
By the way.  From the Geckodrive manual,  Minimum logic "0" time is 0.5 uS while the minimum logic "1" time is 4.5 uS.  Microstepping occurs on the falling edge of the step input.
Step pulse "0" time:  .5uS min.
Step pulse "1" time:  4.0uS min.
Direction Setup:  1uS min.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Losing steps or something?
« Reply #106 on: November 04, 2010, 04:13:16 PM »
All that is attached to the parallel port is my cheater cable to which I have hooked the probe leads to the outer end.  Nothing else.  The 1V pulses concern me too.
I had better point out something you definitely need to test here. If the output PP is completely unloaded you can get fake signals on floating lines through capacitive coupling. The 1 V signal may be due to a broken connection somewhere at the PP output. You should check this by loading the whole cable - say with a BoB. If the 1 V signal disappears or changes much when the cable is loaded then try another cable! Or, as you suggest, another computer, or another parallel port card. That Dir signal is definitely wrong.

Quote
Step pulse "0" time:  .5uS min.
Step pulse "1" time:  4.0uS min.
Direction Setup:  1uS min.
The last line is the key one. The Dir line must finish changing state at least 1 uS before the Step line starts to change state.

Cheers
Roger

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Losing steps or something?
« Reply #107 on: November 05, 2010, 02:33:11 AM »
Yes, those pulses ARE strange. The direction line is a state and shouldn't be pulsing! The way it looks I am amazed your motors were rotating anyway... Are you sure the scope is set up correctly?

Dan
Re: Losing steps or something?
« Reply #108 on: November 05, 2010, 04:14:18 AM »
Hi, I'm pretty sure the scope is set up correctly.  I swapped the leads and channels to verify this.  I will check on Roger's suggestion of loading the port and seeing if the voltages and signals change.  It would be interesting to see if a problem is in the PP.  The dir pulse is changing a couple of uS before the step rises, but they fall together.  Thus the direction pulse is still "setup" when the step pulse falls.  It should work this way, but I would be worried about stray induced steps getting into other lines, or something.  Hmmm.  Maybe that is part of my problem...  Thanks.
Don
Re: Losing steps or something?
« Reply #109 on: November 07, 2010, 10:38:07 PM »
I recalled that the PMDX BOB has a demo mode...  It moves the X axis 1024 steps, then moves the Y axis 1024 steps, then moves the X axis back 1024 steps, then moves the Y axis 1024 steps back.  Then is continues this cycle until the start button is depressed again.  It occurred to me that if I started with the Dials on 0.000, then I could see if the Drives and Motors were repeating.  The demo mode runs at 100 pulses per second, slowly but with no ramping/acceleration.  After running this program for about 2 hours, it had not offset at all.  Thus I believe the Geckos and their associated wiring are working correctly. 
   I wrote a dwell into the program.  It now has a line that reads G4P1 before each G1 line.  Running the machine from the computer, I discovered that There was no offsetting behavior until I set the acceleration to 0.5.  The I got -.010 offset in 100 iterations.  Any faster acceleration up to 10 was fine.  I didn't try any faster acc. Rates.  I swapped the outputs in Motor Outputs and swapped the wires at the BOB output.  Results are the same.
   I disconnected the BOB and hooked up my cheater cable, this time I terminated the leads to common with 4.7k resistors.  The O'scope looks pretty much the same.  Pin #3 is putting out 1V signals and pin #2 is putting out 3V signals.  I changed the dwell to 3 seconds at each end of the run in the program so I would have plenty of time to see what is happening.  Hmm. Weird stuff again.  The trigger is set to the step signal, otherwise the scope just stares at you on the return direction.  I'll post a couple of pictures.  The timing between the direction and step pulses is varying during the move!  It often starts out with one timing orientation and then just changes...  Also, On the way back, where there is no Direction signal, I've noticed a “twitch” just before the end of the move.  It seems to be a little early for it to be related to the deceleration, but it occurs only on the way back. 
   The upper trace is the step signal, lower trace is the direction signal.  Note that the 1st and 3rd steps seem to be simultaneous  with the direction pulses but the 2nd and 4th are leading or lagging.  The step traces are not moving on the screen, the Direction pulses are moving earlier and later.  Photos are on next post due to the forum software not cooperating...
???
Don
« Last Edit: November 07, 2010, 10:43:04 PM by cncnovice2 »