Re: [Emc-users] threading Z oscillation depends on encoder PPR

2009-10-23 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Fri, 23 Oct 2009, Sebastian Kuzminsky wrote:
> 
>> The hm2 driver does not currently support encoder x1 mode.  Look for it
>> later this fall.
> 
> unless this is another sematic issue, x1 mode (count on only one edge 
> bidirectional counter mode) is supported, its a totally hardware option (the 
> driver is not involved)

It's more of a "seb's an idiot" issue.

I now understand that the hm2 driver already supports x1 mode, and has 
since Jeff added it a year ago, and that x1 quadrature mode the same as 
what the manpage calls "step/dir" mode.

I've updated the hostmot2 manpage (in trunk and 2.3) to clarify this.


-- 
Sebastian Kuzminsky
the sky calls to us -- carl sagan
<http://www.youtube.com/watch?v=zSgiXGELjbc>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] threading Z oscillation depends on encoder PPR

2009-10-23 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Fri, 23 Oct 2009, Michael Haberler wrote:
>> Am 23.10.2009 um 20:07 schrieb Peter C. Wallace:
>>>
>>> Set counter_mode true for x1 mode...
>> I assumed a q-decoder in x1-mode is still a q-decoder which gives
>> position *and* direction which is why ignored that option..
> 
> Its still is a quadrature decoder but it only counts on one edge (rising edge 
> of A in this case, state of B on rising edge of A determines direction)

Ok, i was confused, as usual.  I didnt realize that x1 quadrature and 
step/dir is the same wave form.  Thanks for setting me straight again 
Peter.  I'll update the manpage to note this behavior.


-- 
Sebastian Kuzminsky
the sky calls to us -- carl sagan
<http://www.youtube.com/watch?v=zSgiXGELjbc>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] threading Z oscillation depends on encoder PPR

2009-10-23 Thread Sebastian Kuzminsky
Michael Haberler wrote:
> How do I go about putting a hm2 encoder in x1-mode ?

The hm2 driver does not currently support encoder x1 mode.  Look for it 
later this fall.


-- 
Sebastian Kuzminsky
the sky calls to us -- carl sagan
<http://www.youtube.com/watch?v=zSgiXGELjbc>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] threading Z oscillation depends on encoder PPR

2009-10-23 Thread Sebastian Kuzminsky
Michael Haberler wrote:
> I concur that having position-interpolated in the hardware drivers  
> would be most valuable (hm2 for me, but missing as well)

It *would* be a good feature to have.  I'll put this on The List.  ;-)


-- 
Sebastian Kuzminsky
the sky calls to us -- carl sagan
<http://www.youtube.com/watch?v=zSgiXGELjbc>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2 7i43 config file request

2009-10-15 Thread Sebastian Kuzminsky
P.J. Marsh wrote:
> I currently have a parport / stepper CNC mill that I am in the process of 
> upgrading to a 7i43 controller. Would anyone on the list who has a stepper 
> driven system controlled by a 7i43 be able to mail me their configs, I just 
> want to have a look at some one elses working setup before doing my machine.

Hi there, a sample config with steppers connected to a 7i43 is included 
with emc2.  Look at hm2-stepper/7i43.ini.  Poke in your stepper timing 
parameters and give it a whirl!


> My machine has a short write up on wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Pjm - 
> the 7i43 should enable much better spindle encoder speeds to be read, there 
> by 
> improving the closed loop spindle speed control etc.

That should work.

The hm2-stepper sample config does not include an encoder counter, but 
it's easy to add, just change the [HOSTMOT2]CONFIG field to include 
"num_encoders=1".  If you're using step&dir to control the spindle, then 
add another stepgen output by changing the current "num_stepgens=3" to 
"num_stepgens=4".

Look in the dmesg to see which of the 7i43's pins have what signals.

There should be plenty of I/O left over for your limit switches and 
pendant if you want to move that to the 7i43 too.


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hostmot2 servo on 5i20/7i40 - cannot change INPUT_SCALE

2009-10-14 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> But ... after reading your previous mail and re-thinking about the 
> FERROR and MIN_FERROR I have seen the light.
> The 0.025 mm/rev system had  0.12 mm/count on the encoder but with 
> 2.5 mm/rev this now is 0.0012 mm/count. But a MIN_FERROR of 0.001 is 
> then of course smaller than the resolution of the encoder.
> In order to have the same system as before I need to multiply both error 
> values by 100.

Ah, that makes sense!

Glad you figured it out  :-)


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hostmot2 servo on 5i20/7i40 - cannot change INPUT_SCALE

2009-10-13 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> Sebastian Kuzminsky wrote:
>>  <http://linuxcnc.org/docs/devel/EMC2_Integrator_Manual.pdf>
>>   
> 2.2 explains the basic concept. Section 29 goes a bit deeper into tuning 
> of the PID constants but OUTPUT_SCALE and MAX_OUTPUT are not mentioned 
> over there.

OUTPUT_SCALE and MAX_OUTPUT are described briefly in section 7 of that 
document.

The hm2-servo configs set both of them to 1.0, and that's probably a 
reasonable value.  MAX_OUTPUT is the biggest value that the pid 
component can specify for the hm2 pwmgen value input.  The hm2 pwmgen 
divides its value input by its scale (OUTPUT_SCALE, 1.0), and the result 
becomes the PWM duty cycle.

So setting both the pid.maxoutput and the hm2 pwmgen.scale to 1.0 means 
that the pid output gets clipped to [ -1.0, +1.0 ], and directly 
corresponds to the PWM duty cycle.


> If the PID tuning is done for a given system I should be able to change 
> the unit dimensions without touching the PID parameters: PID parameters 
> are dependent on the electronic and the mechanical properties, not the 
> unit size.

The PID parameters in the hm2-servo sample config will be useless for 
your machine, and it's only coincidence that they worked at all. 
Especially with servo machines, you need to customize the config for 
your particular hardware.

The best tool i know of for this kind of stuff is halscope.  You can 
start halscope from axis or from the shell's command-line.  You can use 
it to look at all of emc2's controlled variables, like the commanded and 
actual position, the following error, the pwm duty cycle the 5i20 is 
emitting, PID tuning parameters, etc.

I'd start by setting the following error limit very high, like 10 mm or 
so, so emc2 doesnt keep shutting you down while you're tuning it.  Then 
use MDI to move the axis less than the ferror limit, while watching the 
servo/PID behavior in halscope.

But take my advise with a grain of salt, since i've never actually tuned 
a servo...  ;-)

The topic of servo tuning comes up periodically on this mailing list, a 
search of the archives may yield better suggestions.


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hostmot2 servo on 5i20/7i40 - cannot change INPUT_SCALE

2009-10-13 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> The 7i40 boards arrived today, hooked one up on my 5i20 card.
> I copied the hm2-servo config and this works - I can move my motors at 
> slower speeds without any problem.

That's good.  :-)


> But ... the config specifies LINEAR_UNITS = inch and INPUT_SCALE = 81920 
> and with LINEAR_UNITS = mm and my 512 cpr encoder this results in 0.025 
> mm/rev - which should be 2.5 mm/rev
> So I changed INPUT_SCALE to 819.2, this makes the encoder work as 
> expected: with the motor not powered I can turn the motor 20 revs which 
> results in 50mm displacement on screen.

Sounds good.  Your encoder has 512 lines, so it produces 2048 pulses per 
revolution.  Your machine is metric, so INPUT_SCALE is counts/mm, which 
is 2048 counts/rev / 2.5 mm/rev = 819.2 counts/mm.

You've verified that with the machine in E-stop, you can turn the 
leadscrew by hand and the emc2 DRO correctly tracks the movement. 
That's half the problem solved.  :-)


> Somehow I can not get my motors working from this point on. Anything I 
> do results in a "joint following" error. As soon as I power my motor the 
> slightest push on the motor results in the error.

It's expected that with the machine *out* of E-stop, manually turning 
the leadscrew should cause a following error.  After all, emc2 now 
thinks it's controlling the machine, and it made an un-commanded move. 
So that's good too.


Now you're in the tricky world of servo tuning...  This is something i 
dont know much about, but i would start here:

 <http://linuxcnc.org/docs/devel/EMC2_Integrator_Manual.pdf>

Specifically, section 2.2 talks about servos and servo tuning.


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] HAL setup of Mesa 4i65

2009-10-09 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Fri, 9 Oct 2009, Sebastian Kuzminsky wrote:
>> The driver looks for boards with the Device ID of the PCI9030
>> (10b5:9030) and the Subsystem ID of the 5i20 (10b5:3131) or 4i65
>> (10b5:3132).
>>
>> Any 9030's lacking these Subsystem IDs will be ignored by the driver.
> 
> Which is very puzzling, how can the driver load with these crazy BARs?

In Dave Camarillo's situation, the hm2_pci driver loads but does not 
initialize any boards.  It's happy at load-time because it doesnt make 
any expectations about what boards to expect -- it uses the PCI hotplug 
system to learn about boards, and it's happy waiting for boards to appear.

This may not be the right design decision, but that's how it currently 
works.


> I am going to try a 4I65 in my test setup later today (later than I thought 
> -- 
> sheep emergency...)

I think i'll duck out of any sheep-related activities  ;-)


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] HAL setup of Mesa 4i65

2009-10-09 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> Another possibility is that theres another PCI9030 chip in the system (does 
> the driver skip these cards?)

The driver looks for boards with the Device ID of the PCI9030 
(10b5:9030) and the Subsystem ID of the 5i20 (10b5:3131) or 4i65 
(10b5:3132).

Any 9030's lacking these Subsystem IDs will be ignored by the driver.


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] HAL setup of Mesa 4i65

2009-10-08 Thread Sebastian Kuzminsky
Dave Camarillo wrote:
> I'm trying to bring up a 4i65 card on a PC-104+ stack and am having a
> little trouble with the hal driver load process. When I load the

Cool, PC/104!  :-)


> Running EMC 2.2.4-pre, latest git clone

I think you mean 2.4~pre?  Latest out of the git master branch?


> halcmd: loadrt hostmot2
> halcmd: loadrt hm2_pci config="firmware=hm2/4i65/SVST8_4.BIT
> num_encoders=2 num_pwmgens=0 num_stepgens=3"
> halcmd: show all

Hm, we should have definately seen a bunch of pins and stuff here.  All 
the commands look good up to this point.


> Dmesg
> [ 4001.518223] hm2: loading Mesa HostMot2 driver version 0.15
> [ 4001.540869] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.6

I'd like to see the rest of the dmesg after this.  Is there anything 
else from the hm2 subsystem?


> Partial output from lspci -vvnn
> 01:07.0 Bridge [0680]: PLX Technology, Inc. PCI9030 32-bit 33MHz PCI
> <-> IOBus Bridge [10b5:9030] (rev 0a)
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
>> TAbort- SERR-  Interrupt: pin A routed to IRQ 15
> Region 0: Memory at fddff000 (32-bit, non-prefetchable) [size=128]
> Region 1: I/O ports at ef00 [size=128]
> Region 2: Memory at fdc0 (32-bit, non-prefetchable) [size=1M]
> [virtual] Expansion ROM at fdb0 [disabled] [size=64K]
> Capabilities: [40] Power Management version 1
> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0+,D1-,D2-,D3hot+,D3cold-)
> Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> Capabilities: [48] #06 [0080]
> Capabilities: [4c] Vital Product Data

This lspci output looks wrong to me.

First, it looks like it's missing the second line.  I'm expecting an 
important line beginning with "Subsystem:", just before the "Control:" 
line.  Did something get lost in the cut-n-paste?  It's happened before 
that the Subsystem info was set wrong, and it would cause the driver to 
not recognize the card.

Also, it's missing Region 5, which is supposed to be 64K of memory... 
This might be because the board has the wrong Subsystem info, and the 
driver never gets ahold of it to call pci_enable() on it.


-- 
Sebastian Kuzminsky

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 7I33 and mesa 5I20

2009-09-12 Thread Sebastian Kuzminsky
Klemen Ozebek wrote:
> there is my hal file
> 
> # hostmot2 driver
> loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1
> debug_pin_descriptors=1 debug_modules=1

You probably dont need all those debug flags enabled.  It wont hurt 
anything, but it will spew a bunch of stuff you dont care about to the 
logs at startup.


> # load low-level driver
> loadrt hm2_pci config="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4
> num_pwmgens=4 num_stepgens=0"
> 
> #load threads
> loadrt threads name1=tt period1=1 name2=tt2 period2=10

10,000 ns is a *very* fast thread.  Below you add a lot of stuff to it, 
so i'm guessing your machine becomes pretty unresponsive when you run 
this hal file.  100,000 or 1,000,000 is more typical.


> #naložimo pyvcp ter počakamo da se le ta zažene
> 
> loadusr -Wn iotest pyvcp -c iotest iotest.xml
> 
> addf hm2_5i20.0.read tt
> addf hm2_5i20.0.write tt
> 
> addf hm2_5i20.0.read_gpio tt
> addf hm2_5i20.0.write_gpio tt
> addf hm2_5i20.0.pet_watchdog tt

Since you have the .read and .write functions in this thread, there is 
no need to have the .read_gpio and .write_gpio functions.  .read reads 
everything and .write writes everything, including gpios.  The 
.read_gpio and .write_gpio functions were added so that people who 
wanted to read *just* the gpios could do that (for example, for probing 
in a fast thread).


> setp hm2_5i20.0.watchdog.timeout_ns 1000

The longest watchdog timeout is just over 4 seconds.  1 second should be 
plenty.


(snip the encoder stuff)
> # DACs
> 
> setp hm2_5i20.0.pwmgen.00.output-type 3
> setp hm2_5i20.0.pwmgen.01.output-type 3
> setp hm2_5i20.0.pwmgen.02.output-type 3
> setp hm2_5i20.0.pwmgen.03.output-type 3

Selecting PDM mode.


> setp hm2_5i20.0.pwmgen.00.scale 1
> setp hm2_5i20.0.pwmgen.01.scale 1
> setp hm2_5i20.0.pwmgen.02.scale 1
> setp hm2_5i20.0.pwmgen.03.scale 1

The .scale parameter determines how the .value pin is converted into a 
PWM/PDM duty cycle:  dc = value / scale.  The effective range of duty 
cycle is from -1 to +1.

