Re: [Emc-users] Linuxcnc on arm (software library, static <--> dynamic)

2016-10-13 Thread Nicklas Karlsson
> TheCortex M is more like the Arduino then Pi.  The M rarely runs an
> operating system and the software burned into flash and from an end
> user's level the software never change.   You see the Arm Cortex M
> inside things like inkjet printers and microwave ovens and the like.

The librarys supplied from the manufacturers have a problem here, they assumme 
everything change dynamically while in reality it does not. Software could be 
made simpler by not using there software libraries. A good example is with 
there drivers callback functions are registered dynamically and if this is done 
once during startup software will become simpler by just adding the function 
calls to the interrupt handler, with this method it is simple to analyse what 
functions will be called.

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Todd Zuercher
I think you are probably right.  Running the simulation at 100x was much more 
accurate than 1000x.  Tomorrow I'll have to play with the servo thread speed 
some and see if and how much improvement I can find.  But not sure how much 
improvement will be possible in a sim config on a VM.

- Original Message -
From: "Stephen Dubovsky" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Thursday, October 13, 2016 3:52:42 PM
Subject: Re: [Emc-users] Hacking a sim runtime mode

I think the error of this approach (using N times higher accel/vel) is
coming from the piecewise linear approximations of the curves going bad.
If you try to follow a curve N times faster, then there are N times fewer
samples along that curve for a fixed time sampling period.  That introduces
errors.  There may be others but thats at least part of it.  Its the same
problem w/ discrete time vs continuous time systems.  There is divergence
between the solutions as the sampling rate goes down.


On Thu, Oct 13, 2016 at 3:08 PM, Todd Zuercher 
wrote:

> I was just working at this a little bit.   The first thing I did was to
> modify time.comp, to make a new sim_time.comp.  The sim_time.comp is
> basically just the same as the regular timer component with an input pin
> added to scale the time to what ever factor you speed up the simulation
> run.  Then I made a dummy config of one of our machines with all the
> velocities and accelerations increased by 1000x, and test ran a few things,
> the results were not quite as good as I had hoped, but were way better than
> the old estimations. Is it possible that some of the inaccuracy came from
> the fact I was running it in a VM?
>
> The timer scaling pin was a really simple mod, would there be any interest
> in adding that to the regular release?
>
> - Original Message -
> From: dan...@austin.rr.com
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Thursday, October 13, 2016 2:24:53 PM
> Subject: Re: [Emc-users] Hacking a sim runtime mode
>
>
>  Chris Albertson  wrote:
> > On Thu, Oct 13, 2016 at 9:00 AM, Peter C. Wallace 
> wrote:
> > > On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:
> > >
> >
> > > I just tried a real time Mesa Ethernet config with maxvel = 12 IPM
> (2000
> > > IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel
> 2
> > > IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak
> following
> > > errors in the 1-2 mill region)
> >
> > The problem to be solved is getting an estimate of the time required
> > to complete a job.   Does the above do this accurately?
>
> Yeah I want to know this.  I can run a job for real vs "fast sim" and
> compare.  One prob is the cycle time only goes down to seconds AFAIK.  If
> it's 100x then that's over a minute and a half it could be wrong, but
> that's still good enough as long as it's not estimating a very short job.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Charles Steinkuehler
On 10/13/2016 8:01 PM, Chris Albertson wrote:
> 
> For sophisticated motion control you really need both. (my internet is
> in robots, no as much CNC) One to run an OS and drive a user interface
> and screen and talk over a network and so on.  and a smaller processor
> to make I/O lines go up and down and drive motors and read encoders.
>  In LinuxCNC we sometimes have two processors a PC and a Mesa card.
> On an ARM based CNC, I think you'd see an "A" type perhaps it is a
> Raspberry Pi or perhaps it is an iPhone app.  Then you'd have "M"
> types physically driving the hardware.

This is what I like about the BeagleBone (the PRU substitutes for a
Cortex-M for hard-real-time bit-twiddling) and the Xilinx/Altera
SoC+FPGA combinations (where you can put the Mesa open-source VHDL
firmware in the FPGA).

It works particularly well if you drive the servo-thread timing via
interrupts from the hardware (with position captured by the hardware
when it fires the interrupt), thus side-stepping the relatively poor
ARM Cortex-A interrupt latency and jitter.

-- 
Charles Steinkuehler
char...@steinkuehler.net



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Chris Albertson
On 10/13/16, Erik Friesen  wrote:
> To clarify my question, I am trying to understand at what level lcnc
> accesses hardware peripherals.  For example, suppose I build a board with
> an spi dac peripheral to the arm, as well as write the kernel driver, if
> necessary.  What type of glue do I need to provide in this situation?
>
Fear off the is an ARM Cortex A and also a Cortex M.   The "A" type is
what is inside your phone and what powers the Rasberry Piand Beagle
Bone.  These typically run a UNIX-like OS.   Either Linux or in the
case of Apple actually UNIX.   They are not much different from the
the PC based Linux systems we all know about.

The trend is to have very simple and general kernel level device
drives that do little more than moderate access to the hardware.  Then
there is a user space library that handles protocolThe prime
example is USB hardware.   This is the same on Linux ARM and Linus PC.

The ARM does have a LOT more peripheral hardware built-in and the
details expand on the chip. They are all different.

TheCortex M is more like the Arduino then Pi.  The M rarely runs an
operating system and the software burned into flash and from an end
user's level the software never change.   You see the Arm Cortex M
inside things like inkjet printers and microwave ovens and the like.

For sophisticated motion control you really need both. (my internet is
in robots, no as much CNC) One to run an OS and drive a user interface
and screen and talk over a network and so on.  and a smaller processor
to make I/O lines go up and down and drive motors and read encoders.
 In LinuxCNC we sometimes have two processors a PC and a Mesa card.
