Re: [Emc-users] Stepper configuration

2008-08-14 Thread Sebastian Kuzminsky
Peter suggested a fix for the 5i20 stepgen problem. I've implemented it, but I dont have access to the machine with my test hardware so this is basically untested. It compiles... If someone wants to try it out before I test it tonight, it's available here (http or bzr):

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Sebastian Kuzminsky
Sebastian Kuzminsky wrote: > My test setup consists of a PC running emc2 TRUNK. It's got a 7i43 > plugged into a parport and a 5i20 on the PCI bus. The 7i43 has two > steppers on it, and the 5i20 has 3 servos on it. > > This setup conspicuously doesnt test steppers on the 5i20 or servos on > the

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Peter C. Wallace
Peter, could you make the stepgen Rate register read/write, so I can read back the command for sanity checking? I'll do that sometime tommorow... -- Sebastian Kuzminsky Cryogenic travel has improved since then... I woke screaming in a translucent box. “There, there,” said the box. “Every

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Sebastian Kuzminsky
Jeff Epler wrote: > hm I am seeing something similar with the step generator. Its feedback > position never changes. no errors in dmesg. Yes, I can reproduce this here - stepgen doesnt work on the 5i20. Sorry guys... How embarassing. :-( My test setup consists of a PC running emc2 TRUNK. It'

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Jon Elson
Kirk Wallace wrote: > On Wed, 2008-08-13 at 12:03 -0500, Jon Elson wrote: > >>John Kasunich wrote: >> >> >>>Unfortunately, conversion from clocks to time is non-trivial, so we >>>simply report the results in clocks. The situation is getting worse, >>>not better. In the name of "progress", we n

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Jeff Epler
hm I am seeing something similar with the step generator. Its feedback position never changes. no errors in dmesg. (jmk, there's not (yet) an enable, or velocity or accel limit pins/parameters in hm2--I imagine that's why the lines are commented out) [running in an interactive halrun] halcmd: s

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Eric H. Johnson
John, I commented them out because it generated an error. I do not see pins for maxaccel with hostmot2. > # set stepgen module accel limits - get values from ini file # setp > hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL # setp > hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCE

Re: [Emc-users] Stepper configuration

2008-08-13 Thread John Kasunich
Eric H. Johnson wrote: > > # set stepgen module accel limits - get values from ini file > # setp hm2_5i20.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL > # setp hm2_5i20.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL > # setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL > I didn't read everythi

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Eric H. Johnson
Sebastian, I am getting close. I generated a single hal file for a two stepper and one pwm configuration. Currently in the ini file I have it configured for only 2 axes and references only the single hal file. The error I am getting is a following error any time I try to move an axis. I have inclu

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Geoff
On Thursday 14 August 2008 03:23, Kirk Wallace wrote: snipped > > Are there other CPU's that would better cater to realtime? Some sort of > lean, fast RISC, not designed to cope with Windows "upgrades". There are a bunch out there, just look at the number of archs that debian is available for. I

Re: [Emc-users] Stepper configuration

2008-08-13 Thread paul_c
On Wednesday 13 August 2008, John Kasunich wrote: > Unfortunately, conversion from clocks to time is non-trivial, so we > simply report the results in clocks. (get_cycles()*10^6)/cpu_khz Is that non-trivial ?? > The situation is getting worse, not better.  In the name of "progress", we > now hav

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Alex Joni
> Are there other CPU's that would better cater to realtime? Some sort of > lean, fast RISC, not designed to cope with Windows "upgrades". > There are.. not exactly CPU's.. they are called FPGA's :) Regards, Alex - This SF

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Kirk Wallace
On Wed, 2008-08-13 at 12:03 -0500, Jon Elson wrote: > John Kasunich wrote: > > > > > Unfortunately, conversion from clocks to time is non-trivial, so we > > simply report the results in clocks. The situation is getting worse, > > not better. In the name of "progress", we now have to deal with

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Sebastian Kuzminsky
Jon Elson wrote: > Sebastian Kuzminsky wrote: >> Yeah something's not right there, 190 us is way too long. >> >> >> Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I >> thought was in nanoseconds, but looking at hal_lib.c I see that it's in >> CPU clock cycles. Is that int

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Jon Elson
John Kasunich wrote: > > Unfortunately, conversion from clocks to time is non-trivial, so we > simply report the results in clocks. The situation is getting worse, > not better. In the name of "progress", we now have to deal with CPUs > that change their clock frequencies on the fly. I've e

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Jon Elson
Sebastian Kuzminsky wrote: > > Yeah something's not right there, 190 us is way too long. > > > Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I > thought was in nanoseconds, but looking at hal_lib.c I see that it's in > CPU clock cycles. Is that intentional? > > In ha

Re: [Emc-users] Stepper configuration

2008-08-13 Thread John Kasunich
Sebastian Kuzminsky wrote: > Jon Elson wrote: >> Sebastian Kuzminsky wrote: >>> If I disable the steppers on the 7i43 (with config="num_steppers=0") and >>> run it with 4 servo channels (and 24 accessible GPIOs), I get these figures: >>> >>> read time=191, tmax=203 >>> write time=190, tm

Re: [Emc-users] Stepper configuration

2008-08-13 Thread Sebastian Kuzminsky
Jon Elson wrote: > Sebastian Kuzminsky wrote: >> If I disable the steppers on the 7i43 (with config="num_steppers=0") and >> run it with 4 servo channels (and 24 accessible GPIOs), I get these figures: >> >> read time=191, tmax=203 >> write time=190, tmax=239 >> >> That's about 1 KHz. >>

Re: [Emc-users] Stepper configuration

2008-08-12 Thread Jon Elson
Sebastian Kuzminsky wrote: > Jon Elson wrote: > >>Sebastian Kuzminsky wrote: >> >>>Jon Elson wrote: >>> OK, same problem as my PPMC line, then. But, 1 KHz isn't fast enough? Or, does handling the Mesa's 72 I/O points take a lot longer than my 24? >>> >>>I haven't done speed tests o

Re: [Emc-users] Stepper configuration

2008-08-12 Thread Sebastian Kuzminsky
Jon Elson wrote: > Sebastian Kuzminsky wrote: >> Jon Elson wrote: >>> OK, same problem as my PPMC line, then. But, 1 KHz isn't fast >>> enough? Or, does handling the Mesa's 72 I/O points take a lot >>> longer than my 24? >> >> I haven't done speed tests of the 7i43 with hostmot2 for a while, bu

Re: [Emc-users] Stepper configuration

2008-08-12 Thread Sebastian Kuzminsky
Eric H. Johnson wrote: > Sebastian, > > I updated to the latest release, and started playing with hostmot2. I ran the > following commands under halcmd: > > loadrt hostmot2 loadrt hm2_5i20 config="firmware=hm_5i20 num_stepgens=2 > num_pwmgens=1 num_encoders=0" > > I then did a "show pin", whic

Re: [Emc-users] Stepper configuration

2008-08-12 Thread Eric H. Johnson
Sebastian, I updated to the latest release, and started playing with hostmot2. I ran the following commands under halcmd: loadrt hostmot2 loadrt hm2_5i20 config="firmware=hm_5i20 num_stepgens=2 num_pwmgens=1 num_encoders=0" I then did a "show pin", which returned no pins. Shouldn't I be seeing p

Re: [Emc-users] Stepper configuration

2008-08-12 Thread paul_c
Hi Sebastian On Tuesday 12 August 2008, Sebastian Kuzminsky wrote: > Hm, looks like rt_spin_lock() and friends are not exported through rtapi. Why would you want rtapi functions for spinlocks ? > It looks like it would be easy to add a bunch of functions (or maybe > preprocessor macros) to call

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Jon Elson
Sebastian Kuzminsky wrote: > Jon Elson wrote: >> >>OK, same problem as my PPMC line, then. But, 1 KHz isn't fast >>enough? Or, does handling the Mesa's 72 I/O points take a lot >>longer than my 24? > > > I haven't done speed tests of the 7i43 with hostmot2 for a while, but i > think low ones

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Sebastian Kuzminsky
Sebastian Kuzminsky wrote: > paul_c wrote: >> On Sunday 10 August 2008, Sebastian Kuzminsky wrote: >>> It looks like rtai has semaphores but doesnt support blocking in the >>> kernel (no run queues). Maybe something like spinlocks could be built >>> around the non-blocking semaphore calls. >> You

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Matt Shaver
On Sun, 2008-08-10 at 16:02 +0100, paul_c wrote: > If you read the Xilinx license.txt, you will find it goes on at length > about "copyrighted material", "trade secrets", "proprietory information", > and "Intellectual Property". Section 2 make interesting reading along side > the GPL text.. > >

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Matt Shaver
On Sun, 2008-08-10 at 08:19 -0500, Jeff Epler wrote: > I had a Xilinx92i installation on a 32-bit machine and copied it over to > a 64-bit machine. I had to revise the settings.sh file to force the > architecture to be lin, not lin64. but it does run. no idea if > installing from scratch will wo

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Sebastian Kuzminsky
paul_c wrote: > On Sunday 10 August 2008, Sebastian Kuzminsky wrote: >> It looks like rtai has semaphores but doesnt support blocking in the >> kernel (no run queues). Maybe something like spinlocks could be built >> around the non-blocking semaphore calls. > > You want one of the rt_spinlock cal

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Sebastian Kuzminsky
Jon Elson wrote: > John Kasunich wrote: >> Jon Elson wrote: >>> One way out of this would be to have this GPIO on a separate EPP >>> port (unless the GPIO hardware is the same as the motion hardware). >> >> We are talking about the Mesa FPGA based boards, with 72 I/O pins on one >> board. So yes

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Jon Elson
John Kasunich wrote: > Jon Elson wrote: > > >>One way out of this would be to have this GPIO on a separate EPP >>port (unless the GPIO hardware is the same as the motion hardware). > > > We are talking about the Mesa FPGA based boards, with 72 I/O pins on one > board. So yes, the GPIO is on

Re: [Emc-users] Stepper configuration

2008-08-11 Thread Sebastian Kuzminsky
John Kasunich wrote: > Sebastian Kuzminsky wrote: >> If RTAI supported mutexes and thread-blocking, then fast gpio access >> could be easily done even on the EPP boards. >> ... > HAL (and EMC2) uses Rate Monotonic Scheduling > (http://en.wikipedia.org/wiki/Rate_Monotonic_Scheduling) which is the >

Re: [Emc-users] Stepper configuration

2008-08-11 Thread John Kasunich
Jon Elson wrote: > One way out of this would be to have this GPIO on a separate EPP > port (unless the GPIO hardware is the same as the motion hardware). We are talking about the Mesa FPGA based boards, with 72 I/O pins on one board. So yes, the GPIO is on the same EPP bus (and the same chip)

Re: [Emc-users] Stepper configuration

2008-08-10 Thread Jon Elson
John Kasunich wrote: > > The simple fact is that the EPP bus is NOT shareable between realtime > threads. That is only one of the reasons why (in my humble opinion) the > PCI based 5i2x family is so much better than the EPP based 7i43 family. > Yes, that's certainly a major reason the hal_ppmc.c

Re: [Emc-users] Stepper configuration

2008-08-10 Thread paul_c
On Sunday 10 August 2008, Matt Shaver wrote: > 1b. I can't help but think that there is (buried under the IDE) a command > line VHDL>bit-image compiler. Command line interface is trivial enough to allow non-interactive builds.. e.g.: #! /bin/bash xst -ifn ${project}.xst -ofn ${project}.syr ngdbui

Re: [Emc-users] Stepper configuration

2008-08-10 Thread Jeff Epler
On Sun, Aug 10, 2008 at 01:17:03AM -0400, Matt Shaver wrote: > 1a. I couldn't get WebPACK to run on Linux because I'm on an x86_64 machine, > and it's ia32 only. There was the beginnings of 64 bit support (references > to non-existent directories in the install script), but even hacking the > insta

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Peter C. Wallace
On Sun, 10 Aug 2008, Matt Shaver wrote: > Date: Sun, 10 Aug 2008 01:17:03 -0400 > From: Matt Shaver <[EMAIL PROTECTED]> > To: "Enhanced Machine Controller (EMC)" > Subject: Re: [Emc-users] Stepper configuration > > On Sat, 2008-08-09 at 11:50 -0600, Sebastian

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Matt Shaver
On Sat, 2008-08-09 at 11:50 -0600, Sebastian Kuzminsky wrote: > John Kasunich wrote: > > Sebastian Kuzminsky wrote: > >> John Kasunich wrote: > >> What's a use case where it's valuable to read/write the modules separately? If I get the drift of this conversation (and that's always questionable) I

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Peter C. Wallace
On Sat, 9 Aug 2008, John Kasunich wrote: > Date: Sat, 09 Aug 2008 23:59:48 -0400 > From: John Kasunich <[EMAIL PROTECTED]> > Reply-To: "Enhanced Machine Controller (EMC)" > > To: "Enhanced Machine Controller (EMC)" > Subject

Re: [Emc-users] Stepper configuration

2008-08-09 Thread John Kasunich
Sebastian Kuzminsky wrote: > Sebastian Kuzminsky wrote: >> I could add a "threadsafe" flag to the board driver struct, which gets >> set by the board driver if the board I/O hardware is thread safe (PCI), >> and cleared if it's not (EPP). The high-level hostmot2 driver would >> examine this and

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Sebastian Kuzminsky
Sebastian Kuzminsky wrote: > I could add a "threadsafe" flag to the board driver struct, which gets > set by the board driver if the board I/O hardware is thread safe (PCI), > and cleared if it's not (EPP). The high-level hostmot2 driver would > examine this and only export the "full" read()/wr

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Peter C. Wallace
On Sat, 9 Aug 2008, Sebastian Kuzminsky wrote: > Date: Sat, 09 Aug 2008 15:13:34 -0600 > From: Sebastian Kuzminsky <[EMAIL PROTECTED]> > Reply-To: "Enhanced Machine Controller (EMC)" > > To: "Enhanced Machine Controller (EMC)" > Subject: Re: [Emc-

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Sebastian Kuzminsky
John Kasunich wrote: > [EMAIL PROTECTED] wrote: >> How valuable is it for hostmot2 to have stand-alone gpio access (for the PCI >> cards only)? It seems like sort of a klunky interface. >> >> The differentiating feature of hostmot2 is the flexible firmware, which >> solves this problem very neat

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Kirk Wallace
On Sat, 2008-08-09 at 13:17 -0400, John Kasunich wrote: ... snip > Mostly something like the arrangement Kirk Wallace has - software > stepping, using the GPIO for the step pulses. You might ask "why do > software stepping when there is hardware stepping available?" In many > cases that is a darn

Re: [Emc-users] Stepper configuration

2008-08-09 Thread John Kasunich
[EMAIL PROTECTED] wrote: > How valuable is it for hostmot2 to have stand-alone gpio access (for the PCI > cards only)? It seems like sort of a klunky interface. > > The differentiating feature of hostmot2 is the flexible firmware, which > solves this problem very neatly. So I still think the

Re: [Emc-users] Stepper configuration

2008-08-09 Thread seb
one, and the solution to the problem JMK described is to compile another firmware image. -- Sebastian Kuzminsky never be discouraged just let your nerdy flourish -Original Message- From: "Peter C. Wallace" <[EMAIL PROTECTED]> Subj: Re: [Emc-users] Stepper configuration

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Peter C. Wallace
> > Not true. Threads are interruptable, based on priority. Fast threads > are higher priority than slow ones, under the assumption that the code > in a 1mS thread might take 200uS to execute, and a 25uS thread might > need to interrupt it and run a few uS worth of code several times. Sounds lik

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Sebastian Kuzminsky
John Kasunich wrote: > Sebastian Kuzminsky wrote: >> John Kasunich wrote: >> What's a use case where it's valuable to read/write the modules separately? > > Mostly something like the arrangement Kirk Wallace has - software > stepping, using the GPIO for the step pulses. You might ask "why do > so

Re: [Emc-users] Stepper configuration

2008-08-09 Thread John Kasunich
Sebastian Kuzminsky wrote: > John Kasunich wrote: >> [EMAIL PROTECTED] wrote: >>> For now you have to build from source to get hostmot2. It will be in 2.2.6 >>> when it comes out, which might be as early as this weekend. >>> >>> Hostmot2 treats the board I/O pins differently than previous firmwar

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Sebastian Kuzminsky
John Kasunich wrote: > [EMAIL PROTECTED] wrote: >> For now you have to build from source to get hostmot2. It will be in 2.2.6 >> when it comes out, which might be as early as this weekend. >> >> Hostmot2 treats the board I/O pins differently than previous firmwares & >> drivers. High-level func

Re: [Emc-users] Stepper configuration

2008-08-09 Thread John Kasunich
[EMAIL PROTECTED] wrote: > For now you have to build from source to get hostmot2. It will be in 2.2.6 > when it comes out, which might be as early as this weekend. > > Hostmot2 treats the board I/O pins differently than previous firmwares & > drivers. High-level functions like stepgen, pwmgen,

Re: [Emc-users] Stepper configuration

2008-08-09 Thread seb
" <[EMAIL PROTECTED]> Subj: Re: [Emc-users] Stepper configuration Date: Sat 2008 Aug 9 7:19 Size: 1K To: "'Enhanced Machine Controller (EMC)'" Sebastian, Thanks. A couple more questions. 1> I assume I will have to build from source to use hostmot2? 2

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Peter C. Wallace
On Sat, 9 Aug 2008, Eric H. Johnson wrote: > Date: Sat, 9 Aug 2008 09:19:44 -0400 > From: Eric H. Johnson <[EMAIL PROTECTED]> > Reply-To: "Enhanced Machine Controller (EMC)" > > To: "'Enhanced Machine Controller (EMC)'" > Subject

Re: [Emc-users] Stepper configuration

2008-08-09 Thread Eric H. Johnson
Sebastian, Thanks. A couple more questions. 1> I assume I will have to build from source to use hostmot2? 2> On an m5i20, how do you use the general purpose I/O? I don't see, for instance, the equivalents of: addf m5i20.0.misc-update servo-thread 1 addf m5i20.0.digital-in-read servo-thread 1 add

Re: [Emc-users] Stepper configuration

2008-08-08 Thread Sebastian Kuzminsky
Eric H. Johnson wrote: > Do you know anything about hostmot2? I see it has step and pwm, but did not > see a sample configuration on how to use it. Is it completed or still a work > in progress? hostmot2 is still a work in progress, but i think it's ready for more widespread testing. I've added

Re: [Emc-users] Stepper configuration

2008-08-08 Thread Eric H. Johnson
John, >> Something does not compute here. If scale is 1280 (that means 1280 counts per inch), then at one step per millisecond, you should get 1000/1280 = about 0.8 inches per second, not 2.5. << Yes, I realized it as soon as I posted it, but the error wasn't big enough to matter so I did not p

Re: [Emc-users] Stepper configuration

2008-08-08 Thread John Kasunich
Eric H. Johnson wrote: > Hi all, > > I am trying my first stepper configuration, but also need a 5khz pwm, so I > am using the m5i20 controller rather than the other more typical stepper > configurations. I created a hybrid configuration which mostly works, except > the stepper motors are running

[Emc-users] Stepper configuration

2008-08-08 Thread Eric H. Johnson
Hi all, I am trying my first stepper configuration, but also need a 5khz pwm, so I am using the m5i20 controller rather than the other more typical stepper configurations. I created a hybrid configuration which mostly works, except the stepper motors are running much to slowly and stop moving enti