So with this configuration, any value on the .value pin greater than 1.0 
will result in 10V output from the 7i33.  A value of 0.5 should result 
in 5V being output, etc.

Is that not what you're seeing?


-- 
Sebastian Kuzminsky
any sufficiently analyzed magic is indistinguishable from science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 7I33 and mesa 5I20

2009-09-12 Thread Sebastian Kuzminsky
Chris Radek wrote:
> On Sat, Sep 12, 2009 at 05:27:00PM +0200, Klemen Ozebek wrote:
>> Hello everybody,
>>
>> i have a problem with analog output from 7I33 mesa analog interface. If i'm
>> testing outputs with old mesa drivers i get desired signal from analog
>> output, but if i use hostmot2 driver, i just get 0 and for any other value
>> 10V. What i'm doing wrong?
> 
> Not posting your HAL settings along with your question!
> 
> (But really, maybe your scale is wrong.)

Could be scale, or it could be pwm_frequency (default is 20 KHz, but the 
7i33 wants 192 KHz i think).


-- 
Sebastian Kuzminsky
any sufficiently analyzed magic is indistinguishable from science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] (RTAI?) error on initial attempt to tickle 5i20

2009-09-04 Thread Sebastian Kuzminsky
Erik Christiansen wrote:
> $ halrun
> halcmd: loadrt hostmot2
> halcmd: loadrt hm2_pci config="/lib/firmware/hm2/5i20/SVST8_4.BIT \
> num_encoders=3 num_pwmgens=3 num_stepgens=0"
> 
> $ lsmod
> Module Size  Used by
> hm2_pci9116  0
> hostmot2  56320  1 hm2_pci
> hal_lib   36248  2 hm2_pci,hostmot2
> ...
> 
> And in /var/log/syslog, I find:
> 
> hm2_pci: discovered 5i20 at :00:08.0

Wow, you fixed it!  What did you change to get the 5i20 to be discovered?


> Though it didn't like the SVST8_4.BIT which I offered it:
> 
> hm2/hm2_5i20.0: invalid token in config string:
> "/lib/firmware/hm2/5i20/SVST8_4.BIT"
> hm2_5i20.0: board fails HM2 registration
> hm2_pci: probe of :00:08.0 failed with error -22
> 
> However, pasting the config pathname from /var/log/syslog to the
> commandline, we have:
> 
> $ ls -l /lib/firmware/hm2/5i20/SVST8_4.BIT
> -rw-r--r-- 1 root root 167061 2009-07-27 00:06 
> /lib/firmware/hm2/5i20/SVST8_4.BIT
> 
> So the "invalid token" is quite inscrutable at this stage.

The firmware finder program looks in /lib/firmware, so you need to tell 
it just "hm2/5i20/SVST8_4.BIT".


-- 
Sebastian Kuzminsky
any sufficiently analyzed magic is indistinguishable from science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] (RTAI?) error on initial attempt to tickle 5i20

2009-09-03 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> Snip
>> Debug file information:
>> hm2-servo.hal:46: parameter or pin 'hm2_5i20.0.pwmgen.pwm_frequency' not 
>> found
>>
> 
> ^^
> This probably means the firmware did not load for some reason...

Peter is right.  Also, there's this the dmesg you helpfully included:

> [ 1013.394259] hm2: loading Mesa HostMot2 driver version 0.15
> [ 1013.403985] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.6
> [ 1013.954991] hm2_pci: driver unloaded
> [ 1013.963593] hm2: unloading

The first line is the hostmot2 driver loading and the second line is the 
hm2_pci driver loading.  The hm2_pci driver did not see any boards it 
recognized.  Then half a second later emc2 has errored out (the 
"pwm_frequency not found" error above) and everything gets unloaded.

What does "lspci -vvnn" say?


-- 
Sebastian Kuzminsky
any sufficiently analyzed magic is indistinguishable from science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] m5i20 watchdog is biting

2009-08-28 Thread Sebastian Kuzminsky
John Figie wrote:
> Hi,  I think I am real close to getting this to work but...
> 
> I am having 2 problems with emc2, I don't know if they are related but I 
> suspect that they are:
> 
> 1) I have created a test.hal file that I have been using without emc2 so that 
> I can test my I/O, run servos open loop, and tune my PID gains.  This file 
> runs fine except the first time I run it after a cold boot of the computer.  
> After a cold boot and loading the file into hal using "halrun -I -f test.hal" 
> the watchdog.has.bit always starts as TRUE and the I/O does not work.  If I 
> exit hal and then rerun the command everything is fine and I can control the 
> I/O. Or, if I don't exit and just reset the bit in hal then everything is 
> fine from that point on until I turn off  the computer.
> 
> 2) I have made a m5i20.ini file for my machine and another hal file made from 
> test.hal so that I can run emc2.  When I start emc2 using m5i20.ini the 
> initialization seems to load the stuff in the hal file without errors but 
> then has problems starting.  I get an error:
>  "Invalid configuration of axes is preventing emc from starting"
>  
>  Looking at the dmesg output I see something about the watchdog.bit that 
> Doesn't look good:
>  [11773.532552] hm2_5i20.0: initialized AnyIO board at :00:09.0
> [11774.744518] hm2/hm2_5i20.0: Watchdog has bit! (set the .has-bit pin to 
> False to resume)
> [11893.995647] hm2/hm2_5i20.0: trying to recover from IO error or Watchdog 
> bite
> [11893.995653] hm2/hm2_5i20.0: error recover successful!
> [11942.947460] hm2_5i20.0: dropping AnyIO board at :00:09.0
> [11942.947468] hm2/hm2_5i20.0: unregistered
> 
> I have tried a number of things to fix this but have been unsuccessful.
> 
> Part of my problem may be that I don't really completely understand what goes 
> on in hal.  When I "addf hm2_5i20.0.pet_watchdog servo-thread" when does this 
> actually start running periodically?  I am assuming after the "start" in hal, 
> but even though I "setp hm2_5i20.0.watchdog.has_bit FALSE" just before the 
> start, it still doesn't seem to work correctly.
> 
> I have placed the m5i20.ini at http://pastebin.ca/1546296
> bridgeportS2I2.hal + dmesg output is http://www.pastebin.ca/1546441

Here's how the hostmot2 watchdog currently works.  When the hm2_pci 
driver is first loaded, the card and firmware are reset to a sane 
starting state, the watchdog timeout is initialized to 1 second, and the 
watchdog timer starts ticking.  If the pet-watchdog function is not run 
before the timer expires, the watchdog bites.  The only way that the 
pet-watchdog function can run is if you add it to a thread (with "addf") 
and start the threads running (with "start").

In your bridgeport hal file, you load the hm2_pci driver (which starts 
the watchdog timer).  You add the pet-watchdog function to the servo 
thread, but you dont start it running.  You then load a bunch of other 
stuff, including slow userspace things, and down at the bottom there's a 
commented-out "start".

With that hal file i'd expect a watchdog bite every time.  I assume you 
manually run start after loading that HAL file, and then manually clear 
the bite.  I dont see how you could ever not get a watchdog bite right 
away with that setup (and the current driver).

If you dont comment out the start in bridgeport.hal, i bet it'll work 
better.  Unless the userspace things are so slow that it takes more than 
a second to get from the loadrt "hm2_pci" to the "start".  In which case 
you might run "start" first, then load the other things.


It might be nice if the driver didnt set the watchdog timer until the 
realtime subsystem was started...  And then set it to something nice and 
short, like a small multiple of the servo period.


-- 
Sebastian Kuzminsky
any sufficiently analyzed magic is indistinguishable from science

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot firmware question

2009-08-21 Thread Sebastian Kuzminsky
Eric H. Johnson wrote:
> I will try to get some more information over the next few days. If you would
> like to see the configuration, I have posted it here:
> http://pastebin.com/m2760010c

Great, thanks for posting that!

A couple of comments on that config:

It looks like it was based off an older, somewhat buggy hm2-servo 
config.  Specifically, the [AXIS_*]OUTPUT_SCALE is not used by the 
hm2-servo.hal file.

The [AXIS_X]MAX_VELOCITY is used in the hal file as pid.X.maxoutput, 
which i think is wrong.  Oops, i just noticed that the standard 
hm2-servo config does the same, i'll check in a fix for that.

The [AXIS_*]INPUT_SCALE values look strange.  Is that really what the 
encoders are producing?

The [AXIS_*]FERROR and MIN_FERROR look very large to me.  Is it really 
acceptable for the machine to be a quarter inch off while feeding?

In hm2-servo.hal, the hostmot2 driver is loaded with all debugging flags 
turned on, that's probably not needed.  Oops, i just noticed that the 
standard hm2-servo config does the same, i'll check in a fix for that 
too.  ;-)

Wow, this machine has a GlueGun?  :-)


> The servo portion is basically right out of the example. An easy thing to
> try might be to disable hal_joystick. After that, I guess they will need to
> start learning how to use halscope.

Yes, i think trying it without the joystick would be a good experiment 
to do.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot firmware question

2009-08-20 Thread Sebastian Kuzminsky
Eric H. Johnson wrote:
> Peter,
> 
> Thanks. That is basically what I thought. It has been reported to me that,
> in a servo / encoder system, if EMC is shut down, then one or more axes are
> moved and finally EMC is restarted, upon clearing the e-stop a runaway
> condition occurs (at least sometimes). I have to get more information, but I
> thought perhaps the Mesa board was holding onto the position information
> while EMC was not running, and then once the e-stop is cleared, tries to
> move to the initial position (i.e. 0,0,0).

This is the first time i've heard of this problem, and it's not at all 
what i would expect.  When emc2 is restarted, it reloads the hostmot2 
firmware into the Mesa board and clears all the encoders, so any 
movements that happened before that time are completely lost.  After 
that it tracks position, and shouldnt get confused by e-stop or anything 
else.

Can you provide any more details?


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Code help

2009-08-03 Thread Sebastian Kuzminsky
Rich Amaral wrote:
> Hi guys,
> 
> I'm looking through the code and can't seem to find the following files:
> 
> rcs.hh
> rcs_print.hh
> timer.hh
> 
> I believe I have the entire tree. Any help?

You can find files with the "find" command (run "man find" for the full 
manual page):

0 s...@water /home/seb/emc2.git>  find . -name rcs.hh
./src/libnml/rcs/rcs.hh
0 s...@water /home/seb/emc2.git>  find . -name rcs_print.hh
./src/libnml/rcs/rcs_print.hh
0 s...@water /home/seb/emc2.git>  find . -name timer.hh
./src/libnml/os_intf/timer.hh
0 s...@water /home/seb/emc2.git>


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2

2009-08-03 Thread Sebastian Kuzminsky
Hubert Bahr wrote:
> I have a one man hobby shop with multiple machines, I really don't 
> anticipate having them running simultaneously, but I plan on leaving 
> them hooked up thus multiple 7I43.  Since HostMot2 doesn't use the USB 
> is there any advantage of getting models with the USB port other than as 
> possibly a power source?  Would there be any advantage to getting the 
> larger Spartan device?  Does the Xilinx ISE recognize this card for 
> programing or do we need to use Mesa supplied software for that purpose?

On my test system, i have a USB cable from the PC to the 7i43 just for 
power, exactly as you say.  The 7i43 does have a dedicated power input, 
so you dont have to use USB for power if you dont want to, just be 
careful because the 7i43 power plug looks like a "small ATX-style" power 
connector like you might find on a standard ATX power supply, but the 
pin-out is different.

There is *currently* no advantage to getting the bigger 400 Kgate 7i43 
vs the smaller 200 Kgate one.  All currently available firmwares fit in 
the smaller FPGA, the limiting factor is I/O pins, not gates.  In the 
future, there *may* be new firmwares that fit in the 400 but not the 200...

For programming the device...  If you're talking about sending a 
compiled firmware image to the 7i43, the hostmot2 driver does that when 
you start emc2.  If you're talking about compiling custom VHDL code into 
a firmware image, the Xilinx software does that.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2 a pimer please?

2009-08-02 Thread Sebastian Kuzminsky
cmg...@sover.net wrote:
> Are step and direction "pulses" present at the parallel port just ignored
> in this system of "Mesa Cards and Hostmot2" ?

When using the 7i43, emc2 does *not* make pulses on the parallel port. 
Instead it sends commands via the parallel port to the 7i43 (which 
*does* make the pulses).


> What system handles pulse duration and direction hold time?  Is that all
> in the FPGA or is EMC2 in control via the ini files?

The step pulse timing are put into the .ini & .hal files by the person 
building the machine.  They're read by emc2 at init time and sent to the 
hostmot2 driver, which sends them to the FPGA.  The FPGA then ensures 
that the pulse train it emits does not violate the timing specs.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2 a pimer please?

2009-08-02 Thread Sebastian Kuzminsky
cmg...@sover.net wrote:
> Where then are the way points produced?
> 
> After G-code and before hostmot2..   What is it?  (Please excuse my
> lack of experience...)
> 
> It makes perfect sense to me that The Field Programmable device could
> accomplish a hardware/firmware improvement this way.
>  But how does one control the way point optimization?  Or is the present
> system proven "best" in all situations?

I'm not sure what you mean by "waypoint optimization".

The waypoints are computed by a component called the "trajectory planner".

Look at the "EMC Components" picture on this page: 
<http://www.linuxcnc.org/content/view/42/13/lang,en/>

In EMCTASK, the g-code program is interpreted and converted into a 
sequence of "canonical commands", which are fully digested motion commands.

The canonical commands go from there to EMCMOT, which is the motion 
controller.  In EMCMOT, the canonical motion commands get turned into 
waypoints, and passed (via HAL) to the hostmot2 driver.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2 a pimer please?

2009-08-02 Thread Sebastian Kuzminsky
cmg...@sover.net wrote:
> Ahh
> 
> An interpreter tucked in  hostmot?

No, hostmot2 is way simpler than that.

The interpreter eats G-code and emits a sequence of waypoints (sort of). 
  The hostmot2 driver takes in those waypoints and commands the FPGA to 
step (or run the servo) appropriately to attain the waypoints.