On an ARM based CNC, I think you'd see an "A" type perhaps it is a
Raspberry Pi or perhaps it is an iPhone app.  Then you'd have "M"
types physically driving the hardware.

The A types ARMs will act pretty much like PCs to an end user or
casual programmer and the "M" typically uses a library that "hides"
the fact that ll the chips are different.   I can simply read "analog
pin 1" and don't need to know the details.  This means my code runs on
many different ARMs with no or little change.  In the Cortex M there
is no "driver" level there is only user space. (or we can claim that
it is all driver and there is no user.)

I currently have serval small "M" type in my desk in the space between
the keyboard and my monitor that I am typing o program.  They are
cheap as dirt, like $4 and less but I can easy keep upgrading an
encoder with 64 pulses per rev that issuing 12,000 RPM.   I can run
four PID loops for four motors and if I know more about control theory
if would not oscillate.  But an"M" is cheap enough and small enough
and uses such little amount of power that I can use one for each
motor.

One could use an FPGA (like Mesa) but the ARM cortex M is now so darn
fast and cheap and VERY easy to program that I'd use that.  Just for
scale, if my motor runs at 12,000 rpm  the "M" chips I have can
execute as many as 500,000 instructions for each revolution of the
motor.
-- 

Chris Albertson
Redondo Beach, California

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Linuxcnc on arm

2016-10-13 Thread richshoop
Check out the machinekit web group for additional information. 

- Original Message -

From: emc-users-requ...@lists.sourceforge.net 
To: emc-users@lists.sourceforge.net 
Sent: Thursday, October 13, 2016 12:13:56 PM 
Subject: Emc-users Digest, Vol 126, Issue 35 

Send Emc-users mailing list submissions to 
emc-users@lists.sourceforge.net 

To subscribe or unsubscribe via the World Wide Web, visit 
https://lists.sourceforge.net/lists/listinfo/emc-users 
or, via email, send a message with subject or body 'help' to 
emc-users-requ...@lists.sourceforge.net 

You can reach the person managing the list at 
emc-users-ow...@lists.sourceforge.net 

When replying, please edit your Subject line so it is more specific 
than "Re: Contents of Emc-users digest..." 


Today's Topics: 

1. Re: Linuxcnc on arm (Erik Friesen) 
2. Re: Linuxcnc on arm (Nicklas Karlsson) 
3. Re: Hacking a sim runtime mode 
(Todd Zuercher) 
4. Re: Linuxcnc on arm (Erik Friesen) 


-- 

Message: 1 
Date: Thu, 13 Oct 2016 14:24:54 -0400 
From: Erik Friesen  
Subject: Re: [Emc-users] Linuxcnc on arm 
To: "Enhanced Machine Controller (EMC)" 
 
Message-ID: 

[Emc-users] Linuxcnc on arm

2016-10-13 Thread richshoop
Check out some of these zynq boards, dual core arm with a fpga attached. 
www.zedboard.org 

- Original Message -

From: emc-users-requ...@lists.sourceforge.net 
To: emc-users@lists.sourceforge.net 
Sent: Thursday, October 13, 2016 12:13:56 PM 
Subject: Emc-users Digest, Vol 126, Issue 35 

Send Emc-users mailing list submissions to 
emc-users@lists.sourceforge.net 

To subscribe or unsubscribe via the World Wide Web, visit 
https://lists.sourceforge.net/lists/listinfo/emc-users 
or, via email, send a message with subject or body 'help' to 
emc-users-requ...@lists.sourceforge.net 

You can reach the person managing the list at 
emc-users-ow...@lists.sourceforge.net 

When replying, please edit your Subject line so it is more specific 
than "Re: Contents of Emc-users digest..." 


Today's Topics: 

1. Re: Linuxcnc on arm (Erik Friesen) 
2. Re: Linuxcnc on arm (Nicklas Karlsson) 
3. Re: Hacking a sim runtime mode 
(Todd Zuercher) 
4. Re: Linuxcnc on arm (Erik Friesen) 


-- 

Message: 1 
Date: Thu, 13 Oct 2016 14:24:54 -0400 
From: Erik Friesen  
Subject: Re: [Emc-users] Linuxcnc on arm 
To: "Enhanced Machine Controller (EMC)" 
 
Message-ID: 

Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Erik Friesen
Interesting info on spidev, but it doesn't surprise me.  Isn't that
because they are non blocking read/writes to manage slow spi clocks,
etc?  The calls end up in spi_sync, that says "This call may only be
used from a context that may sleep" so I would expect not so good
performance with this.  My first thought would be a blocking/non
sleeping hardware call, although I am not clear if this would require
direct register calls to the spi memory locations.  With a 10mhz spi
ic maybe that would take too long.

On Thu, Oct 13, 2016 at 5:33 PM, Jeff Epler  wrote:
> If your device uses PREEMPT-RT realtime, then you can use any userspace
> interface (ioctl, read, write, recv, send, etc) that gives you
> acceptable latency in practice.  Otherwise, you basically get to do
> direct memory-mapped control of the applicable registers in your SOC,
> because for xenomai and rtai you can't use standard kernel or syscall
> interfaces in realtime context (but you can for setup/cleanup code, for
> instance to get actually map MMIO regions)
>
> The SPI hardware interface, with /dev/spidev as a userspace API, is
> perfect on paper; however, I have experenced that the quality of the
> driver implementation is often poor, both in latency and in, well,
> actually working!
>
> Here are some notes about various ARM SBCs and SPI interface hardware.
> Except for odroid c2, these are all my direct experience.
>
> odroid u3: /dev/spidev working with good latency (good enough for 1kHz)
> after kernel driver modifications, linuxcnc driver hm2_spi, mesa 7i90
> fpga card
>
> odroid c2: reported non-working (only supports 8-bit transfers)
>
> odroid xu4: does not honor spidev byte order ioctl (hardcoded in
> devicetree).  poor latency even after kernel driver modifications
> (probably ok for 500Hz, probably not for 1kHz).  hm2_spi driver again.
>
> raspberry pi 3: only supports 8-bit transfers.  contributed
> register-level driver, confirmed working on preempt-rt (only--will need
> work for other supported rtoses), hm2_rpspi
>
> Jeff
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Jeff Epler
If your device uses PREEMPT-RT realtime, then you can use any userspace
interface (ioctl, read, write, recv, send, etc) that gives you
acceptable latency in practice.  Otherwise, you basically get to do
direct memory-mapped control of the applicable registers in your SOC,
because for xenomai and rtai you can't use standard kernel or syscall
interfaces in realtime context (but you can for setup/cleanup code, for
instance to get actually map MMIO regions)

