Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread John Kasunich


On Fri, Mar 18, 2016, at 05:18 PM, Nicklas Karlsson wrote:
> 
> Stepper motor magnets induce a voltage proportional to speed which limit 
> maximum speed.
> Torque is about the same regardless of speed and there are some intertia.
> 

Torque is not even remotely the same regardless of speed.
Above a certain base speed (usually well below max speed), a stepper
motor is more constant-power than constant-torque, so the torque
drops off inversely with the speed.

The actual shape of the torque-speed curve is complex and depends
on motor characteristics, drive characteristics, and supply voltage.

For some examples, see
http://www.orientalmotor.com/technology/articles/article-speed-torque-curves-for-step-motors.html

Regards,

John Kasunich

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread Gene Heskett
On Friday 18 March 2016 16:00:27 Nicklas Karlsson wrote:

> I have seen and run machinekit, it is linuxcnc. I have also read about
> BeagleBone. There are plenty of devices suitable to generate the
> pulses but at which rate should pulses generated? Constant
> acceleration between different speeds?

Ideally, the accel (and decel) should be  t=rc curve or close, because at 
the higher speeds, the motors torque is falling like a rock so the accel 
ability is less and less as it speeds up. On slowdown the curve should 
be reversed left for right because the motors torque is increasing as it 
slows, so you can slow it even faster.

But I believe the huge majority of our controllers use pretty close to a 
straight line ramp going either direction. If thats not the case, 
someone please correct me.

Which said another way, speed vs acceleration is a tradeoff. I can 
usually double the rapids achieved, but its at the cost of slower 
acceleration, so one has to establish what you consider a reasonable 
response time to get to the commanded speed. Too slow accels and it 
never reaches the commanded speed so the execution is slowed even if the 
rapids are quicker than stink.

> On Fri, 18 Mar 2016 12:50:21 -0700
>
> "John Dammeyer"  wrote:
> > You might look at the Replicape and a BeagleBone Black.   There are
> > several other capes including one with a standard DB-25 parallel
> > port that run LinuxCNC on the Beagle.   Search for MachineKit.
> >
> > John
> >
> > > -Original Message-
> > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > Sent: March-18-16 12:27 PM
> > > To: Enhanced Machine Controller (EMC)
> > > Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> > >
> > >
> > > Nice box and standard port is always good, I should think about
> > > it.
> >
> > Steppers
> >
> > > are for an xyz engraver so it is essentially a mini CNC machine
> > > without
> >
> > tool
> >
> > > changer.
> > >
> > >
> > >
> > > On Fri, 18 Mar 2016 12:00:55 -0700
> > >
> > > "John Dammeyer"  wrote:
> > > > You are welcome to look at my Electronic Lead Screw Code. 
> > > > Follow the
> > >
> > > link
> > >
> > > > to the code.  It's written for a PIC in C.
> > > > John
> > > >
> > > >
> > > > "ELS! Nothing else works as well for your Lathe"
> > > > Automation Artisans Inc.
> > > > http://www.autoartisans.com/ELS/
> > > > Ph. 1 250 544 4950
> > > >
> > > > > -Original Message-
> > > > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > > > Sent: March-18-16 11:46 AM
> > > > > To: emc-users@lists.sourceforge.net
> > > > > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > > > >
> > > > >
> > > > > I am planning to use a micro controller for stepper step pulse
> >
> > generation.
> >
> > > > I
> > > >
> > > > > have considered to use an inverter card but special purpose
> > > > > stepper
> > > >
> > > > circuits
> > > >
> > > > > are cheap so I use one of these instead. It should be possible
> > > > > to feed
> > > >
> > > > timer
> > > >
> > > > > values then toggle should happen via DMA timer output compare
> > > > > values.
> > > > >
> > > > > Can anyone suggest how an ideal step generation curve should
> > > > > look? Constant acceleration up to top speed? Constant
> > > > > deceleration from top speed to zero? Or just stop generating
> > > > > pulses?
> > > > >
> > > > > Regards Nicklas Karlsson
> >
> > 
> >
> >
> > > > --
> > > >
> > > > > Transform Data into Opportunity.
> > > > > Accelerate data analysis in your applications with
> > > > > Intel Data Analytics Acceleration Library.
> > > > > Click to learn more.
> > > > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/41
> > > > >40 ___
> > > > > Emc-users mailing list
> > > > > Emc-users@lists.sourceforge.net
> > > > > 

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread andy pugh
On 18 March 2016 at 22:21, John Kasunich  wrote:
> The actual shape of the torque-speed curve is complex and depends
> on motor characteristics, drive characteristics, and supply voltage.

I used to design micropower motor testing dynos. I ought to build
myself one and create a series of graphs to show the effects of (for
example) microstepping and supply voltage where there is some
confusion out there.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread John Dammeyer

> I have seen and run machinekit, it is linuxcnc. I have also read about
> BeagleBone. There are plenty of devices suitable to generate the pulses
but
> at which rate should pulses generated? Constant acceleration between
> different speeds?

Your questions can't be answered in simple emails.  If you decide you want
to "roll your own" be prepared to spend a lot of time creating the tool as
opposed to buying the tool and spending time using it.

If you're ready to write software to make motors move then you're also ready
to take a Beagle and the MachineKit LinuxCNC source and make it do what you
want for less money than buying a couple of stepper drivers and connecting
to something.

If you have experience with Arduino then buy a 3D printer board and tear
into the Replicape software.  They have everything you need if you want to
re-invent the wheel rather than ride on the wagon.

John Dammeyer



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread Nicklas Karlsson
> > I have seen and run machinekit, it is linuxcnc. I have also read about
> > BeagleBone. There are plenty of devices suitable to generate the pulses
> but
> > at which rate should pulses generated? Constant acceleration between
> > different speeds?
> 
> ...
> 
> If you're ready to write software to make motors move then you're also ready
> to take a Beagle and the MachineKit LinuxCNC source and make it do what you
> want for less money than buying a couple of stepper drivers and connecting
> to something.

I bought a few DRV8824 drivers for a few dollars each and designed a small 
circuit board for maybe $10-$15, now I need to figure out how to ideally toggle 
the step pin.

I do not think the beagle have builtin stepper drivers, as far as I now it is 
more or less an ordinary computer, I already have both machinekit/linuxcnc on 
my computer but maybe I use the beagle bone later then I need something more 
handy.


Regards Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-18 Thread Philipp Burch
Hi Nicklas,

it should be fine to keep the step rate (velocity) constant between
updates from the trajectory planner, assuming that it runs at something
like 1kHz and the machine is not highly dynamic. Limiting velocity and
acceleration in the step generator should generally not hurt and avoids
stalled motors in case there is a step in the position command (which
should not happen with LinuxCNC unless you mess around with the signals
in HAL).

If you want to implement smooth point-to-point positioning, you could
consider some kind of jerk limiting, e.g. by using quadratic or cubic
velocity profiles (giving linear or quadratic acceleration). Or use a
sinusoidal profile, but trigo functions are computationally rather
expensive.

Regards,
Philipp