>> cmg...@sover.net wrote:
>>>   Can you  (or any others) tutor (Or point to some reference reading) on
>>> how the the hardware and firmware of these Mesa boards can provide step
>>> pulses "faster" than the parallel port?  My simple mind says "the board
>>> needs the step commands first, how can it direct the motors if it is
>>> still waiting for it's own commands".
>> The trick is this: the command from emc2 to the 7i43 (or 5i20, or ...)
>> is *not* "take a step", it's "keep stepping *at* *this* *rate* until i
>> tell you otherwise".
>>
>> If you're familiar with the emc2 thread architecture, think of it as
>> running the base thread on the FPGA.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2 a pimer please?

2009-08-02 Thread Sebastian Kuzminsky
cmg...@sover.net wrote:
>   Can you  (or any others) tutor (Or point to some reference reading) on
> how the the hardware and firmware of these Mesa boards can provide step
> pulses "faster" than the parallel port?  My simple mind says "the board
> needs the step commands first, how can it direct the motors if it is
> still waiting for it's own commands".

The trick is this: the command from emc2 to the 7i43 (or 5i20, or ...) 
is *not* "take a step", it's "keep stepping *at* *this* *rate* until i 
tell you otherwise".

If you're familiar with the emc2 thread architecture, think of it as 
running the base thread on the FPGA.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7I43 use with EMC2

2009-08-02 Thread Sebastian Kuzminsky
Hubert Bahr wrote:
> Does HostMot2 work over the usb port?  Can I use both Step&Dir and 
> encoder modules at the same time?  Can we use more than one 7I43 with 
> one computer?  How does the performance of the system compare between 
> HostMot2 and just software generated step and direction?

HostMot2 does not use the USB port at all - only an EPP parallel port.

You can use any combination of Step/Dir outputs, PWM outputs, and 
Quadrature encoder inputs.  For example, the "SVST4_4" firmware for the 
7i43 supports 4 Servos (each servo is one encoder input and one pwm 
output) and 4 Steppers (Step/Dir output), plus 16 GPIO pins (for limit 
switches etc).  You can dynamically disable individual stepgens, 
pwmgens, and encoders, and their pins become additional gpios.

You can have one 7i43 per EPP parallel port, there's no real limit to 
how many you can run at a time.  Just realize that EPP communication is 
quite slow, and it takes something like 100-200 microseconds to service 
each 7i43.  This is fast compared to emc2's normal 1 KHz servo loop, but 
still  If you need more IO than one 7i43 provides, you should 
consider using a 5i20.  The cost of one PCI parport board and two 7i43s 
is not *that* much less than the cost of one 5i20 (though two 7i43s have 
more I/O than one 5i20).

HostMot2 provides stable step generation independent of any realtime 
latency issues the host computer might have.  Software step generation 
tops out at one step per base period, so maybe 25-50 KHz depending on 
your computer.  The fastest hm2 stepping that i know if is the Smithy 
machines that step at 400 KHz with no problems; the firmware can go way 
faster than that.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i33 encoder inputs and up/down counter mode

2009-08-01 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> Note: Thats all you should have to do, the so called up/down mode of the 
> encoder counter _is_ what EMC calls step&dir for outputs. When a HM2 
> encoder counter is in up/down mode, Encoder input A is "Step" and 
> encoder input B is "Dir".
> 
> If this encoder counter mode is called Step&Dir by EMC then the HM2 
> documentation ( and my regmap file) should be changed...

Confirmed, the hm2 encoder in both 2.3 and master expect Step/Dir signals when 
.counter-mode is 1.  (They expect quadrature when .counter-mode is 0, as we all 
know.)

I'll update the manpage.

Peter, do you have commit access to our git repo, or do you want me to update 
the regmap?


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i33 encoder inputs and up/down counter mode

2009-07-31 Thread Sebastian Kuzminsky
Stephen Wille Padnos wrote:
> Sebastian Kuzminsky wrote:
> 
>> Gerhard Pircher wrote:
>>  
>>
>>>> If your spindle is not reversible you could connect the step line to 
>>>> either Up or Down, and run it that way.
>>>>  
>>>>
>>> Well, it is reversible. Maybe I should build a simple step/dir to
>>> quadrature converter. That shouldn't be too hard.
>>>
>>> Thanks for enlightening me!
>>>
>>>
>> It might be simple to use the Dir line from your spindle as the selector 
>> to a demux, and send the Step signal to either Up or Down on the hm2 
>> encoder input.
>>  
>>
> That's a good idea, with a couple of caveats:
> 
> 1) There is no demux component ;)
> 2) When someone writes one, they will need to be careful about what 
> happens to the unused output - there shouldn't be any unexpected 
> transitions on the "other" output
> 3) There could be several counts in the wrong direction since counting 
> is done in a MHz-speed "thread" in the FPGA and the demux would only be 
> checked at 1Khz to 10kHz rates.  This wouldn't be bad in practice since 
> the spindle would have to slow down before reversing, but it could also 
> be a problem if the spindle is more or less still and the dir line 
> changes out of sunc with the step pulses.

The "component" i'm thinking about would have to be written in eagle, 
since hm2's input pins cannot be written from HAL...  ;-)


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i33 encoder inputs and up/down counter mode

2009-07-31 Thread Sebastian Kuzminsky
Gerhard Pircher wrote:
>> If your spindle is not reversible you could connect the step line to 
>> either Up or Down, and run it that way.
> Well, it is reversible. Maybe I should build a simple step/dir to
> quadrature converter. That shouldn't be too hard.
> 
> Thanks for enlightening me!

It might be simple to use the Dir line from your spindle as the selector 
to a demux, and send the Step signal to either Up or Down on the hm2 
encoder input.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 7i33 encoder inputs and up/down counter mode

2009-07-31 Thread Sebastian Kuzminsky
Gerhard Pircher wrote:
> I'm using the Mesa 7i33 card to interface three RS-422 linear encoders to
> EMC2. Now I would like to use the fourth input for the spindle speed
> sensor, which delivers a 12V pulse and direction signal. But I wonder which
> input of the 7i33 card should be connected to the pulse resp. direction
> signal (if possible at all, but the Hostmot2 driver allows to run encoders
> in counter mode).

The hostmot2 firmware currently supports Quadrature and Up/Down mode, 
but not Step/Dir, unfortunately.

If your spindle is not reversible you could connect the step line to 
either Up or Down, and run it that way.


-- 
Sebastian Kuzminsky

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Trouble with EMC spiral example

2009-07-21 Thread Sebastian Kuzminsky
Jeffrey Pease wrote:
> I have no explanation for why this glitch is occurring in these spots,  
> and no real idea how to fix it. Any ideas?
> 
> My machine is using steppers and lead screws. Running EMC2 on Ubuntu  
> 8.04.

Which version of emc2?

What hardware is driving your steppers?

What config are you using?

What are your latency numbers like?


-- 
Sebastian Kuzminsky

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


Re: [Emc-users] configuration file

2009-07-15 Thread Sebastian Kuzminsky
Stuart Stevenson wrote:
>I just did a 'git pull'. My install will not configure as there is
> no longer a configure file. What do I do now?

Jeff just changed this yesterday.  The "configure" file is actually a 
generated file, and as such never really belonged in the repository.  It 
is made by the new "autogen.sh" script that was added when the configure 
script was removed.  So the compile procedure now is this:

cd emc2.git/src
./autogen.sh
./configure --blah --blah --blah
make
sudo make setuid


By the way, you can sort of look up the current canonical way to build 
the software by looking at how the buildbot does it.  Go to 
<http://emc2-buildbot.colorado.edu/buildbot/waterfall>, look across the 
top row to find the build that's most similar to yours.  For example, if 
you're building Trunk (aka master), realtime (as opposed to sim), 
run-in-place (as opposed to .deb), on Hardy, on a 32-bit machine, click 
on hardy-x86-trunk-realtime-rip.  That page will show you the most 
recent builds of that configuration.  Click on the most recent green 
(successful) one.  That will take you to a webpage showing all the 
commands the buildbot ran, and their output.  From there it should be 
clear what to do.  (However, note that not every step the buildbot does 
is necessary or useful for developers following along at home.)


-- 
Sebastian Kuzminsky

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 homing

2009-07-12 Thread Sebastian Kuzminsky
John Kasunich wrote:
> A simple test to see if screened cable will help can be done with some 
> aluminum foil.  Make a "screen" around the cable, ground it, and see if 
> it helps.  Just be carefull that the exposed foil doesn't short anything.

Like this?  :-)

<http://highlab.com/~seb/emc2/al-screened-cable.jpg>

The ground line from the aluminum foil screen is just visible to the 
left of the nearest stepper motor: it's a short length of solid-core 
wire with gray-and-red insulation.  One stripped end wraps around the 
aluminum foil and the other is attached to the stand-off screw of the 
7i30 board (at the lower left of the picture).

Tidy, my workbench ain't.  Roomy neither.


-- 
Sebastian Kuzminsky

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 homing

2009-07-12 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> Unfortunately, the HM2 driver does not support lowering the encoder sample 
> rate sample rate yet

The only control over the encoder sample rate that the hostmot2 driver 
currently exposes is the "quadrature filter" bit.

 From the hostmot2(9) manpage:

(bit r/w) filter: If set to True (the default), the quadrature counter 
needs 15 clocks to register a change on any of the three input lines 
(any pulse shorter than this is rejected as noise).  If set to False, 
the  quadrature counter needs only 3 clocks to register a change.  The 
encoder sample clock runs at 33 MHz on the PCI AnyIO cards and 50 MHz on 
the 7i43.


-- 
Sebastian Kuzminsky

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 homing

2009-07-09 Thread Sebastian Kuzminsky
Chris Radek wrote:
> On Thu, Jul 09, 2009 at 04:28:23PM +0100, Leslie Newell wrote:
>  
>> Watching GPIO 28 with halmeter I can see the index so the hardware is 
>> working correctly, going TRUE when the index is active.
>> When I home, it appears to ignore the index completely. The machine hits 
>> the home switch, backs off then stops almost immediately when the switch 
>> breaks, ignoring the index.
>> Watching axis.0.index-enable with halmeter I see it go TRUE for a moment 
>> when the switch releases then almost immedaitely FALSE again.
> 
> index-enable is set true by the motion controller when it wants to
> start the index search (this will be after finding the switch), then
> it is set false by the hardware/driver when index is found.  The time
> the index-enable is true is the search time.
> 
> I think it's actually working.  Your index might be closer to your
> switch than you expect, so you think it's not reading it.

This was my first guess as well.  Les, can you tell us what part of this 
behavior you think is wrong?


> What is GPIO 28?  I don't understand this part.

GPIO 28 is the I/O pin used for Index for encoder #5 on the firmware Les 
is using.  He's watching the raw value on the input pin, bypassing the 
encoder, to verify that his wiring is correct.

<http://git.linuxcnc.org/gitweb?p=emc2.git;a=blob;f=src/hal/drivers/mesa-hostmot2/firmware/5i20/SV12.PIN;h=81b34cd09277063c63671a3f529ad929e0a738a9;hb=d4a642fcb69e5f5c2d61af6429403e807e780f25#l87>


-- 
Sebastian Kuzminsky

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] power off at the end of program

2009-07-02 Thread Sebastian Kuzminsky
Denis Stremplewski wrote:
> The goal of my question was to reduce the power consumption (save the planet 
> !!), because I am not always in front of the machine (I know it is bad to do 
> that !), I am not informed when the job is terminated and the motor are 
> energized often for a long time.

If your CNC machine is on the net, you could use a user-defined M-code 
to send you a text message at the end of the program.

-- 
Sebastian Kuzminsky

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


Re: [Emc-users] Pluto-P and PCI

2009-06-07 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Sun, 7 Jun 2009, Kirk Wallace wrote:
> 
>> Date: Sun, 07 Jun 2009 16:23:29 -0700
>> From: Kirk Wallace 
>> Reply-To: "Enhanced Machine Controller (EMC)"
>> 
>> To: "Enhanced Machine Controller (EMC)" 
>> Subject: [Emc-users] Pluto-P and PCI
>>
>> I found an old thread on CNCzone that indicated that a LAVA PCI parallel
>> port card works with the Pluto-P, so I got this one (with a Xilinx
>> chip):
>> http://www.lavalink.com/dev/index.php?id=66
>>
>> lspci -v gave me an address for each port, but pluto_servo still will
>> not load. The Pluto-P works fine on the motherboard port, but I have one
>> motherboard that has a blown port, so it would be nice to get this
>> working. Has anyone gotten this or another PCI parallel port card
>> working with the Pluto-P? If so is there a trick to getting it set up?
>>
>> Does the Mesa 7i43 have the same problem? Do all FPGA's have this
>> problem? Usually, if I wait long enough, whatever I need in Linux gets
>> fixed, this one seems particularly stubborn.
> 
> 
> I think the same problem exists for the 7I43. Sebastian could not get the 
> same 
> card I tested as working to do anything under linux. The LAVA hardware seems 
> to work fine (I had no trouble downloading bitfiles to the 7I43 or running 
> loopback tests for days with a DOS test jig)
> 
> My guess is that either the current drivers do something to the card that 
> breaks it, or the probe parport breaks it. One thing unusual about the card 
> is 
> that it comes up in EPP mode, so it worked under DOS without any register 
> access other than the normal EPP registers

I'm not sure why I couldn't get the LAVA parport chipset to work with 
the 7i43, but i agree with Peter's assessment: it's something the 
hm2_7i43 driver is doing wrong.  I think the next debugging step is to 
trace Linux's somewhat convoluted parport driver and see how it does it.

The only PCI parport i got to work with the 7i43 was the OXSEMI PCI952, 
which ran flawlessly as long as EPP Wide mode was disabled.  In this 
mode the parport I/O is just as fast as normal, it just takes slightly 
more CPU to do it.

lspci for that board is:

 01:05.1 Parallel controller: Oxford Semiconductor Ltd OX16PCI952 
Integrated Parallel Port (prog-if 01 [BiDir])
 Subsystem: Oxford Semiconductor Ltd Unknown device 0001
 Flags: medium devsel, IRQ 3
 I/O ports at dcb8 [size=8]
 I/O ports at dca4 [size=4]
 I/O ports at dce0 [size=32]
 Memory at fe9dd000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: 