The SPI hardware interface, with /dev/spidev as a userspace API, is
perfect on paper; however, I have experenced that the quality of the
driver implementation is often poor, both in latency and in, well,
actually working!  

Here are some notes about various ARM SBCs and SPI interface hardware.
Except for odroid c2, these are all my direct experience.

odroid u3: /dev/spidev working with good latency (good enough for 1kHz)
after kernel driver modifications, linuxcnc driver hm2_spi, mesa 7i90
fpga card

odroid c2: reported non-working (only supports 8-bit transfers)

odroid xu4: does not honor spidev byte order ioctl (hardcoded in
devicetree).  poor latency even after kernel driver modifications
(probably ok for 500Hz, probably not for 1kHz).  hm2_spi driver again.

raspberry pi 3: only supports 8-bit transfers.  contributed
register-level driver, confirmed working on preempt-rt (only--will need
work for other supported rtoses), hm2_rpspi

Jeff

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Sebastian Kuzminsky
On 10/13/2016 12:24 PM, Erik Friesen wrote:
> To clarify my question, I am trying to understand at what level lcnc
> accesses hardware peripherals.  For example, suppose I build a board with
> an spi dac peripheral to the arm, as well as write the kernel driver, if
> necessary.  What type of glue do I need to provide in this situation?

LinuxCNC interfaces with hardware peripherals through HAL, the Hardware 
Abstraction Layer.  Each hardware peripheral is represented by a HAL 
"component".  A HAL component is a piece of software that talks to its 
hardware and presents HAL pins to the rest of LinuxCNC.  A HAL component 
is thus a kind of device driver.  It talks to LinuxCNC via HAL pins, and 
talks to its hardware in whatever way is appropriate for that hardware.

Each HAL component runs either in "realtime" context, or "non-realtime". 
  Since you're talking about motion control and 4 kHz update rates, you 
want a realtime component.  Realtime components run in realtime threads, 
that's the "addf" stuff you see in .hal files.

Here's a diagram that shows the LinuxCNC architecture:


http://linuxcnc.org/docs/2.7/html/code/code-notes.html#_architecture_overview

Your component would sit down in the bottom left, in the "realtime 
hardware devices" box.

Realtime components can be written in C or in a domain-specific language 
called "comp".  Take a look at src/hal/drivers/hal_speaker.c and 
src/hal/drivers/serport.comp for some simple examples.

Some info on how to get started hacking on LinuxCNC are in these documents:

http://linuxcnc.org/docs/devel/html/code/contributing-to-linuxcnc.html
http://linuxcnc.org/docs/devel/html/code/building-linuxcnc.html

Feel free to ask follow-on questions if any of this is not clear.


-- 
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Stephen Dubovsky
I think the error of this approach (using N times higher accel/vel) is
coming from the piecewise linear approximations of the curves going bad.
If you try to follow a curve N times faster, then there are N times fewer
samples along that curve for a fixed time sampling period.  That introduces
errors.  There may be others but thats at least part of it.  Its the same
problem w/ discrete time vs continuous time systems.  There is divergence
between the solutions as the sampling rate goes down.


On Thu, Oct 13, 2016 at 3:08 PM, Todd Zuercher 
wrote:

> I was just working at this a little bit.   The first thing I did was to
> modify time.comp, to make a new sim_time.comp.  The sim_time.comp is
> basically just the same as the regular timer component with an input pin
> added to scale the time to what ever factor you speed up the simulation
> run.  Then I made a dummy config of one of our machines with all the
> velocities and accelerations increased by 1000x, and test ran a few things,
> the results were not quite as good as I had hoped, but were way better than
> the old estimations. Is it possible that some of the inaccuracy came from
> the fact I was running it in a VM?
>
> The timer scaling pin was a really simple mod, would there be any interest
> in adding that to the regular release?
>
> - Original Message -
> From: dan...@austin.rr.com
> To: "Enhanced Machine Controller (EMC)" 
> Sent: Thursday, October 13, 2016 2:24:53 PM
> Subject: Re: [Emc-users] Hacking a sim runtime mode
>
>
>  Chris Albertson  wrote:
> > On Thu, Oct 13, 2016 at 9:00 AM, Peter C. Wallace 
> wrote:
> > > On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:
> > >
> >
> > > I just tried a real time Mesa Ethernet config with maxvel = 12 IPM
> (2000
> > > IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel
> 2
> > > IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak
> following
> > > errors in the 1-2 mill region)
> >
> > The problem to be solved is getting an estimate of the time required
> > to complete a job.   Does the above do this accurately?
>
> Yeah I want to know this.  I can run a job for real vs "fast sim" and
> compare.  One prob is the cycle time only goes down to seconds AFAIK.  If
> it's 100x then that's over a minute and a half it could be wrong, but
> that's still good enough as long as it's not estimating a very short job.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Erik Friesen
Haas drives are basically pwm amplifiers that apparently need a 5v+- signal
120 degrees apart.  Why bother with pwm, why not just put a good spi dac
controlled from the i.mx6?  Then add a couple encoder ic's, or run a pic32
or similar to handle the qei.