On 18.03.2016 21:15, Nicklas Karlsson wrote:
> It could be a good option so I do not need to have a large computer for a 
> small machine. As is know it is more a question about how to ideally 
> increases/decrease step rate for a stepper motor?
> 
> 
> 
> On Fri, 18 Mar 2016 16:05:31 -0400
> John Alexander Stewart  wrote:
> 
>> Just FYI - about a year ago or so I purchased from Jeff @xylotex a BBBlack
>> and DB-25 cape - ran my Unimat SL CNC'd lathe just fine (feeding a spare
>> Gecko G540, 2 axes of which were unused)
>>
>> BBBoard from Xylotex came with LinuxCNC Machinekit on a little SDCard. An
>> out of the box solution.
>>
>>
>>
>> On Fri, Mar 18, 2016 at 3:50 PM, John Dammeyer 
>> wrote:
>>
>>> You might look at the Replicape and a BeagleBone Black.   There are several
>>> other capes including one with a standard DB-25 parallel port that run
>>> LinuxCNC on the Beagle.   Search for MachineKit.
>>>
>>> John
>>>
>>>> -Original Message-
>>>> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
>>>> Sent: March-18-16 12:27 PM
>>>> To: Enhanced Machine Controller (EMC)
>>>> Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
>>>>
>>>>
>>>> Nice box and standard port is always good, I should think about it.
>>> Steppers
>>>> are for an xyz engraver so it is essentially a mini CNC machine without
>>> tool
>>>> changer.
>>>>
>>>>
>>>>
>>>> On Fri, 18 Mar 2016 12:00:55 -0700
>>>> "John Dammeyer"  wrote:
>>>>
>>>>> You are welcome to look at my Electronic Lead Screw Code.  Follow the
>>>> link
>>>>> to the code.  It's written for a PIC in C.
>>>>> John
>>>>>
>>>>>
>>>>> "ELS! Nothing else works as well for your Lathe"
>>>>> Automation Artisans Inc.
>>>>> http://www.autoartisans.com/ELS/
>>>>> Ph. 1 250 544 4950
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> -Original Message-
>>>>>> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
>>>>>> Sent: March-18-16 11:46 AM
>>>>>> To: emc-users@lists.sourceforge.net
>>>>>> Subject: [Emc-users] Stepper, ideal pulses without feedback
>>>>>>
>>>>>>
>>>>>> I am planning to use a micro controller for stepper step pulse
>>> generation.
>>>>> I
>>>>>> have considered to use an inverter card but special purpose stepper
>>>>> circuits
>>>>>> are cheap so I use one of these instead. It should be possible to
>>> feed
>>>>> timer
>>>>>> values then toggle should happen via DMA timer output compare values.
>>>>>>
>>>>>> Can anyone suggest how an ideal step generation curve should look?
>>>>>> Constant acceleration up to top speed? Constant deceleration from top
>>>>>> speed to zero? Or just stop generating pulses?
>>>>>>
>>>>>> Regards Nicklas Karlsson
>>>>>>
>>>>>>
>>>>>
>>>
>>> 
>>>>> --
>>>>>> Transform Data into Opportunity.
>>>>>> Accelerate data analysis in your applications with
>>>>>> Intel Data Analytics Acceleration Library.
>>>>>> Click to learn more.
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
>>>>>> ___

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread John Dammeyer
You might look at the Replicape and a BeagleBone Black.   There are several
other capes including one with a standard DB-25 parallel port that run
LinuxCNC on the Beagle.   Search for MachineKit.

John

> -Original Message-
> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> Sent: March-18-16 12:27 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> 
> 
> Nice box and standard port is always good, I should think about it.
Steppers
> are for an xyz engraver so it is essentially a mini CNC machine without
tool
> changer.
> 
> 
> 
> On Fri, 18 Mar 2016 12:00:55 -0700
> "John Dammeyer"  wrote:
> 
> > You are welcome to look at my Electronic Lead Screw Code.  Follow the
> link
> > to the code.  It's written for a PIC in C.
> > John
> >
> >
> > "ELS! Nothing else works as well for your Lathe"
> > Automation Artisans Inc.
> > http://www.autoartisans.com/ELS/
> > Ph. 1 250 544 4950
> >
> >
> >
> >
> > > -Original Message-
> > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > Sent: March-18-16 11:46 AM
> > > To: emc-users@lists.sourceforge.net
> > > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > >
> > >
> > > I am planning to use a micro controller for stepper step pulse
generation.
> > I
> > > have considered to use an inverter card but special purpose stepper
> > circuits
> > > are cheap so I use one of these instead. It should be possible to feed
> > timer
> > > values then toggle should happen via DMA timer output compare values.
> > >
> > > Can anyone suggest how an ideal step generation curve should look?
> > > Constant acceleration up to top speed? Constant deceleration from top
> > > speed to zero? Or just stop generating pulses?
> > >
> > > Regards Nicklas Karlsson
> > >
> > >
> >

> > --
> > > Transform Data into Opportunity.
> > > Accelerate data analysis in your applications with
> > > Intel Data Analytics Acceleration Library.
> > > Click to learn more.
> > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> >

--
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
>

--
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
> On Friday 18 March 2016 16:00:27 Nicklas Karlsson wrote:
> 
> > I have seen and run machinekit, it is linuxcnc. I have also read about
> > BeagleBone. There are plenty of devices suitable to generate the
> > pulses but at which rate should pulses generated? Constant
> > acceleration between different speeds?
> 
> Ideally, the accel (and decel) should be  t=rc curve or close, ...

No, t=rc is for the current/torque rise/fall time. For the speed it is rather 
basic physics. Flux is needed to generate torque. Induced voltage depend on 
speed of flux change so for higher speed more voltage is induced. It is 
possible to increase speed by lowering flux but in such case maximum torque 
will sink.

Anyway as is now for a stepper I will use fast acceleration in one direction 
and slow in the other => then they line up no steps are lost at maximum 
acceleration.


Regards Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
> > I have seen and run machinekit, it is linuxcnc. I have also read about
> > BeagleBone. There are plenty of devices suitable to generate the
> > pulses but at which rate should pulses generated? Constant
> > acceleration between different speeds?
> 
> Ideally, the accel (and decel) should be  t=rc curve or close, because at 
> the higher speeds, the motors torque is falling like a rock so the accel 
> ability is less and less as it speeds up. On slowdown the curve should 
> be reversed left for right because the motors torque is increasing as it 
> slows, so you can slow it even faster.

I think constant torque then if in flux weaking region constant power is an 
appropriate model for the motor.

> But I believe the huge majority of our controllers use pretty close to a 
> straight line ramp going either direction. If thats not the case, 
> someone please correct me.

Yes straight line: maximum velocity and maximum acceleration.

> Which said another way, speed vs acceleration is a tradeoff. I can 
> usually double the rapids achieved, but its at the cost of slower 
> acceleration, ...

If in flux weakening region I Agree. I however think most drives are used in 
constant torque region and then current model is accurate.

I however think most electrical motors are possible to overload for a short 
while. Then is the complexity for not simle kinematics.


Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread John Dammeyer
You are welcome to look at my Electronic Lead Screw Code.  Follow the link
to the code.  It's written for a PIC in C.
John


"ELS! Nothing else works as well for your Lathe"
Automation Artisans Inc.
http://www.autoartisans.com/ELS/
Ph. 1 250 544 4950




> -Original Message-
> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> Sent: March-18-16 11:46 AM
> To: emc-users@lists.sourceforge.net
> Subject: [Emc-users] Stepper, ideal pulses without feedback
> 
> 
> I am planning to use a micro controller for stepper step pulse generation.
I
> have considered to use an inverter card but special purpose stepper
circuits
> are cheap so I use one of these instead. It should be possible to feed
timer
> values then toggle should happen via DMA timer output compare values.
> 
> Can anyone suggest how an ideal step generation curve should look?
> Constant acceleration up to top speed? Constant deceleration from top
> speed to zero? Or just stop generating pulses?
> 
> Regards Nicklas Karlsson
> 
>

--
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Ken Johnson
Nicklas, when I built a pcb drilling machine some years ago, I found
constant acceleration and deceleration to top speed worked best, as
for the most part trying to go instantly to the maximum speed the
motors are capable of results in lost steps.
You will need a bit of experimentation to determine the rate and
length of both acceleration ramps as it will depend on the mass of
your machine and the motors and power supply you are using.

Ken.

On Sat, Mar 19, 2016 at 5:46 AM, Nicklas Karlsson
 wrote:
> I am planning to use a micro controller for stepper step pulse generation. I 
> have considered to use an inverter card but special purpose stepper circuits 
> are cheap so I use one of these instead. It should be possible to feed timer 
> values then toggle should happen via DMA timer output compare values.
>
> Can anyone suggest how an ideal step generation curve should look? Constant 
> acceleration up to top speed? Constant deceleration from top speed to zero? 
> Or just stop generating pulses?
>
> Regards Nicklas Karlsson
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
Nice box and standard port is always good, I should think about it. Steppers 
are for an xyz engraver so it is essentially a mini CNC machine without tool 
changer.



On Fri, 18 Mar 2016 12:00:55 -0700
"John Dammeyer"  wrote:

> You are welcome to look at my Electronic Lead Screw Code.  Follow the link
> to the code.  It's written for a PIC in C.
> John
> 
> 
> "ELS! Nothing else works as well for your Lathe"
> Automation Artisans Inc.
> http://www.autoartisans.com/ELS/
> Ph. 1 250 544 4950
> 
> 
> 
> 
> > -Original Message-
> > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > Sent: March-18-16 11:46 AM
> > To: emc-users@lists.sourceforge.net
> > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > 
> > 
> > I am planning to use a micro controller for stepper step pulse generation.
> I
> > have considered to use an inverter card but special purpose stepper
> circuits
> > are cheap so I use one of these instead. It should be possible to feed
> timer
> > values then toggle should happen via DMA timer output compare values.
> > 
> > Can anyone suggest how an ideal step generation curve should look?
> > Constant acceleration up to top speed? Constant deceleration from top
> > speed to zero? Or just stop generating pulses?
> > 
> > Regards Nicklas Karlsson
> > 
> >
> 
> --
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Chris Albertson
On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> I am planning to use a micro controller for stepper step pulse generation.
> I have considered to use an inverter card but special purpose stepper
> circuits are cheap so I use one of these instead. It should be possible to
> feed timer values then toggle should happen via DMA timer output compare
> values.
>
> Can anyone suggest how an ideal step generation curve should look?
> Constant acceleration up to top speed? Constant deceleration from top speed
> to zero? Or just stop generating pulses?
>

So you are NOT using LinuxCNC.  You are planning to roll your own?

I've done this a few times.  My purpose for using CNC is robotics and these
robots use motors of various type and move not unlike CNC machines.  All of
these motors I always control using some microprocessor.  (ARM or AVR)

Generally the pulse rate generator is at the lowest "layer" of abstraction
in your software and gets requests from some high layers to do things like
move at some rate to some location.  Your software has to try to do what it
is requested but subject to physical properties of the motor and mechanical
system.  You have to program this in.  Likely maximum acceleration is a
function of current speed.  Likely the range of position is limited and so
on.  Some requests might have speed or acceleration limits embedded in them

After this there is one more important thing that really is done my some
layer above the pulse generator and that is planning.  Say you are going to
make a U-turn (reverse a motor direction) you might need to slow down
before.  This is called "planning" and it's always hard and with robots who
work in a changing environment maybe not possible.   But if you are
interpreting G-Code you can always just read ahead.

Ok there is one case where the pulse generator CAN and should do some
planning.  If it gets a request to "move to location X"  it should
accelerate to maximum speed, move for some time then DECELERATE and stop at
"X" using other max

There are some cases where the pulse generator MUST work with more then one
motor at the same time.  What if the request is to "move in a circle"  or
if doing threading on a lathe to move the spindle and leadscrew in
"lock-step".  In my case I want to move a caterpillar-tread robot along an
arc of given radios so that it passes through the center of a doorway.
The limiting factor is the performance of the "outside" tread motor.  In
general what running multiple motors one of then will hit a performance
limit first and the others need to have their accelerations limited.

The easiest thing for you to do is use software that others have written
and get it to work some how on the platform your choose (An ARM based SBC
like the beagle bored or "Pi")   For CNC work LinucCNC already does what
you need and for robotics look up "ROS".  Both of these can run on a
computer the size of a credit card.



Now getting to your specific question of wetter to use constant
acceleration (linearly increasing speed) or some kind of curve.  The above
should have answered this.  The pulse generator will try for maximum
performance which is constant acceleration but may run into physical
limitation of the motor and mechanics where available torque is a function
of speed and this will cause acceleration if tapper off.   On the other
hand if the request has an embedded limit you may not het mechanical
limitations and you can actually do constant acceleration up to the
commanded speed.










-- 

Chris Albertson
Redondo Beach, California
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Gene Heskett
On Saturday 19 March 2016 12:52:55 Chris Albertson wrote:

> On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson <
>
> nicklas.karlsso...@gmail.com> wrote:
> > I am planning to use a micro controller for stepper step pulse
> > generation. I have considered to use an inverter card but special
> > purpose stepper circuits are cheap so I use one of these instead. It
> > should be possible to feed timer values then toggle should happen
> > via DMA timer output compare values.
> >
> > Can anyone suggest how an ideal step generation curve should look?
> > Constant acceleration up to top speed? Constant deceleration from
> > top speed to zero? Or just stop generating pulses?
>
> So you are NOT using LinuxCNC.  You are planning to roll your own?
>
> I've done this a few times.  My purpose for using CNC is robotics and
> these robots use motors of various type and move not unlike CNC
> machines.  All of these motors I always control using some
> microprocessor.  (ARM or AVR)
>
> Generally the pulse rate generator is at the lowest "layer" of
> abstraction in your software and gets requests from some high layers
> to do things like move at some rate to some location.  Your software
> has to try to do what it is requested but subject to physical
> properties of the motor and mechanical system.  You have to program
> this in.  Likely maximum acceleration is a function of current speed. 
> Likely the range of position is limited and so on.  Some requests
> might have speed or acceleration limits embedded in them
>
> After this there is one more important thing that really is done my
> some layer above the pulse generator and that is planning.  Say you
> are going to make a U-turn (reverse a motor direction) you might need
> to slow down before.  This is called "planning" and it's always hard
> and with robots who work in a changing environment maybe not possible.
>   But if you are interpreting G-Code you can always just read ahead.
>
> Ok there is one case where the pulse generator CAN and should do some
> planning.  If it gets a request to "move to location X"  it should
> accelerate to maximum speed, move for some time then DECELERATE and
> stop at "X" using other max
>
> There are some cases where the pulse generator MUST work with more
> then one motor at the same time.  What if the request is to "move in a
> circle"  or if doing threading on a lathe to move the spindle and
> leadscrew in "lock-step".  In my case I want to move a
> caterpillar-tread robot along an arc of given radios so that it passes
> through the center of a doorway. The limiting factor is the
> performance of the "outside" tread motor.  In general what running
> multiple motors one of then will hit a performance limit first and the
> others need to have their accelerations limited.
>
> The easiest thing for you to do is use software that others have
> written and get it to work some how on the platform your choose (An
> ARM based SBC like the beagle bored or "Pi")   For CNC work LinucCNC
> already does what you need and for robotics look up "ROS".  Both of
> these can run on a computer the size of a credit card.
>
>
>
> Now getting to your specific question of wetter to use constant
> acceleration (linearly increasing speed) or some kind of curve.  The
> above should have answered this.  The pulse generator will try for
> maximum performance which is constant acceleration but may run into
> physical limitation of the motor and mechanics where available torque
> is a function of speed and this will cause acceleration if tapper off.

But the stepper generator itself does NOT know when this limit is 
encountered, so the acceleration tapers off alright, to a loss of 
synchronization stop, usually in less than another 90 degrees of 
rotation, determined by its mass and the load pushing it.  AKA a stall.

Lost part, broken tool, what have you mayhem follows.

The only way for the software to know the motor has lost synch, is with 
an encoder on the motor with a resolution equal to or better than the 
microstepping in use.

Unless and until the drivers develop a method to detect that, AND return 
a FAIL signal to our software, we are stuck with that situation.

Servo systems can do this quite well simply by watching the PID.error 
output.

But steppers, which normally have no such feedback path, are crippled in 
that reporting, so you have the stalls and broken tooling and wrecked 
parts that go with pushing a stepper out of its comfort zone.

>   On the other hand if the request has an embedded limit you may not
> het mechanical limitations and you can actually do constant
> acceleration up to the commanded speed.

Which is what we do. But violated accel limits seem easy to detect. Run 
the x table at full speed to the limit which should be 50 thou or so 
away from the hard limit.  This because of the unbalance weight of the 
table hanging out out, adds to the way friction quite a bit if it hasn't 
been oiled in the last 10 minutes.

Then try to move i

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
On Sat, 19 Mar 2016 09:52:55 -0700
Chris Albertson  wrote:

> On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson <
> nicklas.karlsso...@gmail.com> wrote:
> 
> > I am planning to use a micro controller for stepper step pulse generation.
> > I have considered to use an inverter card but special purpose stepper
> > circuits are cheap so I use one of these instead. It should be possible to
> > feed timer values then toggle should happen via DMA timer output compare
> > values.
> >
> > Can anyone suggest how an ideal step generation curve should look?
> > Constant acceleration up to top speed? Constant deceleration from top speed
> > to zero? Or just stop generating pulses?
> >
> 
> So you are NOT using LinuxCNC.  You are planning to roll your own?