And the loadrt line looks like this:

loadrt hm2_7i43 ioaddr=0xdcb8 ioaddr_hi=0xdca4 epp_wide=0 
config="firmware=hm2/7i43/SVST4_4B.BIT"


-- 
Sebastian Kuzminsky
A liter of ammonia contains more hydrogen than a liter of hydrogen.
<http://www.foresight.org/nanodot/?p=3065>

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hm2 encoders

2009-05-30 Thread Sebastian Kuzminsky
Terry wrote:
> This is the problem line in the servo file
> 
> setp  hm2_[HOSTMOT2](BOARD).0.encoder.00.scale  2000
> 
> this line does not use the .ini file input scale
> 
> Chris had the fix below
> 
> Maybe a note on this or change the hm2 servo.hal file
> to use the ini file or you guys will answer this question
> more times.
> I personally like the scale in the .ini file with all the
> infromation about each axis in one place

You're right!  That's definately a bug in the hm2-servo.hal file, it 
should be using the SCALE value from the .ini.  I'll fix it.

Thanks for finding it!


-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hm2 IO

2009-05-30 Thread Sebastian Kuzminsky
Terry wrote:
> I tried out the hm2 today
> I get an error from this group of lines in my .io file
> 
> 
> # Connect limit/home switch outputs to motion controller.
> newsig Xminlim bit
> newsig Xmaxlim bit
> newsig Xhome bit
> linksp Xminlim <= hm2_5i20.0.gpio.024.in-not
> linksp Xminlim => axis.0.neg-lim-sw-in
> linksp Xmaxlim <= hm2_5i20.0.gpio.025.in-not
> linksp Xmaxlim => axis.0.pos-lim-sw-in
> linksp Xhome <= hm2_5i20.0.gpio.026.in-not
> linksp Xhome => axis.0.home-sw-in
> 
> 
> it was an hal error starting with:
> 
> linksp Xminlim <= hm2_5i20.0.gpio.024.in-not
> 
> Im sure all are bad but this one was first

What was the error message?


> if I comment these out then I can get EMC to fire up
> but with a joint 1 error,I believe the A and B encoder
> on that axis are switched from the mi520.This error
> does not concern me as it is easy to fix in the wiring world
> but the machine nneds to keep running so I need to fix hm2 except for that
> joint error then I will rewire and move on

If the encoder A and B lines in the hm2 firmware are reversed vs the 
older m5i20/hostmot firmware, then simply reversing the sign of the 
encoder scale in the hm2 .ini should take care of it.  Or, as you say, 
swap the A and B wires, but you'd have to remember to swap them back if 
you want to run the older driver again.


-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] hm2 encoders

2009-05-30 Thread Sebastian Kuzminsky
Terry wrote:
> I tried to turn one of my screws and watch the screen-
> the DRO is much,much greater than the amount the machine
> moved.
> 
> my .ini file for each axis was copied and pasted
> from my old m5i20 .ini file so I doubt that is the problem
> 
> Is there somewhere else I could be getting the wrong
> encoder count from?

Could it be your old m5i20 config was running the encoders in "x1" mode? 
  The hm2 encoder counter always runs in "x4" mode, because this mode 
gets the maximum resolution out of the encoder hardware.  If this is the 
problem, multiplying your encoder scale by 4 should fix it.


-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Spindle control with Hm2

2009-05-30 Thread Sebastian Kuzminsky
Terry wrote:
> I was using the channel/axis3 on my 7i33 board to generate
> the +/- 10VDC for my VFD
> 
> Here are the lines I had in my m5i20 config files (io file)
> 
> #Spindle speed from DAC 03 scale
> newsig spinspeed float
> linksp spinspeed <= motion.spindle-speed-out
> linksp spinspeed => m5i20.0.dac-03-value
> linksp spindle-run-request => m5i20.0.dac-03-enable
> 
> These are in my .ini file(m5i20)
> 
> #Spindle
> [AXIS_3]
> 
> OUTPUT_OFFSET = 0.005
> OUTPUT_SCALE = -.00195
> MAX_VELOCITY =  10
> 
> 
> I cant seem to find lines like this in the hm2_servo file
> What I thought about was adding these lines to the hm2-servo.hal file
> 
> 
> # 
> 
> # [3] Spindle
> 
> # 
> 
> # position command signals
> 
> setp hm2_[HOSTMOT2](BOARD).0.pwmgen.03.output-type 1 #pwm on pin1, dir on pin2
> 
> setp hm2_[HOSTMOT2](BOARD).0.pwmgen.03.scale  1.0
> 
> newsig spinspeed float
> linksp spinspeed <= motion.spindle-speed-out
> linksp spinspeed => hm2_[HOSTMOT2](BOARD).0.pwmgen.03.value
> 
> 
> 
> I know it is not right but I was hoping to be close

That's very close, just add

linksp spindle-run-request => hm2_[HOSTMOT2](BOARD).0.pwmgen.03.enable


> Also does the scale now go in the servo file and not in the .ini file?

That part has not changed, SCALE should go in the .ini file, and be used 
in the .hal file just like before.


-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa-Hm2

2009-05-29 Thread Sebastian Kuzminsky
We love you too Sam :-)

sam sokolik wrote:
> heh - sorry about that..  I know love is a strong word...  ;)
> 
> (replied to the wrong email)
> 
> sam sokolik wrote:
>> I was in the reading room with a popular science... ;)
>>
>> also they say the milk might taste more burnt..  (I never noticed that)
>>
>> love you
>> sam
>>
>> Sebastian Kuzminsky wrote:
>>   
>>> Terry wrote:
>>>   
>>> 
>>>> If I change this line:
>>>>
>>>> CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgens=4 
>>>> num_stepgens=1"
>>>>
>>>> to this:
>>>>
>>>> CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4 num_pwmgens=4 
>>>> num_stepgens=0"
>>>>
>>>> I can have the step gen pins as gpio pins?
>>>>
>>>> Also I can have the pins that are listed as the encoders (and pwms) on 
>>>> channels that
>>>> are numbered larger than the four that I am using? (4,5,6,ect)
>>>>
>>>> I hope this is right as it sounds good to me.
>>>> 
>>>>   
>>> Yes, that's it exactly.  :-)
>>>



-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa-Hm2

2009-05-29 Thread Sebastian Kuzminsky
Terry wrote:
> If I change this line:
> 
> CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgens=4 
> num_stepgens=1"
> 
> to this:
> 
> CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4 num_pwmgens=4 
> num_stepgens=0"
> 
> I can have the step gen pins as gpio pins?
> 
> Also I can have the pins that are listed as the encoders (and pwms) on 
> channels that
> are numbered larger than the four that I am using? (4,5,6,ect)
> 
> I hope this is right as it sounds good to me.

Yes, that's it exactly.  :-)


-- 
Sebastian Kuzminsky

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i20 and hm2

2009-05-26 Thread Sebastian Kuzminsky
noel wrote:
> Yes, I know what an encoder is and why.  I use Yaskawa motors and drives
> that have indexes.  I do not use steppers.
> The older m5i20 driver implemented index homing quite nicely.  The index
> makes sure the home is very accurate. 
> Before the m5i20 driver is removed, it would be good to have the new hm2
> drive function correctly and in a similar manner.

Agreed, the older m5i20 driver should not be removed until well after 
all its features are supported and thuroughly tested in hm2.  I believe 
hm2 today can do everything that m5i20 can do, but it's not as well 
tested - we're still finding bugs in it...  The sooner we find them all, 
the sooner we can fix them all ;-)


> So, at this point I just need to figure out how to get index homing working
> with the hm2 driver, if it is indeed possible.

I think it's possible and it should work well.  Frank Tkalcevic said he 
has it working on his machine with the 5i20/SVST8_4.BIT firmware (no 
index mask).

Frank, can you please post your homing .ini and .hal on pastebin.ca, and 
post a link on this mailing list?


-- 
Sebastian Kuzminsky
"Like most small parts, they are concrete-soluble: you drop them once,
they're gone forever." -- John Bush

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i20 and hm2

2009-05-26 Thread Sebastian Kuzminsky
noel wrote:
> What do you mean by 'hm2-servo configuration'??

"hm2-servo" is one of the sample configs shipped with emc2.  If you 
installed one of the 2.3 debs it's in /usr/share/doc/emc2/examples, if 
you checked out the CVS it's in configs/.


> Is this different from a 'stepper' configuration?

Yes, the sample configurations in hm2-servo/ use servo motors, as 
opposed to the configs in the adjacent hm2-stepper/ directory, which use 
stepper motors.


> Why and how would index homing work in one and not the other??

Index homing is a feature of the rotary encoder mounted to the motor 
shaft of a servo motor.  A servo is not a servo without an encoder.  The 
encoder provides position feedback to the servo controller.

Stepper motors do not (in general) have encoders; the discrete motion of 
the motor itself acts as the position transducer.

Some configurations use non-rotary encoders, and some use encoders in 
conjunction with stepper motors.  While these kinds of system csertainly 
should be doable, I've personally never done it, and neither of the two 
hostmot2 sample configs is set up to deal with it "out of the box".

-- 
Sebastian Kuzminsky
"Like most small parts, they are concrete-soluble: you drop them once,
they're gone forever." -- John Bush

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i20 and hm2

2009-05-26 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
>>> Is index homing working in the 5i20 hm2 drive, in particular the 
>>> SVST8_4.BIT file?
>> HM2 encoder index homing works (to the best of my knowledge), 
>> though I dont think the hm2-servo config supports homing.
>>
>> For proper home-on-index you probably want to use the 
>> 5i20/SVST8_4IM2.BIT firmware, since it supports index 
>> masking.  You'd normally use the limit/home switch as the index mask.
> 
> What difference does the index mask make?  I'm using index homing at the
> moment with SVST8_4.BIT without the index mask.

Wow, cool!  Is it working well for you?

Are you connecting the home switch in HAL to the index-enable pin on the 
encoder?  If so you're essentially doing index masking in software, and 
that should work just fine.  It just seems a bit cleaner to me to do it 
in firmware.

But, any way that works is a pretty good way.  Thanks for the 
success-report.  :-)


-- 
Sebastian Kuzminsky
"Like most small parts, they are concrete-soluble: you drop them once,
they're gone forever." -- John Bush

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i20 and hm2

2009-05-26 Thread Sebastian Kuzminsky
noel wrote:
> Is index homing working in the 5i20 hm2 drive, in particular the SVST8_4.BIT
> file?

HM2 encoder index homing works (to the best of my knowledge), though I 
dont think the hm2-servo config supports homing.

For proper home-on-index you probably want to use the 
5i20/SVST8_4IM2.BIT firmware, since it supports index masking.  You'd 
normally use the limit/home switch as the index mask.


> Also, in the supplied example for the servo 5i20 hm2 configuration, there is
> only a servo thread.  Does this mean that no other thread is needed?  Or is
> this a very simplified example and other threads are up to the integrator?

The example is complete, no other threads are needed.  All the user 
should need to do is set the SCALE of the encoders and tune the PID 
loops appropriately for the motors & machine.


-- 
Sebastian Kuzminsky
"Like most small parts, they are concrete-soluble: you drop them once,
they're gone forever." -- John Bush

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC paper

2009-05-08 Thread Sebastian Kuzminsky
sam sokolik wrote:
> I am also very interested.  Looks neat!
> 
> sam
> 
> Anders Wallin wrote:
>> there's a new paper out on desktop parallel kinematic machines which 
>> uses EMC2
>> http://www.springerlink.com/content/j12r46v2v93g5t07/
>>
>>
>> I have the pdf if anyone is interested.

The PDF is on the page Anders linked, no need to email it around:

<http://www.springerlink.com/content/j12r46v2v93g5t07/fulltext.pdf>


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Threading using a servo's encoder output with a geared output.

2009-05-08 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
> Where is the Index Mask I/O pin?

One of the awesome-but-confusing things about HostMot2 is that different 
firmwares have different features...  And it's poorly documented what's 
available.  Most firmwares don't have the Index Mask feature.  :-(

The best way to find out is to go look in the firmware directory: 
/lib/firmware/hm2 if you installed the .deb, 
src/hal/drivers/mesa-hostmot2/firmware if you're compiling from CVS.

Take a look at SVST8_4IM2, which has 8 servo axes with index mask, and 
four stepper axes.  The pinouts (including the location of the eight 
Index Mask pins) is given in SVST8_4IM2.PIN, and also written to the 
syslog when you load the driver.


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Emc-users Digest, Vol 37, Issue 15

2009-05-07 Thread Sebastian Kuzminsky
Sebastian Kuzminsky wrote:
> Frank Tkalcevic wrote:
>>> Hm, the hm2 encoder velocity output is supposed to be really smooth. 
>>> I'll double check it tonight.  Any chance you can supply a 
>>> halscope trace of it looking bad on your machine?
>> I'm using 2.3.
>>
>> Here's a trace of the commanded velocity (after going through limit3),
>> encoder velocity (*60) and the lowpass output.
>>
>> http://www.franksworkshop.com.au/img_bin/Velocity.png
>>
>> The encoder scale is 12000; 12000 pulses representing 1 revolution.  The
>> encoder velocity output is then multiplied by 60 to give rpm.  The graph
>> shows acceleration to 20rpm and stop.
> 
> Wow, that looks terrible.

Here's a prettier picture.  This has the Step & Dir pins of a stepgen in 
quadrature mode hooked up with a pair of wires to the A and B pins of an 
encoder.  The scales of the stepgen and the encoder are off, but the 
curves look the same.  This is with 2.3.

<http://highlab.com/~seb/emc2/good-encoder.png>


-- 
Sebastian Kuzminsky
the garage is my happy place

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Threading using a servo's encoder output with a geared output.

2009-05-07 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
>> First, there's an index mask option in the hostmot2 firmware. 
>>  You set the -index-mask (and optionally -index-mask-invert) 
>> bits to true, and the index will only be active when another 
>> input is on.  Connect that other input to the correct Index 
>> Mask physical pin, and you have an encoder that only works 
>> when the spindle is close to the right spot.
> 
> The index-mask is a parameter.  Can I connect a pin to a parameter?