On Thu, Oct 13, 2016 at 2:58 PM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> Then you would need a powerful analog amplifier, unless it is a control
> signal for a driver. An analog amplifier waste energy, a more efficient
> method is to use an inverter card and then you use the PWM module in the
> micro controller to generate signals for the inverter.
>
> You also need to chose a suitable micro controller, the high end usually
> are good for hard drives and similar but not for PWM generation. Micro
> controllers with a Cortex-M* CPU usually have support PWM generation and
> are more or less built for this purpose, they may be cheap from around $1
> each in large quantity and maybe $10-$20 for the more powerful.
>
>
>
> On Thu, 13 Oct 2016 14:24:54 -0400
> Erik Friesen  wrote:
>
> > In this scenario, the dac would be driving a bldc, so it would need to be
> > updated around 4-8khz.
> >
> > On Thu, Oct 13, 2016 at 2:24 PM, Erik Friesen  wrote:
> >
> > > To clarify my question, I am trying to understand at what level lcnc
> > > accesses hardware peripherals.  For example, suppose I build a board
> with
> > > an spi dac peripheral to the arm, as well as write the kernel driver,
> if
> > > necessary.  What type of glue do I need to provide in this situation?
> > >
> > > On Thu, Oct 13, 2016 at 1:50 PM, Nicklas Karlsson <
> > > nicklas.karlsso...@gmail.com> wrote:
> > >
> > >> On the Cortex-M* model usually used on micro controllers there use to
> be
> > >> a reference manual. Usually there is register to configure pin
> > >> functionality, GPIO is a common default value and a register to select
> > >> direction input or output.
> > >>
> > >> There use to a library but software complexity become lower by
> accessing
> > >> the registers directly unless there is a need to change things
> dynamically.
> > >> The libraries are usually written for dynamic access while software
> almost
> > >> always only have need for simpler static access. To register callback
> > >> functions at an interrupt handler is a perfect example, if the same
> > >> function(s) is registered at every startup they could be added
> statically
> > >> and it is possible to generate a call graph.
> > >>
> > >>
> > >> On Thu, 13 Oct 2016 13:27:55 -0400
> > >> Erik Friesen  wrote:
> > >>
> > >> > Resurrecting this thread, can anyone point me to docs, or other info
> > >> what
> > >> > it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On
> what
> > >> > level does this happen?  Userspace, Kernelspace, etc?  I have done a
> > >> bit of
> > >> > kernel programming for the i.mx6.
> > >> >
> > >> > On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger <
> rongin...@roadrunner.com>
> > >> > wrote:
> > >> >
> > >> > > I was helping a commercial screw machine shop that had a couple
> little
> > >> > > KX1 mills. One was getting rather tired after 5 or 6 years of
> > >> production
> > >> > > use and having repeatability problem. I was speaking with the
> general
> > >> > > manager and asked "well how long do you expect a machine to
> last?" and
> > >> > > without a hint of a smile he whipped back "40 years"
> > >> > >
> > >> > > The KX1 was installed less then 50 feet from a row of screw
> machines
> > >> > > maybe as old as I am (73 years) and they were clanking away
> dropping
> > >> > > parts into a bin.
> > >> > >
> > >> > > ron ginger
> > >> > >
> > >> > > > Who wants to use and maintain (if it is possible) an original
> CNC
> > >> control
> > >> > > > made prior to 2000 ??
> > >> > > >
> > >> > > > Dave
> > >> > > >
> > >> > >
> > >> > >
> > >> > > 
> > >> > > --
> > >> > > 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=/4140
> > >> > > ___
> > >> > > Emc-users mailing list
> > >> > > Emc-users@lists.sourceforge.net
> > >> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >> > >
> > >> > 
> > >> --
> > >> > Check out the vibrant tech community on one of the world's most
> > >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > >> > ___
> > >> > Emc-users mailing list
> > >> > Emc-users@lists.sourceforge.net
> > >> > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >>
> > >> 
> > >> --

Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Todd Zuercher
I was just working at this a little bit.   The first thing I did was to modify 
time.comp, to make a new sim_time.comp.  The sim_time.comp is basically just 
the same as the regular timer component with an input pin added to scale the 
time to what ever factor you speed up the simulation run.  Then I made a dummy 
config of one of our machines with all the velocities and accelerations 
increased by 1000x, and test ran a few things, the results were not quite as 
good as I had hoped, but were way better than the old estimations. Is it 
possible that some of the inaccuracy came from the fact I was running it in a 
VM?

The timer scaling pin was a really simple mod, would there be any interest in 
adding that to the regular release?

- Original Message -
From: dan...@austin.rr.com
To: "Enhanced Machine Controller (EMC)" 
Sent: Thursday, October 13, 2016 2:24:53 PM
Subject: Re: [Emc-users] Hacking a sim runtime mode


 Chris Albertson  wrote: 
> On Thu, Oct 13, 2016 at 9:00 AM, Peter C. Wallace  wrote:
> > On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:
> >
> 
> > I just tried a real time Mesa Ethernet config with maxvel = 12 IPM (2000
> > IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel 2
> > IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak following
> > errors in the 1-2 mill region)
> 
> The problem to be solved is getting an estimate of the time required
> to complete a job.   Does the above do this accurately?

Yeah I want to know this.  I can run a job for real vs "fast sim" and compare.  
One prob is the cycle time only goes down to seconds AFAIK.  If it's 100x then 
that's over a minute and a half it could be wrong, but that's still good enough 
as long as it's not estimating a very short job.

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Nicklas Karlsson
Then you would need a powerful analog amplifier, unless it is a control signal 
for a driver. An analog amplifier waste energy, a more efficient method is to 
use an inverter card and then you use the PWM module in the micro controller to 
generate signals for the inverter.

You also need to chose a suitable micro controller, the high end usually are 
good for hard drives and similar but not for PWM generation. Micro controllers 
with a Cortex-M* CPU usually have support PWM generation and are more or less 
built for this purpose, they may be cheap from around $1 each in large quantity 
and maybe $10-$20 for the more powerful.