No i use Linuxcnc and it currently communicate via Ethernet with a micro 
controller so i stick with this solution for now. I discovered motion planner 
in Linuxcnc have maximum speed and maximum acceleration so I have to stick with 
these to avoid following error at high speed. I have chosen a micro stepping 
driver so I guess linuxcnc servo loop is to slow for the toggling.

To output a square pulse on micro controller is very little software, I think 
DMA transfer of table value to timer comparator registers will work really 
well, othewise I could use several timer or software.

As is now I use the micro controller for DC motors with encoder. For angle 
measurement I already have encoder and plan to add resolver. For motor types I 
have DC and plan to add BLDC, PMSM and Asyncronous. Maybe I also add 
sensorless. There are some software libraries available at least binaries maybe 
I use these or write my own.


> 
> I've done this a few times.  My purpose for using CNC is robotics and these
> robots use motors of various type and move not unlike CNC machines.  All of
> these motors I always control using some microprocessor.  (ARM or AVR)
> 
> Generally the pulse rate generator is at the lowest "layer" of abstraction
> in your software and gets requests from some high layers to do things like
> move at some rate to some location.  Your software has to try to do what it
> is requested but subject to physical properties of the motor and mechanical
> system.  You have to program this in.  Likely maximum acceleration is a
> function of current speed.  Likely the range of position is limited and so
> on.  Some requests might have speed or acceleration limits embedded in them
> 
> After this there is one more important thing that really is done my some
> layer above the pulse generator and that is planning.  Say you are going to
> make a U-turn (reverse a motor direction) you might need to slow down
> before.  This is called "planning" and it's always hard and with robots who
> work in a changing environment maybe not possible.   But if you are
> interpreting G-Code you can always just read ahead.
> 
> Ok there is one case where the pulse generator CAN and should do some
> planning.  If it gets a request to "move to location X"  it should
> accelerate to maximum speed, move for some time then DECELERATE and stop at
> "X" using other max
> 
> There are some cases where the pulse generator MUST work with more then one
> motor at the same time.  What if the request is to "move in a circle"  or
> if doing threading on a lathe to move the spindle and leadscrew in
> "lock-step".  In my case I want to move a caterpillar-tread robot along an
> arc of given radios so that it passes through the center of a doorway.
> The limiting factor is the performance of the "outside" tread motor.  In
> general what running multiple motors one of then will hit a performance
> limit first and the others need to have their accelerations limited.
> 
> The easiest thing for you to do is use software that others have written
> and get it to work some how on the platform your choose (An ARM based SBC
> like the beagle bored or "Pi")   For CNC work LinucCNC already does what
> you need and for robotics look up "ROS".  Both of these can run on a
> computer the size of a credit card.
> 
> 
> 
> Now getting to your specific question of wetter to use constant
> acceleration (linearly increasing speed) or some kind of curve.  The above
> should have answered this.  The pulse generator will try for maximum
> performance which is constant acceleration but may run into physical
> limitation of the motor and mechanics where available torque is a function
> of speed and this will cause acceleration if tapper off.   On the other
> hand if the request has an embedded limit you may not het mechanical
> limitations and you can actually do constant acceleration up to the
> commanded speed.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Chris Albertson
> Redondo Beach, California
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http:

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
I have seen and run machinekit, it is linuxcnc. I have also read about 
BeagleBone. There are plenty of devices suitable to generate the pulses but at 
which rate should pulses generated? Constant acceleration between different 
speeds?


On Fri, 18 Mar 2016 12:50:21 -0700
"John Dammeyer"  wrote:

> You might look at the Replicape and a BeagleBone Black.   There are several
> other capes including one with a standard DB-25 parallel port that run
> LinuxCNC on the Beagle.   Search for MachineKit.
> 
> John
> 
> > -Original Message-
> > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > Sent: March-18-16 12:27 PM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> > 
> > 
> > Nice box and standard port is always good, I should think about it.
> Steppers
> > are for an xyz engraver so it is essentially a mini CNC machine without
> tool
> > changer.
> > 
> > 
> > 
> > On Fri, 18 Mar 2016 12:00:55 -0700
> > "John Dammeyer"  wrote:
> > 
> > > You are welcome to look at my Electronic Lead Screw Code.  Follow the
> > link
> > > to the code.  It's written for a PIC in C.
> > > John
> > >
> > >
> > > "ELS! Nothing else works as well for your Lathe"
> > > Automation Artisans Inc.
> > > http://www.autoartisans.com/ELS/
> > > Ph. 1 250 544 4950
> > >
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > > Sent: March-18-16 11:46 AM
> > > > To: emc-users@lists.sourceforge.net
> > > > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > > >
> > > >
> > > > I am planning to use a micro controller for stepper step pulse
> generation.
> > > I
> > > > have considered to use an inverter card but special purpose stepper
> > > circuits
> > > > are cheap so I use one of these instead. It should be possible to feed
> > > timer
> > > > values then toggle should happen via DMA timer output compare values.
> > > >
> > > > Can anyone suggest how an ideal step generation curve should look?
> > > > Constant acceleration up to top speed? Constant deceleration from top
> > > > speed to zero? Or just stop generating pulses?
> > > >
> > > > Regards Nicklas Karlsson
> > > >
> > > >
> > >
> 
> > > --
> > > > Transform Data into Opportunity.
> > > > Accelerate data analysis in your applications with
> > > > Intel Data Analytics Acceleration Library.
> > > > Click to learn more.
> > > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > > ___
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > >
> > >
> 
> --
> > > Transform Data into Opportunity.
> > > Accelerate data analysis in your applications with
> > > Intel Data Analytics Acceleration Library.
> > > Click to learn more.
> > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > 
> >
> 
> --
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Gene Heskett
On Saturday 19 March 2016 13:23:27 Nicklas Karlsson wrote:

> On Sat, 19 Mar 2016 09:52:55 -0700
>
> Chris Albertson  wrote:
> > On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson <
> >
> > nicklas.karlsso...@gmail.com> wrote:
> > > I am planning to use a micro controller for stepper step pulse
> > > generation. I have considered to use an inverter card but special
> > > purpose stepper circuits are cheap so I use one of these instead.
> > > It should be possible to feed timer values then toggle should
> > > happen via DMA timer output compare values.

DMA, for those cpu's that have it built in, can be a VERY useful tool.  
But since LCNC doesn't seem to use it, I have to assume the worst case 
scenario exists in modern cpu's...

In 1978 I needed to generate an academy countdown leader, 9.9 to 1.9 
seconds until 1st video, on an RCA 1802 processor, which has built in 
dma.  This thing ran at the smoking clock speed of 1.79 Mhz, but a full 
processor cycle was 8 clocks. Said another way its speed was 223,750 
instructions per second.  And I was able to do it on 6 DMA cycles per 
vertical field, using previously composed data, generating characters 
big enough they could be read on a 5" monitor from 20' away by operators 
with reasonably good eyesight.

It worked without a hitch even at that slow a machine cycle because any 
time a DMARQ went down, the next machine cycle serviced it.  With 
more "modern" cpu's, that is not always the case. Some treat dma as 
needing a full context dump to the stack first.  Both RCA and TI got it 
right the first time, but TI did have to reload the program counter 
pointer which took a machine cycle. RCA did not as with 16 ea 16 bit 
registers, they just assigned one of them to be the dma access pointer.

IMO you can smell time wasting stacking of the processor state and its 
recovery when the dma had been serviced 500 yards upwind of a dry lot 
operation on a below zero February morning.  For those of you not raised 
on a farm, I'll just say its legendary and you'll never forget it.

Modern disclaimer: I have no clue what sort of priority is given DMA by 
todays crop of CPU's.  Sure they've gotten faster, but are they better?

