Hello
The EPP Standard should be able to drive 2 Megabytes/s, so 2 MHz should be the 
limit, 200KHz ?

The Problem in our case is not the pure Baudrate. It is the Operating System. 
My DOS Programs were totally running alone under DOS, nothing disturbed them.
In modern Computers, a lot of devices produce Interrupts which are not 
interruptable. The Interrupt Latency of such systems with 10-50µs is a joke. 
But it does not help to complain about this, they are not designed for 
realtime. So far i understand, the only way is to disable these Interrupts. But 
then we would have a DOS-Machine again, without Grafics and so on. 
The Problem is, that the latency on most cheap computers is above 30µs, meaning 
the Base Period is about 40µs. Lets assume it is 50µs, so it is easier to 
calculate an example:
Every 50µs an interrupt is created with a latency jitter of 25µs. 50µs 
corresponds to 20KHz, a value most driver HW accepts, especially if it supports 
Microstepping. So the maximum Step Frequency is 20000/s.
This Frequency jitters with 50% , meaning the Frequency can change from 13333/s 
to 40000/s from one step to another. Lets assume, the machine makes 1000 Steps 
per mm. The Max Velocity would be 20mm/s in average. What is the Max 
Acceleration forced by the jitter? The first step comes with 0 Latency, the 
second step comes with 25µs Latency, the third Step comes with 0 Latency again. 
So the Timing could be 50µs,...,75µs, 25µs,... 50µs..... 
In this situation an optimized machine tends to loose steps. The Problem can be 
eliminated with oversized Motors and Drivers and Microstepping can smooth the 
Jitter. But the Max Performance is not met.
So my suggestion: Program a hybrid of Interrupts and Polling. 
Calculate the exact optimal absolute Time point for every Output Step for 
individual axis. 
Sort the Time points of all axis.
Decide if it makes sense to have an Interrupt between two Steps depending on 
simple Delta-Time.
Program the Interrupt Timer with the desired next Output Time point minus the 
maximum Latency.
Poll the HW-Timer until the Output Time point is reached and Fire the Parport.
Poll the HW Timer if next Output Time Point is near, otherwise return and wait 
for next Interrupt.

I am not shure, if something like this is implemented already, but i fear it is 
not.
Maybe, someone gives me a hint on the operating System and the way, the 
HW-Timers are used.
Thanks from
Andreas


Date: Sun, 1 Mar 2009 08:33:57 +0100
From: "Mario." <[email protected]>

I have the ultimate goal of reaching 2 milion quadrature output
changes per second from any of the outputs, even 200 thousand per
second is almost good for me.
How does your method help me get to the intended goal? I'm talking
about parallel port of course.

On Sat, Feb 28, 2009 at 10:09 PM, Andreas Strecker <[email protected]> wrote:
> Dear Developers
> I am new to your Mailing List and want to introduce myself: I live in
> Germany, studied applied Engineering of Mechatronics some years ago and i am
> fascinated?of CNC Stepper Software.
> The first SW i used was written in TurboPascal, using DOS, the code came
> along with the SMC1500 from Conrad Electronics.
> I programmed new functions and made my own special Program to build forms
> and cores for Modelist Airplanes Wings. For this, i built a machine together
> with good friend.
> From the beginning, i had the feeling, that there was something wrong with
> the original code and the principles of generating steps. It took me some
> years to find out, that the way of generating 3D-Steps was suboptimal.
> The original SW was?calculating steps in a way like Grafics SW. It just
> created a loop with the periodicity of the fastet axis and the other two
> axis were dependent on this. If i tried to optimize the parameters Maximum
> Velocity and Acceleration for only one axis acting alone, i could get very
> good results, reaching the maximum step frequency delivered by the SMC1500.
> But if i tried to mill with these parameters using arbitrary 3D-Vectors, it
> lost steps massively. Even reducing the Maximum Velocity to one fourth never
> worked out perfectly. The effectiveness was bad, it took 8 hours and more to
> build one form.
> But: There was solution. I found out, that taking the fastest axis to create
> the periodicity was the wrong way. I reprogrammed the whole kernel so the
> Time Slice was dependent on the real velocity of the tool and was kept at
> constant speed. Additionally, i?accurately calculated the period for every
> single axis and divided the Time Slice. So, the frequency of every single
> axis output (not only the fastest) was kept constant. This lead to success.
> I preprocessed the complete files, where the Input was absolute Coordinates,
> i calculated the angles between two vectors, deriving the maximum
> acceleration and from that the Maximum Velocity between two Vectors. The
> Output was the Parallelport Byte Output and a Delay to the next step. The
> whole Output Stream was saved in a file and this was executed
> afterwards.?This ran on a 33MHz 486 with very good results.
> After i heard about EMC, i studied the principles. But again, i found the
> Drawbacks of a fixed Interrupt Frequency: It produces lots of Overhead in
> Runtime and still does not meet the Requirements of a fixed Frequency fo
> every axis. This Drawback is eliminated by good Hardware and a lean
> Operating System. But on the other hand, it could produce even better
> results, if the next step timing and Output Byte?would be calculated, the
> Interrupt Compare Value would be written with some reserve (Latency), and
> after the ISR is running it would poll for the Hardwaretimer until the real
> compare value shows up and?write the Output Pattern. Of course, there would
> have to be a routine, which calculates, if it makes sense to set up a new
> Interrupt or just to poll the Timer.
> The Advantages:
> At low speed, the ISR load is significantly lower.
> At high speed, the ISR load is still lower, but the Runtime of the ISR is
> proportional to the Latency Jitter.
>
> With fixed Interrupt Frequency?the maximum stable Output frequency is much
> lower.
> Feel free to bash me.
> Andreas

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to