On Thu, 13 Oct 2016 14:24:54 -0400
Erik Friesen  wrote:

> In this scenario, the dac would be driving a bldc, so it would need to be
> updated around 4-8khz.
> 
> On Thu, Oct 13, 2016 at 2:24 PM, Erik Friesen  wrote:
> 
> > To clarify my question, I am trying to understand at what level lcnc
> > accesses hardware peripherals.  For example, suppose I build a board with
> > an spi dac peripheral to the arm, as well as write the kernel driver, if
> > necessary.  What type of glue do I need to provide in this situation?
> >
> > On Thu, Oct 13, 2016 at 1:50 PM, Nicklas Karlsson <
> > nicklas.karlsso...@gmail.com> wrote:
> >
> >> On the Cortex-M* model usually used on micro controllers there use to be
> >> a reference manual. Usually there is register to configure pin
> >> functionality, GPIO is a common default value and a register to select
> >> direction input or output.
> >>
> >> There use to a library but software complexity become lower by accessing
> >> the registers directly unless there is a need to change things dynamically.
> >> The libraries are usually written for dynamic access while software almost
> >> always only have need for simpler static access. To register callback
> >> functions at an interrupt handler is a perfect example, if the same
> >> function(s) is registered at every startup they could be added statically
> >> and it is possible to generate a call graph.
> >>
> >>
> >> On Thu, 13 Oct 2016 13:27:55 -0400
> >> Erik Friesen  wrote:
> >>
> >> > Resurrecting this thread, can anyone point me to docs, or other info
> >> what
> >> > it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On what
> >> > level does this happen?  Userspace, Kernelspace, etc?  I have done a
> >> bit of
> >> > kernel programming for the i.mx6.
> >> >
> >> > On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger 
> >> > wrote:
> >> >
> >> > > I was helping a commercial screw machine shop that had a couple little
> >> > > KX1 mills. One was getting rather tired after 5 or 6 years of
> >> production
> >> > > use and having repeatability problem. I was speaking with the general
> >> > > manager and asked "well how long do you expect a machine to last?" and
> >> > > without a hint of a smile he whipped back "40 years"
> >> > >
> >> > > The KX1 was installed less then 50 feet from a row of screw machines
> >> > > maybe as old as I am (73 years) and they were clanking away dropping
> >> > > parts into a bin.
> >> > >
> >> > > ron ginger
> >> > >
> >> > > > Who wants to use and maintain (if it is possible) an original CNC
> >> control
> >> > > > made prior to 2000 ??
> >> > > >
> >> > > > Dave
> >> > > >
> >> > >
> >> > >
> >> > > 
> >> > > --
> >> > > 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=/4140
> >> > > ___
> >> > > Emc-users mailing list
> >> > > Emc-users@lists.sourceforge.net
> >> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >> > >
> >> > 
> >> --
> >> > Check out the vibrant tech community on one of the world's most
> >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> >> > ___
> >> > Emc-users mailing list
> >> > Emc-users@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >> 
> >> --
> >> Check out the vibrant tech community on one of the world's most
> >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >
> >
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 

Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Erik Friesen
In this scenario, the dac would be driving a bldc, so it would need to be
updated around 4-8khz.

On Thu, Oct 13, 2016 at 2:24 PM, Erik Friesen  wrote:

> To clarify my question, I am trying to understand at what level lcnc
> accesses hardware peripherals.  For example, suppose I build a board with
> an spi dac peripheral to the arm, as well as write the kernel driver, if
> necessary.  What type of glue do I need to provide in this situation?
>
> On Thu, Oct 13, 2016 at 1:50 PM, Nicklas Karlsson <
> nicklas.karlsso...@gmail.com> wrote:
>
>> On the Cortex-M* model usually used on micro controllers there use to be
>> a reference manual. Usually there is register to configure pin
>> functionality, GPIO is a common default value and a register to select
>> direction input or output.
>>
>> There use to a library but software complexity become lower by accessing
>> the registers directly unless there is a need to change things dynamically.
>> The libraries are usually written for dynamic access while software almost
>> always only have need for simpler static access. To register callback
>> functions at an interrupt handler is a perfect example, if the same
>> function(s) is registered at every startup they could be added statically
>> and it is possible to generate a call graph.
>>
>>
>> On Thu, 13 Oct 2016 13:27:55 -0400
>> Erik Friesen  wrote:
>>
>> > Resurrecting this thread, can anyone point me to docs, or other info
>> what
>> > it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On what
>> > level does this happen?  Userspace, Kernelspace, etc?  I have done a
>> bit of
>> > kernel programming for the i.mx6.
>> >
>> > On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger 
>> > wrote:
>> >
>> > > I was helping a commercial screw machine shop that had a couple little
>> > > KX1 mills. One was getting rather tired after 5 or 6 years of
>> production
>> > > use and having repeatability problem. I was speaking with the general
>> > > manager and asked "well how long do you expect a machine to last?" and
>> > > without a hint of a smile he whipped back "40 years"
>> > >
>> > > The KX1 was installed less then 50 feet from a row of screw machines
>> > > maybe as old as I am (73 years) and they were clanking away dropping
>> > > parts into a bin.
>> > >
>> > > ron ginger
>> > >
>> > > > Who wants to use and maintain (if it is possible) an original CNC
>> control
>> > > > made prior to 2000 ??
>> > > >
>> > > > Dave
>> > > >
>> > >
>> > >
>> > > 
>> > > --
>> > > 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=/4140
>> > > ___
>> > > Emc-users mailing list
>> > > Emc-users@lists.sourceforge.net
>> > > https://lists.sourceforge.net/lists/listinfo/emc-users
>> > >
>> > 
>> --
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> > ___
>> > Emc-users mailing list
>> > Emc-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread dannym

 Chris Albertson  wrote: 