> > >
> > > Can anyone suggest how an ideal step generation curve should look?
> > > Constant acceleration up to top speed? Constant deceleration from
> > > top speed to zero? Or just stop generating pulses?
> >
> > So you are NOT using LinuxCNC.  You are planning to roll your own?
>
> No i use Linuxcnc and it currently communicate via Ethernet with a
> micro controller so i stick with this solution for now. I discovered
> motion planner in Linuxcnc have maximum speed and maximum acceleration
> so I have to stick with these to avoid following error at high speed.
> I have chosen a micro stepping driver so I guess linuxcnc servo loop
> is to slow for the toggling.
>
> To output a square pulse on micro controller is very little software,
> I think DMA transfer of table value to timer comparator registers will
> work really well, othewise I could use several timer or software.
>
> As is now I use the micro controller for DC motors with encoder. For
> angle measurement I already have encoder and plan to add resolver. For
> motor types I have DC and plan to add BLDC, PMSM and Asyncronous.
> Maybe I also add sensorless. There are some software libraries
> available at least binaries maybe I use these or write my own.
>
> > I've done this a few times.  My purpose for using CNC is robotics
> > and these robots use motors of various type and move not unlike CNC
> > machines.  All of these motors I always control using some
> > microprocessor.  (ARM or AVR)
> >
> > Generally the pulse rate generator is at the lowest "layer" of
> > abstraction in your software and gets requests from some high layers
> > to do things like move at some rate to some location.  Your software
> > has to try to do what it is requested but subject to physical
> > properties of the motor and mechanical system.  You have to program
> > this in.  Likely maximum acceleration is a function of current
> > speed.  Likely the range of position is limited and so on.  Some
> > requests might have speed or acceleration limits embedded in them
> >
> > After this there is one more important thing that really is done my
> > some layer above the pulse generator and that is planning.  Say you
> > are going to make a U-turn (reverse a motor direction) you might
> > need to slow down before.  This is called "planning" and it's always
> > hard and with robots who work in a changing environment maybe not
> > possible.   But if you are interpreting G-Code you can always just
> > read ahead.
> >
> > Ok there is one case where the pulse generator CAN and should do
> > some planning.  If it gets a request to "move to location X"  it
> > should accelerate to maximum speed, move for some time then
> > DECELERATE and stop at "X" using other max
> >
> > There are some cases where the pulse generator MUST work with

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Philipp Burch
Hi Gene!

On 19.03.2016 19:24, Gene Heskett wrote:
> [...]
> 
> In 1978 I needed to generate an academy countdown leader, 9.9 to 1.9 
> seconds until 1st video, on an RCA 1802 processor, which has built in 
> dma.  This thing ran at the smoking clock speed of 1.79 Mhz, but a full 
> processor cycle was 8 clocks. Said another way its speed was 223,750 
> instructions per second.  And I was able to do it on 6 DMA cycles per 
> vertical field, using previously composed data, generating characters 
> big enough they could be read on a 5" monitor from 20' away by operators 
> with reasonably good eyesight.
> 
> It worked without a hitch even at that slow a machine cycle because any 
> time a DMARQ went down, the next machine cycle serviced it.  With 
> more "modern" cpu's, that is not always the case. Some treat dma as 
> needing a full context dump to the stack first.  Both RCA and TI got it 
> right the first time, but TI did have to reload the program counter 
> pointer which took a machine cycle. RCA did not as with 16 ea 16 bit 
> registers, they just assigned one of them to be the dma access pointer.
> 
> IMO you can smell time wasting stacking of the processor state and its 
> recovery when the dma had been serviced 500 yards upwind of a dry lot 
> operation on a below zero February morning.  For those of you not raised 
> on a farm, I'll just say its legendary and you'll never forget it.
> 
> Modern disclaimer: I have no clue what sort of priority is given DMA by 
> todays crop of CPU's.  Sure they've gotten faster, but are they better?

It's a bit off-topic, but anyways: DMA controllers in recent
microcontrollers can be quite complex beasts, far from a simple
incrementing pointer for copy operations. Some use dynamic descriptors
in memory, which hold the DMA configuration. One of the config options
in each descriptor holds the address of the next descriptor. With this,
you can generate "any number" of such descriptors and then start the DMA
with the address of the first and it will (optionally looping forever)
copy N words from here to there, then M words from foo to bar, followed
by K words, etc. without any CPU intervention at all. Usually it is also
possible to trigger the DMA using a hardware timer, so you could get
away without any interrupt for this transfers at all. But of course the
DMA controller has to access the bus as well, so if the CPU is doing
some heavy memory access on its own, the DMA may be slowed down quite much.

Oh, and there may easily exist multiple DMA controllers in a single
microcontroller which can be running at the same time. Each of the
controllers may then also contain dozens of streams. So, yes, I think
that DMA is given quite some priority in todays microcontrollers.

Cheers,
Philipp



signature.asc
Description: OpenPGP digital signature
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Gene Heskett
On Saturday 19 March 2016 14:40:42 Philipp Burch wrote:

> Hi Gene!
>
> On 19.03.2016 19:24, Gene Heskett wrote:
> > [...]
> >
> > In 1978 I needed to generate an academy countdown leader, 9.9 to 1.9
> > seconds until 1st video, on an RCA 1802 processor, which has built
> > in dma.  This thing ran at the smoking clock speed of 1.79 Mhz, but
> > a full processor cycle was 8 clocks. Said another way its speed was
> > 223,750 instructions per second.  And I was able to do it on 6 DMA
> > cycles per vertical field, using previously composed data,
> > generating characters big enough they could be read on a 5" monitor
> > from 20' away by operators with reasonably good eyesight.
> >
> > It worked without a hitch even at that slow a machine cycle because
> > any time a DMARQ went down, the next machine cycle serviced it. 
> > With more "modern" cpu's, that is not always the case. Some treat
> > dma as needing a full context dump to the stack first.  Both RCA and
> > TI got it right the first time, but TI did have to reload the
> > program counter pointer which took a machine cycle. RCA did not as
> > with 16 ea 16 bit registers, they just assigned one of them to be
> > the dma access pointer.
> >
> > IMO you can smell time wasting stacking of the processor state and
> > its recovery when the dma had been serviced 500 yards upwind of a
> > dry lot operation on a below zero February morning.  For those of
> > you not raised on a farm, I'll just say its legendary and you'll
> > never forget it.
> >
> > Modern disclaimer: I have no clue what sort of priority is given DMA
> > by todays crop of CPU's.  Sure they've gotten faster, but are they
> > better?
>
> It's a bit off-topic, but anyways: DMA controllers in recent
> microcontrollers can be quite complex beasts, far from a simple
> incrementing pointer for copy operations. Some use dynamic descriptors
> in memory, which hold the DMA configuration. One of the config options
> in each descriptor holds the address of the next descriptor. With
> this, you can generate "any number" of such descriptors and then start
> the DMA with the address of the first and it will (optionally looping
> forever) copy N words from here to there, then M words from foo to
> bar, followed by K words, etc. without any CPU intervention at all.
> Usually it is also possible to trigger the DMA using a hardware timer,
> so you could get away without any interrupt for this transfers at all.
> But of course the DMA controller has to access the bus as well, so if
> the CPU is doing some heavy memory access on its own, the DMA may be
> slowed down quite much.
>
> Oh, and there may easily exist multiple DMA controllers in a single
> microcontroller which can be running at the same time. Each of the
> controllers may then also contain dozens of streams. So, yes, I think
> that DMA is given quite some priority in todays microcontrollers.
>
> Cheers,
> Philipp

The RCA version simply transfered bytes in ascending order from memory as 
the dma pointer register was incremented per byte, until DMARQ went back 
high, telling the cpu that this service request ahd been fullfilled.  

Should a logic fault have ocurred that prevented it from going back high 
have occurred, it would have sat there copying memory to that i/o port 
address at nominally 250kb a second till the rapture as the register 
would have looped.  It was up to the programmer and the hardware builder 
to make sure that didn't happen, but since I was a committee of one, 
that was easy to enforce. :)  Nobody else had a clue what the heck I was 
doing, and perhaps didn't even understand why I was doing it.  Shrug...

What I was doing was saving a dub cycle and its quality loss in the aired 
product, and divorcing their quite varigated reaction times from the 
products timing, which made a huge diff in the video quality aired, and 
in the timing consistency.  Nielson book points +2 in the next book. I 
don't have to tell you how important those 2 points were to the sales 
dept. Depending on how its handled, and the market size, $200 in market 
205 to 2+ million a month difference in market #1.  The stations I have 
been affilated with were in the 180 to 160 range.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
On Sat, 19 Mar 2016 14:24:23 -0400
Gene Heskett  wrote:

