Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fristot on March 02, 2015, 05:09:20 AM

Title: Master vs Slave axis pulsing difference on Mach3
Post by: fristot on March 02, 2015, 05:09:20 AM
Hello,
I am working on a very large 3D printer using Mach3 and smoothstepper. The B axis is slaved to X and C axis slaved to Y. Because we see little unexplained waves on printed part surface, I designed a recorder with a microcontroller and interrupts  to calculate the theoretical axes positions from the step/dir outputs of the smoothstepper. I record these positions every 2 milliseconds. So I just use the PC+smoothstepper+recorder, no noise, clean pulses.
During the tests, I expected  the master and slave axes to receive the very same pulses, but to my surprise, there are errors. Attached is a graph of the master axis position (in Pulses) and the Positionning error (in Pulses) compared with its slave axis. The experience can be reproduced with the same behavior; Up to around 20 pulses difference !  This may sound low, but we have low step per unit (160 per mm). Our parts surface is textured with low amplitude sinewaves (around 0.2mm peak-peak, not due to mecanichal noise, as these waves have precise and reproducible positions), but still visually unpleasant..
Did anybody realize there was a master/slave difference, and how could this be improved ?

Pierre.
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: BR549 on March 02, 2015, 11:59:20 AM
That would be a Smoothstepper issue not Mach3. You may want to contact Greg over at Warp9.

(;-) TP
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: fristot on March 03, 2015, 08:23:16 AM
Hi, thanks !
 I contacted Greg and he will have a look at the issue. In the meantime, I replicated the experiment using Mach3 + parallel port. And it appears that there is also a noticable difference. Attached pic.
Does anybody have a plugin to record the trajectoryBuffer of Mach3 directly ? I'd like to check if the trajectories are also different. I suppose so. But why ?
Thks in advance,
Pierre
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: stirling on March 03, 2015, 01:46:20 PM
Hi Pierre

I'm not seeing this here. I'm monitoring my 25kHz PP kernel on a logic analyser at a sample rate of 24MHz i.e. resolving to approx 42 ns (nanoseconds) and slave pulsing on B & C is absolutely identical to X and Y.

There is ONE artefact: after a direction change the first slave pulse lags the master pulse by approx 40us (microseconds). Second and subsequent pulses though are exactly synchronized (within my 42ns resolution anyway).

Ian
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: ger21 on March 03, 2015, 06:32:56 PM
But he's using the Smoothstepper, and the SS generates the pulses, not Mach3. Correct?
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: Hood on March 04, 2015, 03:36:14 AM
Ger, fristot said he also tried with the PP and got similar results.
I am wondering if it could be a V066 issue, might as well have another thing that is screwed up in that version ;)

Hood
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: fristot on March 04, 2015, 03:44:54 AM
Hello,
I used the smoothstepper for the first test, and parallel port 25kHz kernel for the second. Both tests on the same Laptop (X31). Mach3 R3.043.066
Interesting to see that Stirling is not seing this. I don't have a logic analyser but I am pretty confident about my test setup, and it makes good sense since the master and slave positions always end to the same value when motors stop.
Maybe there is something special when nearing the 25kHz kernel limits (9000mm/min with 160step per) ?
I will do some more tests.
Pierre
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: stirling on March 04, 2015, 05:07:47 AM
Just loaded up R3.043.066 and tried again with steps/per at 160 and running flat out at 9433 mm/min. (Kernel is actually pulsing at 25.1572 kHz at that speed). Pulses are spot on.

Can you describe your recorder in more detail because I find it curious that two pulsing engines (SS and PP) are apparently giving you the same strange results.

Ian

Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: Hood on March 04, 2015, 05:38:05 AM
That is a shame Ian, would have loved another reason to beat Brian over the head with regarding V066 :D

Hood
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: Overloaded on March 04, 2015, 05:39:24 AM
Is either .. or both of you using "Enhanced Pulsing" in Config. ?
Just a shot.
Russ
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: fristot on March 04, 2015, 05:42:20 AM
Oups! you are right Ian: Mach3 is fine, and my recorder is wrong.
Reading again my code, I found I forgot to latch my positions counters (the ones that get incremented or decremented on PIN interrupts) before using them. As a result, by the time I output these to the serial port, they were altered by the interrupts.
Now I corrected the code, and everything is fine on both the parallel port and smoothstepper (just one pulse off on rare occasions, which is what one would expect).
I am very sorry about raising this false issue. I was too happy to find a beginning of solution for my still unexplained little wave patterns on the parts printed by the machine..

I will edit my first post, or maybe if a moderator is listening there, it might be better to just remove this all thread ?

Pierre
well, it seems I cannot edit my first post...

Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: stirling on March 04, 2015, 06:04:11 AM
That is a shame Ian, would have loved another reason to beat Brian over the head with regarding V066 :D

Can you not just beat him anyway?  >:D

Pierre - no worries - thanks for the update and hope you find the reason for your waves.
Title: Re: Master vs Slave axis pulsing difference on Mach3
Post by: Hood on March 04, 2015, 06:17:34 AM
 I do Ian, at every opportunity I get. Sadly it makes little difference though.

Hood