You can not connect a pin to a parameter, but you dont need to.  The 
index-mask parameter is maybe a little confusing because it has the same 
name as the Index Mask I/O pin (note: I/O pin, not a HAL pin).

The index-mask parameter turns the index masking behavior on and off: 
If the index-mask parameter is set to True, the Index input pin only has 
an effect if the Index-Mask input pin is True.


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Emc-users Digest, Vol 37, Issue 15

2009-05-07 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
>> Hm, the hm2 encoder velocity output is supposed to be really smooth. 
>> I'll double check it tonight.  Any chance you can supply a 
>> halscope trace of it looking bad on your machine?
> 
> I'm using 2.3.
> 
> Here's a trace of the commanded velocity (after going through limit3),
> encoder velocity (*60) and the lowpass output.
> 
> http://www.franksworkshop.com.au/img_bin/Velocity.png
> 
> The encoder scale is 12000; 12000 pulses representing 1 revolution.  The
> encoder velocity output is then multiplied by 60 to give rpm.  The graph
> shows acceleration to 20rpm and stop.

Wow, that looks terrible.

It looks like the command starts moving, then it takes a full 200 ms 
before the encoder responds at all, and it immediately overshoots by a 
factor of two.

This is a servo-spindle, right?  If you disable the PID and PWM, and 
turn the spindle by hand, does it look any better?  I know it's hard to 
say what the real velocity should be in that case, but this test would 
remove the PID tuning question.

I did all my encoder velocity testing using the stepgen in quadrature 
mode, and i'm pretty sure it looked much better.


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Emc-users Digest, Vol 37, Issue 15

2009-05-07 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
> Yes, I'm using HostMot2.  The velocity coming out of the encoder was fuzzy,
> and combining that with my poor PID tuning caused vibration at low speeds.

Which version of emc2 are you using?


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Emc-users Digest, Vol 37, Issue 15

2009-05-07 Thread Sebastian Kuzminsky
Frank Tkalcevic wrote:
>> Are you using HostMot2? HostMot2 has a much better velocity 
>> output than the old M5I20 driver/firmware.
> 
> Yes, I'm using HostMot2.  The velocity coming out of the encoder was fuzzy,
> and combining that with my poor PID tuning caused vibration at low speeds.

Hm, the hm2 encoder velocity output is supposed to be really smooth. 
I'll double check it tonight.  Any chance you can supply a halscope 
trace of it looking bad on your machine?


-- 
Sebastian Kuzminsky
you press what you hope is the right switch, and you
   - jump, becoming light

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help configuring hostmot2 stepper system

2009-04-23 Thread Sebastian Kuzminsky
Matt Shaver wrote:
> Not that I know of, although I'm not in charge of the compile farm, nor
> am I a release manager. There are scripts to run specific HAL related
> tests (emc2/scripts/tests). If GUI functional tests were to be added,
> there is a list of open source winrunner type systems here:
> http://www.opensourcetesting.org/functional.php
> 
> Of these, this looks friendly and non-threatening:
> https://fedorahosted.org/dogtail/
> 
> The "traditional" tool for test automation is this:
> http://expect.nist.gov/
> 
> IIRC, Fred Proctor at NIST started accumulating expect driven test cases
> way back in the day, but I doubt they have survived the many source code
> tree revisions, if they were ever even committed to CVS to begin with.
> 
> Thanks,
> Matt
> 
> On Thu, 2009-04-23 at 14:09 -0500, Alan wrote:
>> Matt,
>> Just curious if ya'll use anything for testing like winrunner against emc2
>> builds?  Or even file name diff on new builds out of cvs?
>> Just curious.  
>> I know s/w like winrunner (and the like) are pricey but they do automate
>> build testing.  Maytbe someone from one of these companies could donate to
>> the emc cause?

Hi Alan, i run one of emc2's automated build/test robots, so i can speak 
to this issue a bit.

The system I run is here: 
<http://emc2-buildbot.colorado.edu/buildbot/waterfall>.  It monitors 
three of our branches (2.2, 2.3, and Trunk), and whenever anyone commits 
to those branches, it does nine separate builds.  The nine builds are 
three different configurations (sim, realtime-rip, and realtime debian 
package building) on three different platforms (Ubuntu Dapper, Ubuntu 
Hardy, and Debian Lenny).

The sim and realtime-rip builds run the emc2 test suite (in the "tests/" 
directory in the CVS repo).

In addition, i do occasional (manual) runs of emc2 through Coverity's 
Prevent <http://scan.coverity.com>.  The results are available to anyone 
who's interested, you just have to ask for an account.  I intend to some 
day roll Prevent into the buildbot, but i haven't gotten around to it yet.

Now, all that said, I'd personally really like *more* automated testing 
of emc2.  I'd love to see some kind of unit tests, possibly using the 
Check framework <http://check.sourceforge.net/>.  I dont know anything 
about WinRunner, but if someone wanted to work on it, i'd be happy to 
try to add it to our buildbot.


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help configuring hostmot2 stepper system

2009-04-23 Thread Sebastian Kuzminsky
Matt Shaver wrote:
> On Thu, 2009-04-23 at 08:38 -0600, Sebastian Kuzminsky wrote:
>> Are you running with the hm2 stepgen's maxvel and maxaccel 5% higher 
>> than the TP's [AXIS_?]MAX*, and still getting following errors?
> 
> I just looked at the particular .ini and .hal files, and, I am sad to
> report, no. I was in a big hurry and somehow forgot to copy these

Well I for one am *glad*, not sad, for that report!  ;-)

I bet giving the machine a bit of accel & velocity headroom over the 
trajectory planner will fix things right up.

And then we'll have to think of something else to do at Fest  ;-)


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help configuring hostmot2 stepper system

2009-04-23 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> Sebastian Kuzminsky wrote:
>> Are you running with the hm2 stepgen's maxvel and maxaccel 5% higher 
>> than the TP's [AXIS_?]MAX*, and still getting following errors?
>>   
> I changed the hm2 stepgen and maxvel to values that are a bit higher 
> than the AXIS_ values - this works perfectly!
> Might be worth adding this to the manual, otherwise I might be seen as 
> an hm2 guru :-)

I'm glad that worked  :-)

I'm hoping that i'll get stepgen maxaccel=0 working soonish, then we'll 
make that the default and the user will just set [AXIS] stuff correctly 
and things'll work.


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help configuring hostmot2 stepper system

2009-04-23 Thread Sebastian Kuzminsky
Matt Shaver wrote:
> On Wed, 2009-04-22 at 22:10 -0600, Sebastian Kuzminsky wrote:
>> In the awesome future, the hm2 stepgen will have a mode where it blindly 
>> follows the trajectory planner's command, trusting it to accelerate in a 
>> reasonable way.
> 
> I eagerly await the awesome future!
> 
> I did get a chance to test the changes you made in 2.3beta and I was
> still able to get following errors, but I hope to work with you on this
> in Wichita!

Are you running with the hm2 stepgen's maxvel and maxaccel 5% higher 
than the TP's [AXIS_?]MAX*, and still getting following errors?


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Help configuring hostmot2 stepper system

2009-04-22 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> So next thing to do is to set the m5i20.00.stepgen.0.maxaccel/maxvel a 
> bit bigger and see what happens.

I think the above configuration change should fix the problem you're 
seeing.  Take a look at the "stepper/stepper_mm.ini" config, it 
specifies both an [AXIS_?]MAX_ACCELERATION and an 
[AXIS_n]STEPGEN_MAXACCEL.  The MAX_ACCELERATION is used by the 
trajectory planner and the STEPGEN_MAXACCEL is used by the stepgen 
driver (in core_stepper.hal).  STEPGEN_MAXACCEL is 4% higher than 
MAX_ACCELERATION, this gives the stepgen enough headroom to catch up 
when the trajectory planner takes off, and avoids the following error.

In the awesome future, the hm2 stepgen will have a mode where it blindly 
follows the trajectory planner's command, trusting it to accelerate in a 
reasonable way.  But this isn't really ready yet.


Some other thoughts on the hm2-stepper config you linked in an earlier 
email:

You dont need a BASE_PERIOD for hostmot2 - the base thread is in the FPGA.

Your SERVO and TRAJ periods are both 100,000 ns, which is pretty 
aggressive, 1,000,000 ns is more typical.  But if this works for you, great!

For AXIS_0, your steplen and stepspace are both 2500 ns, so your max 
step rate is 200 K steps/second.  Your scale is 640 steps/inch.  This 
gives a max speed of 200K/640 = 312.5 inches/second.  Wow.  But you're 
specifying an [AXIS_0]MAX_VELOCITY of only 25...  Something's not adding 
up there.  I didnt check the other axes.


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-18 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> this works - I thought that only worked on standard output lines - not on
> special function pins.
> Sometimes I am thinking too complex...

Well, maybe the hostmot2 manpage could use some clarification on this 
issue.  The distinction between "physical I/O pins on the board 
connectors" and "GPIO HAL pins" is currently pretty muddled.

Each physical I/O pin has *some* representation in HAL, but the 
particulars of that representation depends on what the I/O pin is used for.

If the physical I/O pin is used for general-purpose I/O (digital input 
or output), then the manpage calls it a "full" gpio, and the user can do 
anything that the firmware supports.

If the physical I/O pin is used by a PWM, stepgen, or encoder, then the 
manpage calls it a "constrained" gpio, and the HAL representation is 
quite limited: the pin has to still be usable by the higher-level 
function that controls it.  For example, a PWM pin cannot be set to be 
an input.


> Meanwhile I also added spindle control with a PWM output. I think the docs
> are a bit outdated (or I just found the wrong ones).Some docs tell me the to
> use dac.0.value (where PWMs are used to create DACs), another one mentions
> pwmgen (but then use hm5i20 as a board type prefix whereas hostmot2 uses
> hm2_5i20 as boardname. Nothing which cannot be fixed with a bit of logical
> thinking.

It sounds like you found the wrong docs.  Unfortunately, this is 
currently easy to do, because there are two drivers that can be used 
with the Mesa 5i20 board.  The older driver is called m5i20, and it has 
HAL pins with names like "m5i20.0.dac-X-value" pins.  The newer driver 
is called hostmot2 (and hm2_5i20), and it has HAL pins with names like 
"hm2_5i20.0.pwmgen.XX".


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 - stepper signal invert

2009-04-17 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> is it possible to invert the DIR signal of the stepgen output of the 
> Mesa 5i20 board?
> On my old (parport) config I had the DIR signal inverted so I was 
> looking for a similar option on the hostmot configuration.

Yes this is easily doable.

When you start emc2 and it loads the hostmot2 driver modules, it logs 
(in the syslog) the connector/pin and "IO numbers" it's using.  It'll 
look something like this:

IO Pin 048 (P4-01): Stepgen #0, pin Step (Output)
IO Pin 049 (P4-03): Stepgen #0, pin Dir (Output)

 From this you can take the IO pin number for your Dir signal (049 in 
this example) and invert the signal on that pin with a HAL command like 
this:

setp hm2_5i20.0.gpio.049.invert_output 1


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2 typed versus scripted commands

2009-04-15 Thread Sebastian Kuzminsky
James Reed wrote:
> How big is 2.3.0 Beta 2?  Can I load it on a USB stick and transfer it to the 
> computer in the shop (miles away)?

The package is less than 20 MB, so it should fit on a USB stick.

You said you're on 2.2.8, did you install from the 8.04 LiveCD?  If so 
you can grab the 2.3.0~beta2 packages here:

<http://www.linuxcnc.org/hardy/dists/hardy/emc2.3/>

I'm not sure what package dependencies have changed from 2.2.8 to 
2.3.0~beta2, you might need some additional packages.


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] converting parport to 5i20 config -> joint following error

2009-04-15 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> I started converting my EMC2 mill from parport to the Mesa 5i20 hostmot2 
> stepper and got stuck with a problem.

Another brave hm2 testing volunteer!  Welcome!


> I keep getting "joint xxx following errors". I checked the docs but 
> cannot explain this: ferror, min_ferror, max_velocity and 
> mac_acceleration are the same in both cases and - although not necessary 

One problem with the configs you linked below is that 
[TRAJ]MAX_LINEAR_VELOCITY is greater than [AXIS_?]MAX_VELOCITY.  That 
means the hm2 stepgen will fall behind where the trajectory planner 
wants it to be, leading to following errors if it gets too bad.

There's also no [TRAJ] acceleration limits, i'm not sure what it will do 
in that case.

Oops, i see that the hm2 sample configs has the vel and accel settings 
sort of messed up, i'll fix that for the release.


> - I added the base_period to the hostmot2 configs.

This config has no base thread, so it needs no base period (but it won't 
hurt to have one).  With Hostmot2, the base thread is running in the FPGA.


> A second problem (maybe related ?) is seen during a manual jog. When an 
> axis stops it keeps humming and the digital readout flips between the 
> current position (e.g 2.001) and adjacent positions (e.g. 2.002).
> 
> This was all done on 2.3.0~beta2 with the hm2_stepper config files from 
> that release.

The humming and dithering across the setpoint is a known bug in 
2.3.0~beta2, it's been fixed in CVS and will be in the next release.


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2 typed versus scripted commands

2009-04-14 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Wed, 15 Apr 2009, James Reed wrote:
> 
>> I just checked.  Watchdog is disabled (commented out)
> 
> The part that sets the watchdog timeout?
> 
> Thats what needs to be commented out to disable the watchdog

This is unfortunately not true.  There is currently no way to disable 
the watchdog via the hostmot2 driver, so it's always on and biting 
people who dont pet it.  Sorry!

Compounding this problem, in the sample hostmot2 config distributed with 
2.2.8 the watchdog stuff is commented out, which means it always bites 
right away.  I dont understand how this ever works for you.  Maybe i'm 
missing something here.

The easiest fix might be to upgrade to 2.3.0 beta2, which has a hostmot2 
7i43 config that doesnt bite people.

If you want to stay with 2.2.8, uncomment (remove the "#" at the 
beginning) the line of m7i43_th.hal that says this:

#addf hm2_7i43.0.pet_watchdog  servo-thread #enable if fw supported


-- 
Sebastian Kuzminsky
We need numbers, not adjectives.  -- David MacKay
   <http://www.withouthotair.com/>

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ilowpass filter