> On Saturday 19 March 2016 13:23:27 Nicklas Karlsson wrote:
> 
> > On Sat, 19 Mar 2016 09:52:55 -0700
> >
> > Chris Albertson  wrote:
> > > On Fri, Mar 18, 2016 at 11:46 AM, Nicklas Karlsson <
> > >
> > > nicklas.karlsso...@gmail.com> wrote:
> > > > I am planning to use a micro controller for stepper step pulse
> > > > generation. I have considered to use an inverter card but special
> > > > purpose stepper circuits are cheap so I use one of these instead.
> > > > It should be possible to feed timer values then toggle should
> > > > happen via DMA timer output compare values.
> 
> DMA, for those cpu's that have it built in, can be a VERY useful tool.  
> But since LCNC doesn't seem to use it, I have to assume the worst case 
> scenario exists in modern cpu's...

DMA is not inside Linuxcnc, it is on micro controller I already have on desktop 
with communication to linuxcnc. At each toggle it will transfer at which 
counter value next toggle will happen from a buffer. Another option is to use 
several timers. Timers produce square pulses as perfect as the oscillator 
running while software may have jitter.


Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
> Hi Gene!
> 
> On 19.03.2016 19:24, Gene Heskett wrote:
> > [...]
> > 
> > In 1978 I needed to generate an academy countdown leader, 9.9 to 1.9 
> > seconds until 1st video, on an RCA 1802 processor, which has built in 
> > dma.  This thing ran at the smoking clock speed of 1.79 Mhz, but a full 
> > processor cycle was 8 clocks. Said another way its speed was 223,750 
> > instructions per second.  And I was able to do it on 6 DMA cycles per 
> > vertical field, using previously composed data, generating characters 
> > big enough they could be read on a 5" monitor from 20' away by operators 
> > with reasonably good eyesight.
> > 
> > It worked without a hitch even at that slow a machine cycle because any 
> > time a DMARQ went down, the next machine cycle serviced it.  With 
> > more "modern" cpu's, that is not always the case. Some treat dma as 
> > needing a full context dump to the stack first.  Both RCA and TI got it 
> > right the first time, but TI did have to reload the program counter 
> > pointer which took a machine cycle. RCA did not as with 16 ea 16 bit 
> > registers, they just assigned one of them to be the dma access pointer.
> > 
> > IMO you can smell time wasting stacking of the processor state and its 
> > recovery when the dma had been serviced 500 yards upwind of a dry lot 
> > operation on a below zero February morning.  For those of you not raised 
> > on a farm, I'll just say its legendary and you'll never forget it.
> > 
> > Modern disclaimer: I have no clue what sort of priority is given DMA by 
> > todays crop of CPU's.  Sure they've gotten faster, but are they better?
> 
> It's a bit off-topic, but anyways: DMA controllers in recent
> microcontrollers can be quite complex beasts, far from a simple
> incrementing pointer for copy operations. Some use dynamic descriptors
> in memory, which hold the DMA configuration. One of the config options
> in each descriptor holds the address of the next descriptor. With this,
> you can generate "any number" of such descriptors and then start the DMA
> with the address of the first and it will (optionally looping forever)
> copy N words from here to there, then M words from foo to bar, followed
> by K words, etc. without any CPU intervention at all. Usually it is also
> possible to trigger the DMA using a hardware timer, so you could get
> away without any interrupt for this transfers at all. But of course the
> DMA controller has to access the bus as well, so if the CPU is doing
> some heavy memory access on its own, the DMA may be slowed down quite much.

Are you sure CPU slow down DMA and not the opposite?


Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Philipp Burch
On 19.03.2016 20:20, Nicklas Karlsson wrote:
>> Hi Gene!
>>
>> On 19.03.2016 19:24, Gene Heskett wrote:
>>> [...]
>>>
>>> In 1978 I needed to generate an academy countdown leader, 9.9 to 1.9 
>>> seconds until 1st video, on an RCA 1802 processor, which has built in 
>>> dma.  This thing ran at the smoking clock speed of 1.79 Mhz, but a full 
>>> processor cycle was 8 clocks. Said another way its speed was 223,750 
>>> instructions per second.  And I was able to do it on 6 DMA cycles per 
>>> vertical field, using previously composed data, generating characters 
>>> big enough they could be read on a 5" monitor from 20' away by operators 
>>> with reasonably good eyesight.
>>>
>>> It worked without a hitch even at that slow a machine cycle because any 
>>> time a DMARQ went down, the next machine cycle serviced it.  With 
>>> more "modern" cpu's, that is not always the case. Some treat dma as 
>>> needing a full context dump to the stack first.  Both RCA and TI got it 
>>> right the first time, but TI did have to reload the program counter 
>>> pointer which took a machine cycle. RCA did not as with 16 ea 16 bit 
>>> registers, they just assigned one of them to be the dma access pointer.
>>>
>>> IMO you can smell time wasting stacking of the processor state and its 
>>> recovery when the dma had been serviced 500 yards upwind of a dry lot 
>>> operation on a below zero February morning.  For those of you not raised 
>>> on a farm, I'll just say its legendary and you'll never forget it.
>>>
>>> Modern disclaimer: I have no clue what sort of priority is given DMA by 
>>> todays crop of CPU's.  Sure they've gotten faster, but are they better?
>>
>> It's a bit off-topic, but anyways: DMA controllers in recent
>> microcontrollers can be quite complex beasts, far from a simple
>> incrementing pointer for copy operations. Some use dynamic descriptors
>> in memory, which hold the DMA configuration. One of the config options
>> in each descriptor holds the address of the next descriptor. With this,
>> you can generate "any number" of such descriptors and then start the DMA
>> with the address of the first and it will (optionally looping forever)
>> copy N words from here to there, then M words from foo to bar, followed
>> by K words, etc. without any CPU intervention at all. Usually it is also
>> possible to trigger the DMA using a hardware timer, so you could get
>> away without any interrupt for this transfers at all. But of course the
>> DMA controller has to access the bus as well, so if the CPU is doing
>> some heavy memory access on its own, the DMA may be slowed down quite much.
> 
> Are you sure CPU slow down DMA and not the opposite?

Depends on the priorities, the DMA may be configurable to get higher
priority than the CPU. But I'd suspect the "CPU comes first" approach to
be more common, as the CPU should usually be busy with not so memory
intensive tasks, so performance will increase if it only has to take the
bus every once in a while and continue immediately with its work, while
the DMA is using all the rest of the bandwidth.

Bye,
Philipp



signature.asc
Description: OpenPGP digital signature
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread John Alexander Stewart
Just FYI - about a year ago or so I purchased from Jeff @xylotex a BBBlack
and DB-25 cape - ran my Unimat SL CNC'd lathe just fine (feeding a spare
Gecko G540, 2 axes of which were unused)

BBBoard from Xylotex came with LinuxCNC Machinekit on a little SDCard. An
out of the box solution.



On Fri, Mar 18, 2016 at 3:50 PM, John Dammeyer 
wrote:

> You might look at the Replicape and a BeagleBone Black.   There are several
> other capes including one with a standard DB-25 parallel port that run
> LinuxCNC on the Beagle.   Search for MachineKit.
>
> John
>
> > -Original Message-
> > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > Sent: March-18-16 12:27 PM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> >
> >
> > Nice box and standard port is always good, I should think about it.
> Steppers
> > are for an xyz engraver so it is essentially a mini CNC machine without
> tool
> > changer.
> >
> >
> >
> > On Fri, 18 Mar 2016 12:00:55 -0700
> > "John Dammeyer"  wrote:
> >
> > > You are welcome to look at my Electronic Lead Screw Code.  Follow the
> > link
> > > to the code.  It's written for a PIC in C.
> > > John
> > >
> > >
> > > "ELS! Nothing else works as well for your Lathe"
> > > Automation Artisans Inc.
> > > http://www.autoartisans.com/ELS/
> > > Ph. 1 250 544 4950
> > >
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > > Sent: March-18-16 11:46 AM
> > > > To: emc-users@lists.sourceforge.net
> > > > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > > >
> > > >
> > > > I am planning to use a micro controller for stepper step pulse
> generation.
> > > I
> > > > have considered to use an inverter card but special purpose stepper
> > > circuits
> > > > are cheap so I use one of these instead. It should be possible to
> feed
> > > timer
> > > > values then toggle should happen via DMA timer output compare values.
> > > >
> > > > Can anyone suggest how an ideal step generation curve should look?
> > > > Constant acceleration up to top speed? Constant deceleration from top
> > > > speed to zero? Or just stop generating pulses?
> > > >
> > > > Regards Nicklas Karlsson
> > > >
> > > >
> > >
>
> 
> > > --
> > > > Transform Data into Opportunity.
> > > > Accelerate data analysis in your applications with
> > > > Intel Data Analytics Acceleration Library.
> > > > Click to learn more.
> > > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > > ___
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > >
> > >
>
> 
> --
> > > Transform Data into Opportunity.
> > > Accelerate data analysis in your applications with
> > > Intel Data Analytics Acceleration Library.
> > > Click to learn more.
> > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
>
> 
> --
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
It could be a good option so I do not need to have a large computer for a small 
machine. As is know it is more a question about how to ideally 
increases/decrease step rate for a stepper motor?