> On Thu, Oct 13, 2016 at 9:00 AM, Peter C. Wallace  wrote:
> > On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:
> >
> 
> > I just tried a real time Mesa Ethernet config with maxvel = 12 IPM (2000
> > IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel 2
> > IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak following
> > errors in the 1-2 mill region)
> 
> The problem to be solved is getting an estimate of the time required
> to complete a job.   Does the above do this accurately?

Yeah I want to know this.  I can run a job for real vs "fast sim" and compare.  
One prob is the cycle time only goes down to seconds AFAIK.  If it's 100x then 
that's over a minute and a half it could be wrong, but that's still good enough 
as long as it's not estimating a very short job.

I am skeptical that the mechanisms will time themselves the same way, but I 
don't know enough to say.
 
> The problem is to get the shape of the velocity curves to be the same
> in the sim as the real job.   In a real 3D wood carving job I thing
> the mill never gets to near full speed and is always making think
> movements and accelerating.   Your sim MIGHT accelerate to quickly and
> make some parts of the work run at a constant velocity (your maximum)
> 
> Intuitively (I've not proved it to myself) you need to scale the max
> speed and acceleration by the same constant.   (But what about third
> derivative?)

I was told the MAX_JERK parameter- (third deriv) was not actually used, not in 
the main branch.  

> 
> Time estimation seem to be a missing feature.  It should not require a
> hack   I _think_ that a machine tool that has all orthogonal and
> linear axis where movement time depends only on delta-X and not on X
> (or Y or Z) then you should not require a full simulation to compute
> the job time as you can simply sumo the deltas.Note that there ARE
> many non-linear machines but mostly these are robots.

Time estimation is SUPER important to me.
1. I can tune the machine to trade off one param for another, a lower max speed 
but higher accel.  I need to know if that helps or hurts runtime, and it can 
actually change from job to job.  A large design without sharp features will go 
faster with high max vel and lower accel.
2. Similarly, I can do changes in design with more raster lines vs less, change 
size and/or depth, and need to know what the cost of that change is.  You'd be 
surprised, doubling the design's size (quadruple the area) with a ball twice 
the diameter may actually take LESS time because it's not demanding huge accels 
in and out of small features.
3. I need to plan my day.  A 2 hr carving is a different product than a 6 hr 
carving.  I need to know when it'll be done, do I run this before going out for 
dinner or will it not be done before I need to leave?  And how much to charge 
before actually doing it.  Customers like to be told a price before the work is 
done.

Danny

> -- 
> 
> Chris Albertson
> Redondo Beach, California
> 
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Erik Friesen
To clarify my question, I am trying to understand at what level lcnc
accesses hardware peripherals.  For example, suppose I build a board with
an spi dac peripheral to the arm, as well as write the kernel driver, if
necessary.  What type of glue do I need to provide in this situation?

On Thu, Oct 13, 2016 at 1:50 PM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> On the Cortex-M* model usually used on micro controllers there use to be a
> reference manual. Usually there is register to configure pin functionality,
> GPIO is a common default value and a register to select direction input or
> output.
>
> There use to a library but software complexity become lower by accessing
> the registers directly unless there is a need to change things dynamically.
> The libraries are usually written for dynamic access while software almost
> always only have need for simpler static access. To register callback
> functions at an interrupt handler is a perfect example, if the same
> function(s) is registered at every startup they could be added statically
> and it is possible to generate a call graph.
>
>
> On Thu, 13 Oct 2016 13:27:55 -0400
> Erik Friesen  wrote:
>
> > Resurrecting this thread, can anyone point me to docs, or other info what
> > it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On what
> > level does this happen?  Userspace, Kernelspace, etc?  I have done a bit
> of
> > kernel programming for the i.mx6.
> >
> > On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger 
> > wrote:
> >
> > > I was helping a commercial screw machine shop that had a couple little
> > > KX1 mills. One was getting rather tired after 5 or 6 years of
> production
> > > use and having repeatability problem. I was speaking with the general
> > > manager and asked "well how long do you expect a machine to last?" and
> > > without a hint of a smile he whipped back "40 years"
> > >
> > > The KX1 was installed less then 50 feet from a row of screw machines
> > > maybe as old as I am (73 years) and they were clanking away dropping
> > > parts into a bin.
> > >
> > > ron ginger
> > >
> > > > Who wants to use and maintain (if it is possible) an original CNC
> control
> > > > made prior to 2000 ??
> > > >
> > > > Dave
> > > >
> > >
> > >
> > > 
> > > --
> > > 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=/4140
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Nicklas Karlsson
On the Cortex-M* model usually used on micro controllers there use to be a 
reference manual. Usually there is register to configure pin functionality, 
GPIO is a common default value and a register to select direction input or 
output.

There use to a library but software complexity become lower by accessing the 
registers directly unless there is a need to change things dynamically. The 
libraries are usually written for dynamic access while software almost always 
only have need for simpler static access. To register callback functions at an 
interrupt handler is a perfect example, if the same function(s) is registered 
at every startup they could be added statically and it is possible to generate 
a call graph.


On Thu, 13 Oct 2016 13:27:55 -0400
Erik Friesen  wrote:

> Resurrecting this thread, can anyone point me to docs, or other info what
> it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On what
> level does this happen?  Userspace, Kernelspace, etc?  I have done a bit of
> kernel programming for the i.mx6.
> 
> On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger 
> wrote:
> 
> > I was helping a commercial screw machine shop that had a couple little
> > KX1 mills. One was getting rather tired after 5 or 6 years of production
> > use and having repeatability problem. I was speaking with the general
> > manager and asked "well how long do you expect a machine to last?" and
> > without a hint of a smile he whipped back "40 years"
> >
> > The KX1 was installed less then 50 feet from a row of screw machines
> > maybe as old as I am (73 years) and they were clanking away dropping
> > parts into a bin.
> >
> > ron ginger
> >
> > > Who wants to use and maintain (if it is possible) an original CNC control
> > > made prior to 2000 ??
> > >
> > > Dave
> > >
> >
> >
> > 
> > --
> > 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=/4140
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc on arm

2016-10-13 Thread Erik Friesen
Resurrecting this thread, can anyone point me to docs, or other info what
it takes to link GPIO, or SPI devices into linuxcnc on an arm?  On what
level does this happen?  Userspace, Kernelspace, etc?  I have done a bit of
kernel programming for the i.mx6.

On Thu, Mar 24, 2016 at 8:19 AM, Ron Ginger 
wrote:

> I was helping a commercial screw machine shop that had a couple little
> KX1 mills. One was getting rather tired after 5 or 6 years of production
> use and having repeatability problem. I was speaking with the general
> manager and asked "well how long do you expect a machine to last?" and
> without a hint of a smile he whipped back "40 years"
>
> The KX1 was installed less then 50 feet from a row of screw machines
> maybe as old as I am (73 years) and they were clanking away dropping
> parts into a bin.
>
> ron ginger
>
> > Who wants to use and maintain (if it is possible) an original CNC control
> > made prior to 2000 ??
> >
> > Dave
> >
>
>
> 
> --
> 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=/4140
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Chris Albertson
On Thu, Oct 13, 2016 at 9:00 AM, Peter C. Wallace  wrote:
> On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:
>

> I just tried a real time Mesa Ethernet config with maxvel = 12 IPM (2000
> IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel 2
> IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak following
> errors in the 1-2 mill region)

The problem to be solved is getting an estimate of the time required
to complete a job.   Does the above do this accurately?

The problem is to get the shape of the velocity curves to be the same
in the sim as the real job.   In a real 3D wood carving job I thing
the mill never gets to near full speed and is always making think
movements and accelerating.   Your sim MIGHT accelerate to quickly and
make some parts of the work run at a constant velocity (your maximum)

Intuitively (I've not proved it to myself) you need to scale the max
speed and acceleration by the same constant.   (But what about third
derivative?)

Time estimation seem to be a missing feature.  It should not require a
hack   I _think_ that a machine tool that has all orthogonal and
linear axis where movement time depends only on delta-X and not on X
(or Y or Z) then you should not require a full simulation to compute
the job time as you can simply sumo the deltas.Note that there ARE
many non-linear machines but mostly these are robots.
-- 

Chris Albertson
Redondo Beach, California

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Peter C. Wallace

On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:


Date: Thu, 13 Oct 2016 15:39:16 +
From: dan...@austin.rr.com
Reply-To: "Enhanced Machine Controller (EMC)"

To: andy pugh 
Cc: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Hacking a sim runtime mode

It's not actually a sim profile, it's a standard profile but the motors will be disabled. 
 Ultimately, it's essential to not have to switch to a "sim" for practicality.


Anyhow, yes- stepgen max stuff in the ini file also got increased by 100x.

I also thought about the odd effects if the PWM couldn't follow, so I tried 
decreasing DIRHOLD etc by 100x.


Danny

You probably still have something in the stepgen not scaled correctly

I just tried a real time Mesa Ethernet config with maxvel = 12 IPM (2000 
IPS = 20 MHz step rate at present 1 steps/In scaling) and maxaccel 2 
IPS/S (52 Gs) with a 1 KHz servo thread, and it works fine (Peak following 
errors in the 1-2 mill region)


_But_, as I said you can just loop back the commanded to feedback positions 
in a real config and leave the stepgen alone for a high speed run-through


 andy pugh  wrote: 

On 13 October 2016 at 15:57,   wrote:
> Well that's what I tried and described in the initial email.  100x the vel 
and accel.
>
> It ended up with a "Joint Following Error", and I'm not sure why.

Is the sim running a stepgen?

--
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



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread dannym
Are you saying that's why I got a joint following error?  

I also tried dividing the scale by 100x, so it actually doesn't demand more of 
the stepgens.  Didn't help.

Danny

 andy pugh  wrote: 
> On 13 October 2016 at 16:39,   wrote:
> > Anyhow, yes- stepgen max stuff in the ini file also got increased by 100x.
> 
> Yes, but the system knows that it can't make 100x as many steps per
> second, and thinks that it needs to to make the speeds.
> 
> -- 
> 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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread andy pugh
On 13 October 2016 at 16:39,   wrote:
> Anyhow, yes- stepgen max stuff in the ini file also got increased by 100x.

Yes, but the system knows that it can't make 100x as many steps per
second, and thinks that it needs to to make the speeds.

-- 
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread dannym
It's not actually a sim profile, it's a standard profile but the motors will be 
disabled.  Ultimately, it's essential to not have to switch to a "sim" for 
practicality.

Anyhow, yes- stepgen max stuff in the ini file also got increased by 100x.

I also thought about the odd effects if the PWM couldn't follow, so I tried 
decreasing DIRHOLD etc by 100x.

Danny

 andy pugh  wrote: 
> On 13 October 2016 at 15:57,   wrote:
> > Well that's what I tried and described in the initial email.  100x the vel 
> > and accel.
> >
> > It ended up with a "Joint Following Error", and I'm not sure why.
> 
> Is the sim running a stepgen?
> 
> -- 
> 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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread andy pugh
On 13 October 2016 at 15:57,   wrote:
> Well that's what I tried and described in the initial email.  100x the vel 
> and accel.
>
> It ended up with a "Joint Following Error", and I'm not sure why.

Is the sim running a stepgen?

-- 
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Peter C. Wallace

On Thu, 13 Oct 2016, dan...@austin.rr.com wrote:


Date: Thu, 13 Oct 2016 14:57:48 +
From: dan...@austin.rr.com
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Hacking a sim runtime mode

Well that's what I tried and described in the initial email.  100x the vel and 
accel.


It ended up with a "Joint Following Error", and I'm not sure why.

Danny


Unless the stepgen steplength timing, velocity and acceleration settings
are also scaled, a joint following error should be expected.

On the other hand a sim config with no hardware makes a lot more sense for 
this.


If you do want a real time config thats nearly identical to a working config, 
you can simply loopback the position command to the position feedback and 
ignore the stepgen hardware entirely.


 andy pugh  wrote: 

On 13 October 2016 at 04:23,   wrote:
Is there a better way, like


Possibly. You could try settting up one of the sim configs with 100x
your machine limits. (maybe even 1000x)

--
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread dannym
Well that's what I tried and described in the initial email.  100x the vel and 
accel.

It ended up with a "Joint Following Error", and I'm not sure why.

Danny

 andy pugh  wrote: 
> On 13 October 2016 at 04:23,   wrote:
> Is there a better way, like

Possibly. You could try settting up one of the sim configs with 100x
your machine limits. (maybe even 1000x)

-- 
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem upgrading from 2.7.4

2016-10-13 Thread Russell Brown
Quoth andy pugh.
>On 12 October 2016 at 17:00, Russell Brown  wrote:
>> Somethings very broken with 2.7.5+ on lucid :-(
>
>Can you clarify? Originally you said "Debian Wheezy" and now you are
>saying "Lucid"

Bah.  T'was lucid (I typed wheezy because I'm an idiot :-().

But I've bitten the bullet, installed jessie and linuxcnc 2.8 (the
attempted upgrade from lucid to precise didn't go well).

Not seen it move anything yet (I'm doing the install/setup from my desk
rather than in the workshop) but everything seems to be coming alive.

Not really a solution to the problem I was getting but most certainly a
'work around' :-)


-- 
 Regards,
 Russell
 
| Russell Brown  | MAIL: russ...@lls.com PHONE: 01780 471800 |
| Lady Lodge Systems | WWW Work: http://www.lls.com  |
| Peterborough, England  | WWW Play: http://www.ruffle.me.uk |
 

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Hacking a sim for motion type 5, eg g38.x simulated use

2016-10-13 Thread Gene Heskett
On Thursday 13 October 2016 08:32:07 Gene Heskett wrote:

If anyone might find this useful, here is the addition to core_sim.hal
that uses a timer and comp function so that code that does a G38.2, can 
be exercised on the simulated machine.

loadrt timedelay  names=probe-timer
loadrt comp   names=detect-type,comp_x,comp_y,comp_z
===
addf detect-typeservo-thread# triggers = on 5
addf probe-timerservo-thread# timedelay for probe sig
===
# simulate a probe hit
net type-motion <= motion.motion-type => convs32float.in
net type-hit <= convs32float.out => detect-type.in0 # is comp
setp detect-type.in1 5.000  # looking for a 5
net sim-probe <= detect-type.equal => probe-timer.in
setp probe-timer.on-delay 4.0
setp probe-timer.off-delay 0.001
net probe-hit <= probe-timer.out => motion.probe-input
-
I don't think it messes with anything else and I've found it quite 
usefull, as a workaround where you would normally go hit a contact and 
calculate the TLO of the tool because you know where the contact is.  Or 
even the full 3d location as I did when carving the Green & Green joints 
for the blanket chests.

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 

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Stephen Dubovsky
In a sim config, can you increase the base thread rate 100x+ w/o it knowing
its been sped up?  Disable the RTOS scheduling entirely?  It would run all
the same calcs, same HAL, same gains/accel, just no RTOS pauses between
calls.  Basically count the # of base thread cycles, multiply what you told
it the base thread time was and there is your real run time.

To try and explain this with real world numbers.  On a fast machine the
base thread, scheduled for 1kHz (=1ms) might take 5us to compute? (Im just
guessing.)  After the 5us is up, the RTOS doesn't call it again for another
95us.  Yet if you called a new base thread as soon as the last one was
finished you'd see a ~20x speed increase.  If it took 200k cycles, then the
real time would have been 200k*1ms=200s on the real machine.  Is there a
way get the sim to run as fast as possible?  In essence, run the base
thread with no rtos?

SMD

On Thu, Oct 13, 2016 at 7:41 AM, andy pugh  wrote:

> On 13 October 2016 at 04:23,   wrote:
> > Is there a better way, like
>
> Possibly. You could try settting up one of the sim configs with 100x
> your machine limits. (maybe even 1000x)
>
> --
> 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
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread Gene Heskett
On Thursday 13 October 2016 07:41:18 andy pugh wrote:

> On 13 October 2016 at 04:23,   wrote:
> > Is there a better way, like
>
> Possibly. You could try settting up one of the sim configs with 100x
> your machine limits. (maybe even 1000x)

Hijacking a thread here, but I had asked a limits (in the sim) question 
sometime this past summer and got crickets. I hacked around and got 
something similar to work on TLM (lathe mode) but mill mode is still a 
puzzle.  There seems to be zero effect from adjusting the limits in the 
simulators axis.ini vs what you get shown on screen.

And JFTR, I just found it, there are too many sims in the menu, and while 
I had setup a sim.lathe, I was still running axis.sim, not the 
asix.sim-mill with "linuxcnc -l".  Now the problem is that I had added 
some hacks to simulate a successful g38.2 function, so I'll have to find 
and move them to the -lathe and -mill trees, and nuke the generic copy.

I'll get me coat. Thanks for the trigger that made me go look again, 
Danny.
 
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 

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hacking a sim runtime mode

2016-10-13 Thread andy pugh
On 13 October 2016 at 04:23,   wrote:
> Is there a better way, like

Possibly. You could try settting up one of the sim configs with 100x
your machine limits. (maybe even 1000x)

-- 
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problem upgrading from 2.7.4

2016-10-13 Thread andy pugh
On 12 October 2016 at 17:00, Russell Brown  wrote:
> Somethings very broken with 2.7.5+ on lucid :-(


Can you clarify? Originally you said "Debian Wheezy" and now you are
saying "Lucid"

-- 
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users