2009-04-07 Thread Sebastian Kuzminsky
Jon Elson wrote:
> Sebastian Kuzminsky wrote:
>> If the encoder counter can timestamp the arrival of the encoder edges 
>> with a temporal resolution that is high compared to the servo cycle 
>> period, then the velocity can be accurately and smoothly estimated at 
>> any (constant) velocity, from much less than one edge per servo cycle up 
>> to the max practical edge rate.
>>
>>   
> sampling jitter is not the problem.  In some systems with relatively low 
> encoder resolution, there are just a couple counts per servo cycle.  So, 
> the +1 / -1 nature of the sampling interval necessarily adds a "noise" 
> to the perceived velocity.  "Estimating" means filtering, as far as I 
> can see.

If the encoder counter provides only the number of edges seen since 
startup (or since some reset event), then it's really hard to estimate 
velocity well - it'll be quantised and crunchy (though as you say, maybe 
filtering could help).

But if the encoder counter has a fast clock (like the base period of the 
software encoder counter, or the Quadrature Timestamp Clock of the 
HostMot2 firmware), then it's possible to do better.

In this setup, the data sent from the encoder counter to the driver 
takes the form "X edges seen since reset, most recent edge seen at time 
T".  By remembering the last time this "timestamped edge count" 
datapoint changed, the driver can estimate velocity as V = dX/dT.

If the datapoint has not changed (no edges seen) since the previous time 
through the servo loop, then things get a little more complicated.  We 
know an upper bound on the velocity - it's *not* so fast that we *just* 
saw an edge.  If this upper bound is *greater* than the previous 
velocity estimate, then stay with the previous estimate.  If the upper 
bound is *smaller* than the current velocity, then use the upper bound.


So, the "one edge every other servo period" example above would look 
like this.  "Ts" is the time that the servo loop runs, "X" is the total 
number of edges seen, and "Te" is the timestamp of the most recent edge.


Ts=0.00 X=0 Te=0.00

Starting condition, first time through the loop.  Report V = 0.


Ts=0.001000 X=1 Te=0.000456

New datapoint!  This informs the position, but we dont have enough data 
to estimate velocity yet.


Ts=0.002000 X=1 Te=0.000456

No new edge this time.  The fastest possible (average) speed since the 
last time through the loop would result in an edge right after we 
checked, which would mean X=2, Te=0.002001.  *If* that edge arrived, we 
would see V = (2-1)/(0.002001-0.000456) = 647 edges/second.  This is 
greater than the previous (initial) V of 0, so report that V = 0 still.


Ts=0.003000 X=2 Te=0.002456

New datapoint!  V = (2-1)/(0.002456-0.000456) = 1/0.002 = 500 
edges/second.  New datapoints (unlike upper bound estimates) force 
updating V, so report V = 500, which is the correct value for this 
thought experiment.


Ts=0.004000 X=2 Te=0.002456

No new datapoint.  The upper-bound V would result in a datapoint X=3 
Te=0.004001, for V = (3-2)/(0.004001-0.002456) = 647 edges/second. 
That's higher than the previously reported velocity, so report the 
previous velocity instead, V = 500.


Ts=0.005000 X=3 Te=0.004456

New datapoint!  V = (3-2)/(0.004456-0.002456) = 1/0.002 = 500.  New 
datapoints force updating V, so report (again) the correct value of 500 
edges/second.

Things could go on like above indefinately, and it would always report 
V=500.  Let's say instead that the encoder stops moving at this time. 
True V is now 0.  All future readings of the encoder counter will have 
the current datapoint of X=3 and Te=0.004456


Ts=0.00600 X=3 Te=0.004456

No new edge, estimate upper bound V = 647 edges, report old V = 500.


Ts=0.00700 X=3 Te=0.004456

No new edge, upper bound V = (4-3)/(0.007001-0.004456) = 393.  Report V 
= 393.


Ts=0.008000 X=3 Te=0.004456

No new edge, report V = (4-3)/(0.008001-0.004456) = 282.


I'll stop there, but the reported velocity decays towards zero, until 
you hit some timeout and give up and report V = 0.  In hm2, this timeout 
is controlled by the encoder.XX.vel-timeout parameter.

I think you can see how this system works well with both slower and 
faster encoder velocities across a great range, and how it reacts 
quickly to changes in velocity.

Without the encoder counter reporting Te, the driver has to use Ts for 
the delta-T in the velocity estimation (just like the "ddt" HAL 
component does).  The golden nugget of insight here is: The edge 
timestamping done by the encoder counter removes the servo period from 
the velocity estimation, replacing it with more information from the 
actual encoder hardware, and that removes the greatest source of 
quantisation error.


-- 
Sebastian Kuzminsky

--

Re: [Emc-users] ilowpass filter

2009-04-07 Thread Sebastian Kuzminsky
Tom wrote:
> Peter C. Wallace  writes:
> 
> snip...
>> Also (connecting some dots here) if you are using HostMot2, D term 
> crunchyness 
>> should be much improved when EMCs PID loop is modified to be able to use the 
>> drivers Velocity output (which uses DeltaCounts/DeltaTime velocity 
>> estimation). This should allow larger D terms without instabilities
>>
>>>
> snip...
>> Peter Wallace
>> Mesa Electronics
>>
>  
> Peter,
> Are you saying that if I upgrade to Hostmot2, there is a Velocity output hal 
> pin that is not available to me using Hostmot? Would this require 
> modifications 
> to the motion.hal file in order to modify the PID loop? 
> Could you connect a few more dots for me here?

The hostmot2 encoder driver has a good velocity estimator, with the 
value available on the .velocity-fb pin.  I believe (though i dont know 
for sure) that the older hostmot (aka m5i20) driver does *not* export 
encoder velocity, so with that driver velocity has to be estimated using 
additional HAL components (like ddt), which won't give as good a result.

However...  The current PID implementation in EMC2 does its own velocity 
estimation (controlled via the feedforward gain), and can not accept 
velocity information from outside itself.

There are other reasons you might want good velocity feedback from your 
encoders, but better PID control is not yet one of them.  Maybe in 2.4 ;-)


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ilowpass filter

2009-04-07 Thread Sebastian Kuzminsky
John Kasunich wrote:
> I have long had my own thoughts on this issue.  Our software encoder 
> counter has a velocity output which is much less quantized than the 
> position output.  Some (but not all) hardware drivers also have a 
> velocity output.  If the PID loop had both position and velocity 
> feedback inputs, it could use the velocity feedback for the D term.
> 
> This has the potential to be better than any filter - the encoder 
> counter (hardware or software) simply has more information to work with. 
>   The software encoder counter generates its velocity output by looking 
> at not only how many counts arrived, but _when_ they arrived (with base 
> period time resolution).  I'm pretty sure the latest hostmot2 driver 
> does the same - in that case it knows when pulses arrived with 
> sub-microsecond resolution, and the velocity output can be very smooth.

The hm2 encoder driver is currently using 1 MHz for the encoder edge 
timestamp clock frequency.  The hardware supports more, maybe I should 
bump it up...


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ilowpass filter

2009-04-07 Thread Sebastian Kuzminsky
Jon Elson wrote:
> A problem with EMC2 using the PID hal component is that the D term has 
> no filtering on it.  Due to the "double quantized" nature of encoders, 
> there is a real spike in the frequency spectrum of the velocity at 1/2 
> the sampling rate.  I call it double quantized because position is 
> measured in discrete counts, and then the count is sampled at regular 
> intervals.  So, it is guaranteed that at certain velocities you will get 
> a +1 / -1 jitter in the number of encoder counts per sampling interval.  

It's true that a digital system (such as a computer) estimating an 
analog value (such as encoder velocity) always quantises to some extent, 
there are things you can do with encoder counting that result in 
significantly less quantisation error.

If the encoder counter can timestamp the arrival of the encoder edges 
with a temporal resolution that is high compared to the servo cycle 
period, then the velocity can be accurately and smoothly estimated at 
any (constant) velocity, from much less than one edge per servo cycle up 
to the max practical edge rate.


> If the encoder resolution is very high (I have 128,000 counts/inch on my 
> minimill) it somewhat masks this.  At lower encoder resolutions, the 
> problem grows.  Imagine a system where you are moving at 500 
> counts/second.  With a sample rate of 1000/second, then the samples come 
> up like this : 0, 1, 0, 1, 0 etc.  That is a 100 % jump from sample to 
> sample at 500 Hz.

The "Reciprocal Time Estimator" solves this problem.  See section 14.2 
of this paper:

<http://repositories.cdlib.org/its/path/reports/UCB-ITS-PRR-95-3/>


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] MESA 7I43 and 7I33 OR 5I20 and 7I33 OR MOTENC-LITE(7544)

2009-04-01 Thread Sebastian Kuzminsky
Shabbir Hussain wrote:
> Is there any significant difference (in rapid moves) by running the machine 
> with 7i43-P or 5i20?

The 7i43 and the 5i20 can both command movements of much higher speed 
than any reasonable machine can move.

Really the only practical differences between them is how they connect 
to the computer (EPP for the 7i43, PCI for the 5i20) and how many I/O 
pins they have (48 for the 7i43, 72 for the 5i20).


-- 
Sebastian Kuzminsky
All my desires and ruminations are no more and no less than eddy
currents generated by the gradual exhalation of our universe.
And until this great exhalation is finished, my thoughts live on.
<http://tinyurl.com/c2t5rb>

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


Re: [Emc-users] MESA 7I43 and 7I33 OR 5I20 and 7I33 OR MOTENC-LITE(7544)

2009-03-29 Thread Sebastian Kuzminsky
Shabbir Hussain wrote:
> I need to retrofit an old CNC Lathe machine with SIEMENS Servo Motors. The 
> servo drives accept +/- 10V as velocity command. My question is which of the 
> following combination is suitable to be used for interfacing these servos and 
> differential encoders.
> 
> 1. MESA 7I43-P with 7I33
> 2. MESA 5I20 with 7I33
> 3. MOTENC-Lite PCI (7544)
> 
> Can I use MESA 7I33 with MESA 7I43-P?

Either the 7i43-P or the 5i20, together with the 7i33, would probably 
work well for you.

I prefer the 5i20 over the 7i43-P because PCI is so much easier to deal 
with than the EPP parallel port, and it's an order of magnitude faster.

I dont know wnything about the MOTENC-Lite.


-- 
Sebastian Kuzminsky
All my desires and ruminations are no more and no less than eddy
currents generated by the gradual exhalation of our universe.
And until this great exhalation is finished, my thoughts live on.
<http://tinyurl.com/c2t5rb>

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


Re: [Emc-users] Fest

2009-03-25 Thread Sebastian Kuzminsky
Stephen Wille Padnos wrote:
> I just found out that I should be able to go (yay!).

Yay see you there!


> There are two or three hotels near Stuart's place, ranging from $55 or 
> so to $90 or so a night.
> 
> I'm thinking of calling these places (at least the Days Inn and Hampton 
> Inn) to see about group rates, so I'd like to get a count of people who 
> might attend, and whether they'd need a hotel room.
> 
> Please respond to this thread if you're thinking about attending, and 
> also give some indication of when you'd be there, probability of going, 
> and whether the prices I mentioned are too high/too low/just right :)

Thanks for looking into the group rates.

I'd rather stay in a cheap dive and spend all my money on beer.  If it's 
$90 per night i'll probably just sleep in the truck.

My plan right now is to arrive late Wednesday night, attend Fest 
Thursday through Sunday, and leave on Monday morning.


-- 
Sebastian Kuzminsky
All my desires and ruminations are no more and no less than eddy
currents generated by the gradual exhalation of our universe.
And until this great exhalation is finished, my thoughts live on.
<http://tinyurl.com/c2t5rb>

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


Re: [Emc-users] using a 5i20 for stepper motor control

2009-03-24 Thread Sebastian Kuzminsky
Rob Jansen wrote:
> Is it possible to use the 5i20 as stepper controller (using hostmot2) 
> with EMC2 and am I correct in thinking that this relieves the PC of 
> calculating all the timing signals for the stepper signals?

Yes, and yes.


> Are there any 5i20 / stepper motor users out there? and are there any 
> sample HAL configurations to use as a start?
> I googled around a bit but did not find what I was looking for.

Matt Shaver is using a 5i20 with hostmot2 to achieve 200 KHz step rates.

I dont have his config files, but look at the hm2-stepper/5i20 sample 
config, present in the 2.3 betas or online here:

<http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/configs/hm2-stepper/?only_with_tag=v2_3_branch>


Now, all that said, here's a caveat.  While the hardware and configs 
above will completely remove the need for the computer to calculate and 
send out step signals, that *may* not be enough to get rid of the 95% 
system load and slower-than-desired motions.  The final performance of 
your machine will depend on many factors, and I suggest you do a system 
analysis before spending your money.

What fraction of your 95% CPU load is spent in step generation?  I'm 
guessing not much.

What is the maximum step rate accepted by your stepper amplifiers?

What is the maximum acceleration and velocity capabilities of your motors?


-- 
Sebastian Kuzminsky

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] NAMES Backdrop Photos

2009-03-16 Thread Sebastian Kuzminsky
John Kasunich wrote:
> BTW, I'm pretty sure I have the original (rather large) movie file for
> the variable-pitch, variable-diameter threading.  Might be fun to be use
> that instead of a screensaver.  (The YouTube version won't work at the
> show unless you have a fast internet connection, but the movie version
> just sits on your disk and runs anywhere.)

You can use the DownloadHelper plugin to Firefox to save Youtube videos 
to your hard drive, to watch them later without a network connection.

Of course, there are other reasons to prefer JMK's original movie over 
the Youtube one.


-- 
Sebastian Kuzminsky

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fest

2009-03-15 Thread Sebastian Kuzminsky
I'm pretty sure i'll make it to the Fest, at least the weekend days.


-- 
Sebastian Kuzminsky

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Ubuntu Emc2

2009-03-11 Thread Sebastian Kuzminsky
Joel Hershberger wrote:
> I was wondering if it is possible to install emc2 on my Ubuntu 8.1 
> entrepid ibex computer. I tried compiling it but it wanted to know 
> something about realtime and it also gave an error. Any help would be 
> greatly appreciated. Thanks