On Fri, 18 Mar 2016 16:05:31 -0400
John Alexander Stewart  wrote:

> Just FYI - about a year ago or so I purchased from Jeff @xylotex a BBBlack
> and DB-25 cape - ran my Unimat SL CNC'd lathe just fine (feeding a spare
> Gecko G540, 2 axes of which were unused)
> 
> BBBoard from Xylotex came with LinuxCNC Machinekit on a little SDCard. An
> out of the box solution.
> 
> 
> 
> On Fri, Mar 18, 2016 at 3:50 PM, John Dammeyer 
> wrote:
> 
> > You might look at the Replicape and a BeagleBone Black.   There are several
> > other capes including one with a standard DB-25 parallel port that run
> > LinuxCNC on the Beagle.   Search for MachineKit.
> >
> > John
> >
> > > -Original Message-
> > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > Sent: March-18-16 12:27 PM
> > > To: Enhanced Machine Controller (EMC)
> > > Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> > >
> > >
> > > Nice box and standard port is always good, I should think about it.
> > Steppers
> > > are for an xyz engraver so it is essentially a mini CNC machine without
> > tool
> > > changer.
> > >
> > >
> > >
> > > On Fri, 18 Mar 2016 12:00:55 -0700
> > > "John Dammeyer"  wrote:
> > >
> > > > You are welcome to look at my Electronic Lead Screw Code.  Follow the
> > > link
> > > > to the code.  It's written for a PIC in C.
> > > > John
> > > >
> > > >
> > > > "ELS! Nothing else works as well for your Lathe"
> > > > Automation Artisans Inc.
> > > > http://www.autoartisans.com/ELS/
> > > > Ph. 1 250 544 4950
> > > >
> > > >
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > > > > Sent: March-18-16 11:46 AM
> > > > > To: emc-users@lists.sourceforge.net
> > > > > Subject: [Emc-users] Stepper, ideal pulses without feedback
> > > > >
> > > > >
> > > > > I am planning to use a micro controller for stepper step pulse
> > generation.
> > > > I
> > > > > have considered to use an inverter card but special purpose stepper
> > > > circuits
> > > > > are cheap so I use one of these instead. It should be possible to
> > feed
> > > > timer
> > > > > values then toggle should happen via DMA timer output compare values.
> > > > >
> > > > > Can anyone suggest how an ideal step generation curve should look?
> > > > > Constant acceleration up to top speed? Constant deceleration from top
> > > > > speed to zero? Or just stop generating pulses?
> > > > >
> > > > > Regards Nicklas Karlsson
> > > > >
> > > > >
> > > >
> >
> > 
> > > > --
> > > > > Transform Data into Opportunity.
> > > > > Accelerate data analysis in your applications with
> > > > > Intel Data Analytics Acceleration Library.
> > > > > Click to learn more.
> > > > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > > > ___
> > > > > Emc-users mailing list
> > > > > Emc-users@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > > >
> > > >
> > > >
> >
> > 
> > --
> > > > Transform Data into Opportunity.
> > > > Accelerate data analysis in your applications with
> > > > Intel Data Analytics Acceleration Library.
> > > > Click to learn more.
> > > > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > > > ___
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > >
> >
> > 

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
> Hi Nicklas,
> 
> it should be fine to keep the step rate (velocity) constant between
> updates from the trajectory planner, assuming that it runs at something
> like 1kHz and the machine is not highly dynamic. Limiting velocity and
> acceleration in the step generator should generally not hurt and avoids
> stalled motors in case there is a step in the position command (which
> should not happen with LinuxCNC unless you mess around with the signals
> in HAL).

Then I will limit acceleration and velocity to avoid stalled motor.

I expect the magnets inside the stepper will induce a voltage proportional to 
speed and in such case this will limit maximum velocity.

There are some inertia both in motor and other mechanical parts which will 
limit accelaration. If available torque is approximately the same regardless of 
stepper motor speed a constant for maximum acceleration should be a good 
choice. There exist a possibility stepper motor maximum torque depend on speed 
but I have no idea about this kind of motor.

Regards Nicklas Karlsson



> On 18.03.2016 21:15, Nicklas Karlsson wrote:
> > It could be a good option so I do not need to have a large computer for a 
> > small machine. As is know it is more a question about how to ideally 
> > increases/decrease step rate for a stepper motor?
> > 
> > 
> > 
> > On Fri, 18 Mar 2016 16:05:31 -0400
> > John Alexander Stewart  wrote:
> > 
> >> Just FYI - about a year ago or so I purchased from Jeff @xylotex a BBBlack
> >> and DB-25 cape - ran my Unimat SL CNC'd lathe just fine (feeding a spare
> >> Gecko G540, 2 axes of which were unused)
> >>
> >> BBBoard from Xylotex came with LinuxCNC Machinekit on a little SDCard. An
> >> out of the box solution.
> >>
> >>
> >>
> >> On Fri, Mar 18, 2016 at 3:50 PM, John Dammeyer 
> >> wrote:
> >>
> >>> You might look at the Replicape and a BeagleBone Black.   There are 
> >>> several
> >>> other capes including one with a standard DB-25 parallel port that run
> >>> LinuxCNC on the Beagle.   Search for MachineKit.
> >>>
> >>> John
> >>>
> >>>> -Original Message-
> >>>> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> >>>> Sent: March-18-16 12:27 PM
> >>>> To: Enhanced Machine Controller (EMC)
> >>>> Subject: Re: [Emc-users] Stepper, ideal pulses without feedback
> >>>>
> >>>>
> >>>> Nice box and standard port is always good, I should think about it.
> >>> Steppers
> >>>> are for an xyz engraver so it is essentially a mini CNC machine without
> >>> tool
> >>>> changer.
> >>>>
> >>>>
> >>>>
> >>>> On Fri, 18 Mar 2016 12:00:55 -0700
> >>>> "John Dammeyer"  wrote:
> >>>>
> >>>>> You are welcome to look at my Electronic Lead Screw Code.  Follow the
> >>>> link
> >>>>> to the code.  It's written for a PIC in C.
> >>>>> John
> >>>>>
> >>>>>
> >>>>> "ELS! Nothing else works as well for your Lathe"
> >>>>> Automation Artisans Inc.
> >>>>> http://www.autoartisans.com/ELS/
> >>>>> Ph. 1 250 544 4950
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> -Original Message-
> >>>>>> From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> >>>>>> Sent: March-18-16 11:46 AM
> >>>>>> To: emc-users@lists.sourceforge.net
> >>>>>> Subject: [Emc-users] Stepper, ideal pulses without feedback
> >>>>>>
> >>>>>>
> >>>>>> I am planning to use a micro controller for stepper step pulse
> >>> generation.
> >>>>> I
> >>>>>> have considered to use an inverter card but special purpose stepper
> >>>>> circuits
> >>>>>> are cheap so I use one of these instead. It should be possible to
> >>> feed
> >>>>> timer
> >>>>>> values then toggle should happen via DMA timer output compare values.
> >>>>>>
> >>>>>> Can anyone suggest how an ideal step generation curve should look?
> >>>>>> Constant acceleration up to top speed? Constant deceleration from top
&

Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-19 Thread Nicklas Karlsson
> Nicklas, when I built a pcb drilling machine some years ago, I found
> constant acceleration and deceleration to top speed worked best, as
> for the most part trying to go instantly to the maximum speed the
> motors are capable of results in lost steps.
> You will need a bit of experimentation to determine the rate and
> length of both acceleration ramps as it will depend on the mass of
> your machine and the motors and power supply you are using.
> 
> Ken.

Constant acceleration and deceleration to top speed worked best fit very well 
with physics.

Stepper motor magnets induce a voltage proportional to speed which limit 
maximum speed. Torque is about the same regardless of speed and there are some 
intertia.

Regards Nicklas Karlsson



> 
> On Sat, Mar 19, 2016 at 5:46 AM, Nicklas Karlsson
>  wrote:
> > I am planning to use a micro controller for stepper step pulse generation. 
> > I have considered to use an inverter card but special purpose stepper 
> > circuits are cheap so I use one of these instead. It should be possible to 
> > feed timer values then toggle should happen via DMA timer output compare 
> > values.
> >
> > Can anyone suggest how an ideal step generation curve should look? Constant 
> > acceleration up to top speed? Constant deceleration from top speed to zero? 
> > Or just stop generating pulses?
> >
> > Regards Nicklas Karlsson
> >
> > --
> > Transform Data into Opportunity.
> > Accelerate data analysis in your applications with
> > Intel Data Analytics Acceleration Library.
> > Click to learn more.
> > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-21 Thread Nicklas Karlsson
> >>> ...
> >>> Modern disclaimer: I have no clue what sort of priority is given DMA by 
> >>> todays crop of CPU's.  Sure they've gotten faster, but are they better?
> >>
> >> It's a bit off-topic, but anyways: DMA controllers in recent
> >> microcontrollers can be quite complex beasts, far from a simple
> >> incrementing pointer for copy operations. Some use dynamic descriptors
> >> in memory, which hold the DMA configuration. One of the config options
> >> in each descriptor holds the address of the next descriptor. With this,
> >> you can generate "any number" of such descriptors and then start the DMA
> >> with the address of the first and it will (optionally looping forever)
> >> copy N words from here to there, then M words from foo to bar, followed
> >> by K words, etc. without any CPU intervention at all. Usually it is also
> >> possible to trigger the DMA using a hardware timer, so you could get
> >> away without any interrupt for this transfers at all. But of course the
> >> DMA controller has to access the bus as well, so if the CPU is doing
> >> some heavy memory access on its own, the DMA may be slowed down quite much.
> > 
> > Are you sure CPU slow down DMA and not the opposite?
> 
> Depends on the priorities, the DMA may be configurable to get higher
> priority than the CPU. But I'd suspect the "CPU comes first" approach to
> be more common, as the CPU should usually be busy with not so memory
> intensive tasks, so performance will increase if it only has to take the
> bus every once in a while and continue immediately with its work, while
> the DMA is using all the rest of the bandwidth.
> 
> Bye,
> Philipp

Ideally DMA priority should depend on how often transfers are done and 
scheduling priorities assigned according rate monotonic since a clock cycle 
blocked by memory bus busy essential use that clock cycle.

ADC may be around 1MHz altough only one read/write each time so this should 
certainly have higher priority than any CPU task. If DMA is used for Ethernet 
packets and they are transferred at 1kHz while there are a faster servo loop it 
should however have lower priority than servo loop.

I read somewhere about graphic cards on ordinary computers doing huge DMA 
transfers blocking CPU and they should certainly have lower priority than 
faster real time tasks. I would however guess it is possible to speed up memory 
accesses if they are done sequentially and ordinary computers are known to 
maximize throughput.


This is the ideal situation then the hardware of course have limititions.



Nicklas Karlsson

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper, ideal pulses without feedback

2016-03-21 Thread Gene Heskett
On Monday 21 March 2016 06:04:52 Nicklas Karlsson wrote:

> > >>> ...
> > >>> Modern disclaimer: I have no clue what sort of priority is given
> > >>> DMA by todays crop of CPU's.  Sure they've gotten faster, but
> > >>> are they better?
> > >>
> > >> It's a bit off-topic, but anyways: DMA controllers in recent
> > >> microcontrollers can be quite complex beasts, far from a simple
> > >> incrementing pointer for copy operations. Some use dynamic
> > >> descriptors in memory, which hold the DMA configuration. One of
> > >> the config options in each descriptor holds the address of the
> > >> next descriptor. With this, you can generate "any number" of such
> > >> descriptors and then start the DMA with the address of the first
> > >> and it will (optionally looping forever) copy N words from here
> > >> to there, then M words from foo to bar, followed by K words, etc.
> > >> without any CPU intervention at all. Usually it is also possible
> > >> to trigger the DMA using a hardware timer, so you could get away
> > >> without any interrupt for this transfers at all. But of course
> > >> the DMA controller has to access the bus as well, so if the CPU
> > >> is doing some heavy memory access on its own, the DMA may be
> > >> slowed down quite much.
> > >
> > > Are you sure CPU slow down DMA and not the opposite?
> >
> > Depends on the priorities, the DMA may be configurable to get higher
> > priority than the CPU. But I'd suspect the "CPU comes first"
> > approach to be more common, as the CPU should usually be busy with
> > not so memory intensive tasks, so performance will increase if it
> > only has to take the bus every once in a while and continue
> > immediately with its work, while the DMA is using all the rest of
> > the bandwidth.
> >
> > Bye,
> > Philipp
>
> Ideally DMA priority should depend on how often transfers are done and
> scheduling priorities assigned according rate monotonic since a clock
> cycle blocked by memory bus busy essential use that clock cycle.
>
> ADC may be around 1MHz altough only one read/write each time so this
> should certainly have higher priority than any CPU task. If DMA is
> used for Ethernet packets and they are transferred at 1kHz while there
> are a faster servo loop it should however have lower priority than
> servo loop.
>
> I read somewhere about graphic cards on ordinary computers doing huge
> DMA transfers blocking CPU and they should certainly have lower
> priority than faster real time tasks.

Rant mode on:

They do, but once the IRQ that starts the DMA has been granted, there is 
apparently no way in creation to interrupt it for a far higher priority 
but only two byte write & confirming read to a parport.  NVidia in 
particular will not give up control until it has done whatever the heck 
it thinks it has to do. The nouveau driver OTOH seems to be quite well 
behaved.

So does some of the onboard intel i915 stuff, I have two D525MW based 
machines that can do software stepping at the lower motor speeds quite 
nicely as the IRQ latency for that read/write is in the 3 to 4 
microsecond territory with that read/write scheduled at every 25 
microseconds.  So while we do use NVidia cards, we don't let their 
drivers come across the property line.

The amd/ati merge may have changed things there, but generally speaking 
we do not use any ati based cards either, not because the driver is a 
cpu hog to that 100+ milliseond lockout extent, but without their driver 
its noticeably slower & the display may be as much as a full second 
behind what the machine is doing, and with the ati drivers, uptime was 
measured in hours or less.  Couple that with the fact that Alex would 
tell you card such and such was now supported, but when you went 
shopping for that card and bought one, the box hadn't changed even the 
color of a dot on an i, but the card in the box was a newer production 
and STILL incompatible with any driver available. And no apologies when 
confronted.  So you run it in vesa mode, getting unsquare pixels on 
modern 16x9 monitors and half what your monitor can do for resolution 
until you can get back to town and get an NVidia card.

Net result is I wouldn't trust what Alex told me if he said it was lunch 
time and I could smell hot food.

If, with the merger, things have improved in that dept, please advise me 
as I will not waste another 100 dollar or more bill to find out, I blew 
at least $500 over the last 17+ years since my first linux build and 
install, trying to support "the little guy", but wound up in driver hell 
everytime.  That's plenty of the "quarter to call somebody who cares" 
when there wasn't anybody who gave a damn if it worked on linux on the 
other end of the line.  IMO, its up to them now.  If they work now, 
thats great, but unless I am told they do work, and work well...  I'll 
continue to buy NVidia econocards.

/Rant mode.
> I would however guess it is 
> possible to speed up memory accesses if they are done sequentially and
> ordi