It's probably possible, but Ubuntu Intrepid Ibex 8.10 is *not* one of 
the supported platforms for EMC2.  You'd have to download the kernel 
sources, patch them with RTAI, and compile and install the kernel before 
you could start trying to compile EMC2.

That's if you want to actually do realtime control of a machine; if 
you're content to play around with the simulator you can configure it 
without realtime and then it should work fine on Intrepid.


The easiest way to install EMC2 is undoubtedly to use the LiveCD, here:

<http://www.linuxcnc.org/hardy/ubuntu-8.04-desktop-emc2-aj07-i386.iso>


-- 
Sebastian Kuzminsky

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] was (no subject) - Configuring m5i20 and 7i43

2009-02-24 Thread Sebastian Kuzminsky
Eric H. Johnson wrote:
> I am still using the old drivers, when 2.3 is released, these are deprecated
> where you should use hm2_pci (Sebastian - Correct me if I am stating
> anything incorrectly here).

The driver situation for the Mesa cards is a bit messy, unfortunately. 
In 2.2.8 there are two drivers for the 7i43 and three for the 5i20.  The 
drivers are:

7i43:
hostmot2 & hm2_7i43: this is the new one, use this one
m7i43_hm2: obsolete, do not use

5i20:
m5i20: old, stable, still used & maintained
hostmot2 & hm2_pci: the new one, actively maintained & developed
hostmot2 & hm2_5i20: obsolete, do not use

The m7i43_hm2 driver was kind of an early prototype of the new hostmot2 
driver.  I think there are zero users of m7i43_hm2, which is good.  All 
7i43 users should use hostmot2 and hm2_7i43.

The hm2_5i20 driver was sort of an early prototype for the hm2_pci 
driver.  hm2_pci provides all the functionality of hm2_5i20, and more, 
and in a better cleaner way.  All users of hostmot2 and hm2_5i20 should 
switch to use hostmot2 and hm2_pci instead.  No HAL changes will be 
needed (other than changing the name of the driver to load).

That's the situation for 2.2.8.  In 2.3, the obsolete drivers (m7i43_hm2 
and hm2_5i20) have been removed.


> Also note, in the 2.2.8 release, there is a bug which requires that you
> specify at least one encoder (if at least one pwm is specified? - Again help
> Sebastian).

There are two known bugs in the hostmot2 in 2.2.8.

One is a driver bug, the driver crashes if you disable all encoders. 
The workaround is to say "num_encoders=1" in your config string even if 
you dont want any.

The other bug is in the firmware, at very high step rates, the stepgens 
don't deliver all the speed the driver asks for.  This can lead to 
following errors.


-- 
Sebastian Kuzminsky
maybe you should spend more time thinking about your monkey
<http://www.youtube.com/watch?v=ZT6qHbEL68M>

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


Re: [Emc-users] pwmgen.N.scale Help

2009-02-05 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> If I set pwmgen.0.scale to 1 as soon as the amps enable I get a following 
> error. Set it to 5.5  and ever thing seam to work except homing it faults out 
> with a following error as soon as it try to make the final move. The only way 
> that I have got homing to work is to set MAX_VELOCITY to 1 when it should be 
> 4.16667 witch gives me 250 IPM. 

Hi Donnie.

First of all, are you using the software pwmgen component or the 
hostmot2 pwmgen?  In either case, only one of the documentation sources 
you listed is relevant, and using the wrong one will cause nothing but 
confusion.

Second, it's great that with scale = 5.5, it can move in a somewhat 
controlled manner.  That probably means you're very close to having a 
working machine.  Cheers!

Most likely the source of your following error is a tuning problem with 
your servos.  I recommend you use HAL and halscope (rather than the full 
emc2) to try to tune the axes, one by one.  Tuning servos is a bit of a 
black art, I'm afraid, and the pwmgen scale is just one of the knobs you 
have to get set correctly.

Here are a couple of links to get you started:

<http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Tuning_EMC2/HAL_PID_Loops>

<http://en.wikipedia.org/wiki/PID_tuning>

<http://www.anderswallin.net/2008/04/x-axis-test/>


-- 
Sebastian Kuzminsky
Why do we even pretend to have nations these days?  -- Bruce Sterling
<http://www.seedmagazine.com/news/2009/01/2009_will_be_a_year_of_panic.php>

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 and Homing

2009-01-31 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> 
> So How is the index pulse to be sent to EMC?

I suggest you read the fine manual.  It's really quite good; among many 
other things it tells you what you need to know to get homing working.


If you're running emc2 2.2, see section 6.3 of the EMC2 Integrator's 
Manual here:

<http://www.linuxcnc.org/docs/2.2/EMC2_Integrator_Manual.pdf>


If you're running 2.3/Trunk, see section 7.3 here:

<http://www.linuxcnc.org/docs/devel/EMC2_Integrator_Manual.pdf>


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] I've got a few questions on servos

2009-01-31 Thread Sebastian Kuzminsky
Wes S wrote:
> This is my first post to the list. 

Welcome!


> If I'm not totally off track, I understand EMC can take encoder 
> feedback.  What boards are typically used?  What drives are usually 
> used in servo apps?

Yes, emc2 can take a feedback signal (from an encoder on the motor 
shaft, resolvers on the table, etc), close the control loop in the PC 
(where it's totally transparent and configurable by the user), and 
provide a control signal back to the motor amps.


emc2 has drivers for a *lot* of hardware, the list is on our wiki here:

<http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EMC2_Supported_Hardware>


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2 and Homing

2009-01-30 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> What is the pin name for the encoder index input off the 7i33? What the 
> Hostmot2 pin name? Is there a signal that has to be named? I start homing and 
> as soon as the limit/home is made the latch vel starts and never finds the 
> index.
> I gave up on sharing the input for the limit with the home and jump the 
> physical limit to a new hardware pin. Sure is a waste of I/O doing that.

I'm not exactly sure what you're asking for, but i'll try to answer...

On the 50-pin J1 connector of the 7i33, pin 9 is named IDX1, pin 11 is 
IDX0, pin 33 is IDX3, and pin 35 is IDX2.  These pins carry the index 
signal from the encoder to the AnyIO board.  IDX0 is the index signal 
from the first encoder, IDX1 is the second encoder, etc.  I'm getting 
this information from page 4 of Mesa's manual for the 7i33.

Note that these pins line up nicely with the index pins of the HostMot2 
servo firmwares.


On the hostmot2 driver side, there are two ways to determine pinouts.

One way is to look at the syslog after you've started your EMC2 
configuration - the hostmot2 driver logs the actual pinout it's using there.

The other way is to look at the PIN file corresponding to the firmware 
BIT file you're sending to the AnyIO board.  This will tell you what the 
firmware *can* do with all the pins.

Both of these sources will tell you that (on the 5i23) IO#4 is pin 9 on 
P2, and is the index for the second encoder.

If you wanted to look at the logic value on the second encoder's index 
pin, you'd look at hm2_5i23.0.gpio.004.in.


Does this make sense?


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo Error

2009-01-25 Thread Sebastian Kuzminsky
Sebastian Kuzminsky wrote:
> Jeff Epler wrote:
>> In motion.c:rtapi_app_main(),
>> rtapi_set_msg_handler(emc_message_handler);
>> emc_message_handler sends RTAPI_MSG_ERROR-level messages to task through
>> emcmotErrorPut, and task puts them in nml.
> 
> Thanks Jeff.
> 
> Sorry Donnie and Peter, i was mistaken...  :-(
> 
> I'll change that particular message to be a lower message level for now, 
> until i fix the underlying bug.

Donnie, are you compiling EMC2 from CVS Trunk?  If so please update and 
try again, i just committed a workaround for this problem.


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo Error

2009-01-25 Thread Sebastian Kuzminsky
Jeff Epler wrote:
> In motion.c:rtapi_app_main(),
> rtapi_set_msg_handler(emc_message_handler);
> emc_message_handler sends RTAPI_MSG_ERROR-level messages to task through
> emcmotErrorPut, and task puts them in nml.

Thanks Jeff.

Sorry Donnie and Peter, i was mistaken...  :-(

I'll change that particular message to be a lower message level for now, 
until i fix the underlying bug.


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo Error

2009-01-25 Thread Sebastian Kuzminsky
Chris Radek wrote:
> On Sat, Jan 24, 2009 at 08:44:07PM -0700, Sebastian Kuzminsky wrote:
>> No logs are written beyond that one message, and no NML/CMS buffers at 
>> all are involved.
> 
> When running AXIS, those do make it somehow over NML and they scroll
> up the AXIS window.  I haven't seen them the last few runs, but for
> a while I was getting many many of them.

Wow, strange.

Does rtapi_print send it to AXIS, or does AXIS somehow trawl the syslog?


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo Error

2009-01-25 Thread Sebastian Kuzminsky
Alex Joni wrote:
>>>> hm2/hm2_5i23.0: encoder.00 dT <= 0, how can this be?
>>> This is a known bug in the HostMot2 encoder velocity calculation.
>>>
>>> Maybe someone more knowlegable can point to a workaround
>>> so these error messages dont clog up the queue.
>> The hm2 message listed above does not go over NML, it goes directly from
>> the kernel to the system log files (via klogd).  It indicates a problem,
>> but not the problem that's causing Donnie's machine to not work.
> 
> Depends how you printed the error.
> (From memory: if you use rtapi_print then they end up in dmesg, if you use 
> report_error they surely end up at the HMI).

The hostmot2 driver uses rtapi_print().


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo Error

2009-01-24 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Sat, 24 Jan 2009, Donnie Timmons wrote:
> 
>> libnml/cms/cms_in.cc 1484: CMS: emcError message queue is full.
>>
>> libnml/cms/cms_in.cc 1485: (continued) CMS: Message requires 272 bytes but 
>> only 0 bytes are left.
(snip)
>> hm2/hm2_5i23.0: encoder.00 dT <= 0, how can this be?
> 
> This is a known bug in the HostMot2 encoder velocity calculation.
> 
> Maybe someone more knowlegable can point to a workaround
> so these error messages dont clog up the queue.

The hm2 message listed above does not go over NML, it goes directly from 
the kernel to the system log files (via klogd).  It indicates a problem, 
but not the problem that's causing Donnie's machine to not work.

The hostmot2 driver encoder velocity computation occasionally has a bug 
when the encoder moves very slowly (< 1 edge/servo cycle).  The "dT <= 
0" message indicates that the driver glitched and reported vel=0 for a 
single servo cycle instead of the actual velocity (which is almost but 
not quite zero).  The driver recovers itself and no more harm is done. 
No logs are written beyond that one message, and no NML/CMS buffers at 
all are involved.

This bug is on the top of my todo list for hm2, but i haven't gotten to 
it yet...


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 7i43 and pinout.

2009-01-23 Thread Sebastian Kuzminsky
Peter C. Wallace wrote:
> On Fri, 23 Jan 2009, Richard Acosta wrote:
> 
>> I'm now about to connect a linear encoder, but, i don't know how to
>> connect it.
>> I downloaded the three manuals available, and found about pwmgen
>> connection but nothing about an encoder.
>>
>> How do i tell EMC2 which pins belong to encoders?
>> In which file?
> 
> There should be a .PIN file that matches the name of the firmware file you 
> are 
> using, say SVST4_6.PIN for example. I'm not sure off hand where this is in 
> the 
> EMC distribution but locate should find it. This file has the pinout 
> information for the matching bitfile. You can also set the 
> "debug_pin_descriptors" flag when launching hostmot2. (man hostmot2).

Hi again Richard.

The PIN files are in src/hal/drivers/mesa-hostmot2/firmware/7i43 if 
you're compiling from source using a CVS checkout.  They're in 
/usr/share/doc/emc2/hostmot2/7i43 if you installed the 2.2.8 .deb.

The driver prints the actual pinout at load-time whether or not 
debug_pin_descriptors is given.  The pinout shows up in the dmesg.

(debug_pin_descriptors only enables dumping the firmware's Pin 
Descriptors in all their hideous glory, this may be interesting to 
firmware hackers and driver writers but it's no good for users - users 
should get what they need from the always-on pinout logging.)


-- 
Sebastian Kuzminsky
sky is black / stars show me the way
moon whispers how to keep my faith-- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Segmentation fault

2009-01-21 Thread Sebastian Kuzminsky
Eric H. Johnson wrote:
> I am guessing that the segmentation fault has something to do with shared
> memory. I checked /etc/security/limits and verified that "hard memlock" is
> set. It was, and was set to 20K.

According to this wiki page, the recommended memlock size is 8 MB:

<http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Debian_Lenny_Compile_RTAI#Memlock_Size>


Running with insufficient lockable memory will result in a halcmd 
segfault in 2.2, and an error message in Trunk/2.3.


-- 
Sebastian Kuzminsky
sky is black / stars show me the way
moon whispers how to keep my faith-- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-20 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
>> Did Peter's watchdog fix in the config file and the num_stepgens thing 
>> fix all the problems you were seeing?
> 
> Looks like that got me over the hurdle. I can turn outputs like the brake off 
> and on now. 

Great, two easy fixes to the config files, no code changes necessary :-)

Let us know how the machine conversion goes!


-- 
Sebastian Kuzminsky
sky is black / stars show me the way
moon whispers how to keep my faith-- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-19 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> Peter wrote
> 
>> OK one problem I found in Donnies 5I23 HAL file (derived from Ted Hydes 7I43 
>> hal file) is that the "Pet_Watchdog" function is commented out, causing the 
>> watchdog to bite shortly after startup
> 
> I never minded a big barking dog but it's thous small quite ones that really 
> bite:-) 
> 
> For us newbie could a error message of some type be displayed when the 
> watchdog does time out so we would know that what got us? I guess I'm to use 
> to industrial control system in when a watchdog bites it kill all power and 
> give a very clear errror message.

There is an error message, it's in the kernel log.  Watchdog bites look 
like this:

Jan 19 19:59:38 skynet kernel: [ 3676.859579] hm2/hm2_7i43.0: Watchdog 
has bit! (set the .has-bit pin to False to resume)


There is also a pin in in HAL (.has-bit) that can be rolled into the 
estop chain to effect machine power-down.  Though you'd need a separate 
i/o path to emit any signals: if you were still talking to the FPGA, the 
watchdog would not have bit.  The most likely cause of watchdog bite is 
a total system crash, in which case there's probably no more io of any kind.

However, that's ok, because the HostMot2 firmware on the AnyIO boards 
respond to watchdog bite by (as you noticed!) switching all IO Pins to 
pulled-high inputs; the Mesa amps all have active-low enables so they 
react to this by powering down the motors.


That's the good news. Unfortunately, currently, only the pet_watchdog 
function detects and reports watchdog bites.  So you wont get notified 
of a bite unless you're running the function that prevents it...  I 
should fix that...

Oh yeah, you can see the kernel log mentioned above by running "dmesg" 
(newer message appear at the bottom), or you can look in the system log 
files /var/log/syslog or /var/log/kern.log.


> Thanks to Peter and Sebastian and the rest of the group. I know y'all have to 
> be getting tired of newbies and the problem we come up with.

Did Peter's watchdog fix in the config file and the num_stepgens thing 
fix all the problems you were seeing?


> Now to figure out how to "and" all the axis enable line into one and invert 
> it to drive opto relay to power up the amps.

Are you using the 7i33 amp, and that's what you want to power up and down?

If so, i dont think you need to do anything extra.  Each PWM on the 7i33 
has an /ENA pin (active-low enable), this is exported as 
hm2_5i23.0.pwmgen.XX.enable in HAL, and there is a net in the config 
files you sent me that connects this to axis.X.amp-enable-out.

So when EMC2 decides to power up each axis for effecting some motion, 
it'll enable the relevant pwmgen, which will power up the motor amp on 
the 7i33.


If you *do* want to And together all the enables, check out the "and2" 
realtime module (man 9 and2).  Unfortunately there is not currently a 
realtime module for and-gates with more than 2 inputs, so you'll have to 
  chain a couple of them together.


-- 
Sebastian Kuzminsky
the garage is my happy place

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-19 Thread Sebastian Kuzminsky
John Kasunich wrote:
> Peter C. Wallace wrote:
> 
>> I think with the current driver, the watchdog cannot be disabled, probably a 
>> good thing...
> 
> Seb and I were discussing that on IRC one evening.  I think I convinced 
> him that it would be nice if the watchdog slept quietly without being 
> petted, until you "arm" it by setting timeout-ns to some non-zero value.

I'm convinced, but i havent done the work yet.

The current status is that the watchdog works on all boards, with the 
behavior documented in the manpage:  the watchdog is always enabled, and 
if you dont pet it within watchdog.timeout_ns it will bite.  To pet it, 
run the pet_watchdog function.  The default timeout is documented in the 
manpage (both Trunk and 2.2): it's 1 second.


> I don't know if that the driver has been changed to let the dog sleep, 
> and if so, whether that change is in the released 2.2.8, or only on CVS 
> trunk.

In the awesome future, the watchdog will work like this:

Default timeout will be a few milliseconds, this is "a few times a 
reasonable servo period".

The watchdog will not be "primed" until the first call to 
pet_watchdog(), meaning it wont bite you.

The first call to pet_watchdog start the timeout.  After the first call 
to pet_watchdog it will behave like now: keep petting it before the 
timeout expires or get bit.


-- 
Sebastian Kuzminsky
the garage is my happy place

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-17 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> I now have the limits working I moved them to pin 32-37, seams pin 24 thru 
> pin 31 on P3 are not useable. Would I be better off moving the cable to P4 
> and leave P3 unused? I will still need some inputs for amp faults and spindle 
> drive.

In an earlier email you said you're using this firmware configuration in 
your hal file:

> loadrt hm2_pci config="firmware=hm2/5i23/SVST4_8.BIT num_encoders=3 
> num_pwmgens=3 num_stepgens=1"

The stepgen that you enabled is using IO Pins P3-024 through P3-029. 
That's why those IO Pins are not showing up as full HAL GPIOs, and 
they're not usable as inputs (because the stepgen is using them as outputs).

The effective pinout is shown in the dmesg output when the driver loads.

Pinout information is also available in the relevant .PIN file in 
/usr/share/doc/emc2/5i23 if you installed emc2 2.2 from the .deb package.

If your machine doesnt need that that stepgen instance, change your 
config to say "num_stepgens=0" instead of "num_stepgens=1", and the pins 
should show up in HAL.


-- 
Sebastian Kuzminsky
Free!  Free!  As a Journey Man!
Feel!  Heat!  In the moon light!  -- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-16 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> Peter wrote
>> Sebastian, not related to Donnies problem, but the "pulses the output when 
>> EMC 
>> starts up" statement is a little bothersome. There are some things that need 
>> to be done in a particular order in the GPIO initialization to avoid 
>> possible 
>> startup glitches on GPIO pins:
> 
> Boths me also that why the servo amps are not even in the machine at this 
> point. 
> 
>> 1. Set all DDR and OPENDRAIN registers to $00 first
>> 2. Set all GPIO output registers to $ff next 
>> 3. Do any other setup
>> 4. Set DDR and OPENDRAIN registers to their final state as the last step
> 
> This totally loses me. What is a DDR? OPENDRAIN? How do I set them correctly? 
> What is correctly? A search on wiki did not turn up any thing useful.

This was indended for me, Donnie.  It's a change I have to make to the 
driver.


-- 
Sebastian Kuzminsky
Free!  Free!  As a Journey Man!
Feel!  Heat!  In the moon light!  -- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-16 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> I put this in the hal file the only thing different is it now pulses the 
> output when EMC starts up but I still can not control it. Right now I'm only 
> looking at the brake output. I'm sure that once I get the brake working the 
> other will be the same problem.
> 
> # Connect spindle brake to I/O controller.
> newsig SpindleBrakeOn bit
> setp hm2_5i23.0.gpio.P3.042.is_output 1
> linksp SpindleBrakeOn => hm2_5i23.0.gpio.P3.042.out
> linksp SpindleBrakeOn <= motion.spindle-brake
> 
> 
> My Fluke 23 tells me all the inputs are pulled high. Grounding them make no 
> difference on what the Halmeter is showing but my Fluke sure sees it.

I'll take a look at it over the weekend.


-- 
Sebastian Kuzminsky
Free!  Free!  As a Journey Man!
Feel!  Heat!  In the moon light!  -- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Successful Emc2 conversion (happy dance...)

2009-01-14 Thread Sebastian Kuzminsky
Tom wrote:
> I finally produced my first part on my new Kasuga/Emc2 (Mesa 5i20/7i33) knee
> mill conversion. I am very happy with the results! The mill will do 500 ipm
> rapids, and feeds so far can hit 30 ipm with very accurate results. Lots of 
> tiny
> moves tend to slow the feedrates down a bit, but I have no complaints.

Nice machine you got there :-)

For the lots of tiny moves, are you using Continuous Path Mode,  G64?


-- 
Sebastian Kuzminsky
Free!  Free!  In the moon light!  -- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-14 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> I haved used the halmeter. I can't seam to get the limit inputs either. They 
> are 5 volt prox switches that have a seperate set on Opto couplers that feed 
> to the servo amps. 

If you use a DMM, can you see the limit switches activate at the Mesa 
card connector?


> Now were do I set ".is_output " to true at?

Anywhere in the .hal file before you use the .out pins, like this:


> # linksp EstopWrite => hm2_5i23.0.out-07

setp hm2_5i23.0.gpio.027.is_output 1
linksp EstopWrite => hm2_5i32.0.gpio.027.out

The naming of GPIOs is described in the hostmot2 manpage.  The number 
between "gpio" and "is_output" is the IO Function number.  The mapping 
from IO Function number to Port & Pin-on-the-port is give in the Mesa 
manual for the 5i23, and in the log output when the driver loads (you 
see this by running "dmesg").


-- 
Sebastian Kuzminsky
Free!  Free!  In the moon light!  -- Korpiklaani

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa 5i23 and 7i37 I/O problem

2009-01-13 Thread Sebastian Kuzminsky
Donnie Timmons wrote:
> I'm having some problems getting EMC to see the I/o on port P3 of m 5i23 I 
> have P2 connect to a 7i33 and it seams to be work as I can run my motors and 
> the display show movement. I have at this time six limit switch and four 
> output wired up. The output are wired to a Opto 22 quad pack that is sink 5 
> volts to the OBIT+ pin of the 7i37 with the OBIT- tied to ground. I can 
> ground the OBIT+ side of any channel and the opto units turn on and drives 
> the AC Loads. So I know the Opto unit is good.

I'm glad your motors are working.  :-)

If the .hal file that you posted loads without error, it looks to me 
like EMC2 is seeing the P3 I/O port correctly (otherwise there would be 
no GPIO output pins).

For the outputs to work, you need to set the relevant .is_output HAL 
parameter to TRUE.  Otherwise the pin remains an input.  The mechanism 
for doing this is documented in the GPIO section of the hostmot2 manpage.

<http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#General%20Purpose%20I/O>

Do the limit switches work?  Try using halmeter to monitor the pins as 
you activate the limit switches.


-- 
Sebastian Kuzminsky

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] NOMINATION Sebastian Kuzminsky

2009-01-11 Thread Sebastian Kuzminsky
sam sokolik wrote:
> He came - he saw - he made hostmot2 a reality.
> 
> EMC is now even more flexable. (hard to believe - I know)

Thanks!  :-)

But i decline.  I intend to keep working on emc2 in my little way, but I 
do not wish to participate in the BoD at this time.


-- 
Sebastian Kuzminsky

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Auto Tune?

2009-01-08 Thread Sebastian Kuzminsky
Jim Combs wrote:
> You might not be the right person to answer this, but is it possible to
> create a Auto-Calibrate
> mode where the system would run an axis in a series of short moves in both
> directions where
> the move time is monitored and the motion variables adjusted automatically
> to try and get
> the most optimum settings.  Have a list of variables to adjust and a flag
> for the user to indicate
> auto adjust.  Are there some initial values that would most if not all the
> time, and let the system
> optimize the settings.

I think it'd be easy to automate a PID tuning system like 
Ziegler-Nichols 
<http://en.wikipedia.org/wiki/PID_tuning#Ziegler.E2.80.93Nichols_method>.

It'll get you in the ballpark at least.


> This same thing could be applied to stepper systems too.

No, stepper tuning just requires looking up the step/dir waveform timing 
specs from the manufacturer.  This is emphatically not automatable.


> The whole tuning process, setting acceleration and such seem to be one of
> the critical areas
> that people have the most trouble with.
> 
> Just a thought

Good idea!  :-)


-- 
Sebastian Kuzminsky

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5i20+sevos and ??stepper?? error

2009-01-08 Thread Sebastian Kuzminsky
Arnold Riter CNC wrote:
> Debug file information:
> insmod: error inserting 
> '/usr/realtime-2.6.24-16-rtai/modules/emc2/ddt.ko': -1 File exists
> m5i20_motion.hal:55: exit value: 1
> m5i20_motion.hal:55: insmod failed, returned -1
> 8446
>   PID TTY  STAT   TIME COMMAND
> Stopping realtime threads
> Unloading hal components
> 
> What am I doing wrong?

Looks like you're calling "loadrt ddt" more than once, with the second 
time being m5i20_motion.hal line 55.  That's not allowed.  If you need 
more ddt instances you can load it with "loadrt ddt count=N", to get N 
ddt instances.


-- 
Sebastian Kuzminsky

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] 5i20+sevos and ??stepper??

2009-01-07 Thread Sebastian Kuzminsky
WF Chan wrote:
> I am using EMC2 version 2.2.8, but I don't know is it using HostMot2, how can 
> I check it?

Start EMC2 the way you normally do it, then while it's running open a 
terminal window and run "lsmod | grep hostmot2" (without the quotes). 
If it produces any output, you're using HostMot2.


-- 
Sebastian Kuzminsky

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] New mill configuration using PID

2009-01-05 Thread Sebastian Kuzminsky
John Pfleger wrote:
> Long time reader, first time poster.

Welcome!


> I have been running a 3 axis desktop mill using Animatics Smart Motors 
> (emulating stepper motors) for 12 months now. But as the smart motors are 
> only emulating steppers, I have been thinking about converting them to 
> operate as servo motors. They have inbuilt rotary encoders that can be 
> connected to the out pins and velocity/direction can be supplied to an input 
> as a 5V analogue signal.
> My current plan is use a Mesa 7I43-U-4 to read the encoders and supply the 
> PWM signals (convert the PWM into analogue signal). Is this a 
> feasible/sensible way to go?
> 
> I must admit that I am struggling to understand exactly how to configure EMC2 
> to achieve this. Am I correct in assuming that the PID will output a 
> velocity/direction signal to the motor until the encoder counts = the new 
> positional counts. Also, the velocity will decrease as it gets closer to the 
> desired position?

Hi there, what you propose sounds perfectly reasonable.

The hm2-servo sample config included with emc2 controls a 3-axis servo 
machine using a 7i43 board, that would be a good place for you to start.

I dont know if the raw PWM signal from the 7i43 will provide a 
sufficiently clean "analog" signal to the motor amps, you may need a DAC 
board like the Mesa 7i33 or similar to produce a really smooth control 
voltage.


> This email (including any files) transmitted with it is confidential and 
> should be read only by those persons or entities to whom it is addressed. If 
> you are not the intended recipient, you are notified that any use, 
> dissemination, distribution or copying of this message or data is prohibited.
> 
> If you have received this message in error, please notify us immediately by 
> way of reply. Please also destroy and delete the message from your computer. 
> Any unauthorised form of reproduction of this message is strictly prohibited 
> and all attached information and data remains the property of Daniels.
> 
> It is the duty of the recipient to virus-scan and otherwise test the 
> information provided before loading onto any computer system.
> 
> Daniels and any member of the Daniels group does not warrant that the 
> information is free of a virus or any other defect or error.
> 
> Any views expressed in this message are those of the individual sender, 
> except where the sender specifically states them to be the views of Daniels.

This email list is archived in a couple of public places, you may want 
to rethink your "terms of use" for posts to public mailing lists.


-- 
Sebastian Kuzminsky
Dualism? Sure. Brain and Mind are different. "Brain" is a noun. "Mind"
is a verb - it's what a properly functioning Brain does.  -- DHuff

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


<    4   5   6   7   8   9   10   11   >