On Sunday 16 December 2012 10:59:45 Michael Haberler did opine:

> Am 16.12.2012 um 13:04 schrieb Gene Heskett:
> > I've been playing, getting rid of any setp's that referenced a normal
> > input pin, so I have generated several of those by now.
> > 
> > Here is the first one:
> > 
> > stack trace for /usr/bin/milltask pid=1584 signal=11
> > [Thread debugging using libthread_db enabled]
> > 0x00f9c422 in __kernel_vsyscall ()
> > [Current thread is 1 (Thread 0xb785c6d0 (LWP 1584))]
> > #0  0x00f9c422 in __kernel_vsyscall ()
> > #1  0x004a9e93 in waitpid () from /lib/tls/i686/cmov/libc.so.6
> > #2  0x0807e894 in ?? ()
> > #3  <signal handler called>
> > #4  0x08056010 in ?? ()
> > #5  0x0805fa1a in ?? ()
> > #6  0x0806333d in ?? ()
> > #7  0x00423bd6 in __libc_start_main () from
> > /lib/tls/i686/cmov/libc.so.6 #8  0x08055f61 in ?? ()
> 
> How did you arrive at this installation?
> 
update-manager installed, from Lucid master-rt

/etc/apt/sources.list entry:
deb http://buildbot.linuxcnc.org lucid master-rt

This particular version is about 2 days old now.

>From package archives:
gene@lathe:/var/cache/apt/archives$ ls -l|grep linuxc
-rw-r--r-- 1 root root  4016658 2012-11-29 04:02 
linuxcnc_1%3a2.5.1.125.g56fcfdd_i386.deb
-rw-r--r-- 1 root root  4016544 2012-11-30 12:50 
linuxcnc_1%3a2.5.1.128.g24f0768_i386.deb
-rw-r--r-- 1 root root  4016702 2012-12-05 16:26 
linuxcnc_1%3a2.5.1.132.gf6dae7f_i386.deb
-rw-r--r-- 1 root root  4025638 2012-12-10 14:59 
linuxcnc_1%3a2.5.1.138.g02e7afa_i386.deb
-rw-r--r-- 1 root root  4953192 2012-12-12 06:07 
linuxcnc_1%3a2.6.0~pre0.3568.gc20e22f_i386.deb
-rw-r--r-- 1 root root  4964146 2012-12-15 03:21 
linuxcnc_1%3a2.6.0~pre0.3610.g3ff05c9_i386.deb
-rw-r--r-- 1 root root  8439986 2012-11-29 04:02 
linuxcnc-doc-en_1%3a2.5.1.125.g56fcfdd_all.deb
-rw-r--r-- 1 root root  8440002 2012-11-30 12:50 
linuxcnc-doc-en_1%3a2.5.1.128.g24f0768_all.deb
-rw-r--r-- 1 root root  8440086 2012-12-05 16:26 
linuxcnc-doc-en_1%3a2.5.1.132.gf6dae7f_all.deb
-rw-r--r-- 1 root root  8444712 2012-12-10 14:59 
linuxcnc-doc-en_1%3a2.5.1.138.g02e7afa_all.deb
-rw-r--r-- 1 root root 10486144 2012-12-12 06:07 
linuxcnc-doc-en_1%3a2.6.0~pre0.3568.gc20e22f_all.deb
-rw-r--r-- 1 root root 10495280 2012-12-15 03:21 
linuxcnc-doc-en_1%3a2.6.0~pre0.3610.g3ff05c9_all.deb

The break in version above was because someone requested I switch from
2.5_branch-rt to master-rt several days ago.  I did that on the milling
machine too, and its running fine.

I ran synaptic to remove & re-install, but there's a new update now, so I'll try
that first.

Didn't help, after the update:

gene@lathe:~/linuxcnc/configs/my-lathe$ linuxcnc -l
LINUXCNC - 2.6.0-pre0-3617-gc5fdc8c
Machine configuration directory is '/home/gene/linuxcnc/configs/my-lathe'
Machine configuration file is 'my-lathe.ini'
Starting LinuxCNC...
redis server started as: 'redis-server ', logging to: /dev/null
io started
halcmd loadusr io started
task pid=19293
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
Shutting down and cleaning up LinuxCNC...
/usr/bin/milltask (pid 19293) died on signal 11, backtrace stored in 
/tmp/backtrace.19293
/usr/bin/milltask exiting
/usr/bin/linuxcnc: line 411: 19293 Segmentation fault      $EMCTASK -ini 
"$INIFILE"
Cleanup done
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/gene/linuxcnc_debug.txt
and
    /home/gene/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

/tmp/backtrace.19293:
[Thread debugging using libthread_db enabled]
0x00f89422 in __kernel_vsyscall ()
[Current thread is 1 (Thread 0xb78176d0 (LWP 19293))]
#0  0x00f89422 in __kernel_vsyscall ()
#1  0x0021de93 in waitpid () from /lib/tls/i686/cmov/libc.so.6
#2  0x0807e894 in ?? ()
#3  <signal handler called>
#4  0x08056010 in ?? ()
#5  0x0805fa1a in ?? ()
#6  0x0806333d in ?? ()
#7  0x00197bd6 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#8  0x08055f61 in ?? ()

Now I'll remove and re-install

No difference, same failure trace as above.

>From dmesg for this new try:

milltask[19854]: segfault at 0 ip 08056010 sp bfbc3614 error 4 in 
milltask[8048000+5c000]

> this looks like stripped binaries without debug symbols which means it's
> hopeless to debug anything with them.
 
Its your build.  And this seems to be time connected the the 8 names
patch I saw go by. BUT, I just updated the machine running the mill to
the same version, and its fine except for all the extra printouts in the
backplot window.  When they cover the whole window area, that is very
distracting.  These are supposedly identical shoeboxes with a D525MW
board in them, but I am not convinced the psu in the box on the lathe
is solid.  I have had several crashes from pulling down the file menu
and clicking quit, the screen goes dark & 4 secs later I'm looking
at the bios sign-on. I even had one such occur as I was waking it up
from the screen blanking & screen powered down state.

These two machines have identical installs EXCEPT, this one also has
freecad installed, which is updated 2 to 4x a week.  The mill doesn't,
its monitor is smaller, whereas the lathe has a 22" Samsung HDTV as
its monitor.  Its tuner died, but they make great pix, so I might as 
well use it up.  Freecad looks nice on a 22" :)

> For comparison, here is what I get if 'killall -s11 milltask' on a local
> simulator build of master, which gives a clear picture of where things
> happened:
> 
> -m
> 
> stack trace for /home/mah/emc2-test/bin/milltask pid=1884 signal=11
> [Thread debugging using libthread_db enabled]
> 0xb775d424 in __kernel_vsyscall ()
> [Current thread is 1 (Thread 0xb6e1f6d0 (LWP 1884))]
> #0  0xb775d424 in __kernel_vsyscall ()
> #1  0xb7099e93 in __waitpid_nocancel ()
>     at ../sysdeps/unix/syscall-template.S:82
> #2  0x0807ed74 in backtrace (signo=11) at emc/task/backtrace.cc:34
> #3  <signal handler called>
> #4  0xb775d424 in __kernel_vsyscall ()
> #5  0xb70c92ed in ___newselect_nocancel ()
>     at ../sysdeps/unix/syscall-template.S:82
> #6  0xb74aa82c in esleep (seconds_to_sleep=0.00097401237487792971)
>     at libnml/os_intf/_timer.c:92
> #7  0xb74ab575 in RCS_TIMER::wait (this=0x8f09b18)
>     at libnml/os_intf/timer.cc:156
> #8  0x08063c83 in main (argc=3, argv=0xbfb50e64)
>     at emc/task/emctaskmain.cc:3473

About the only thing I haven't posted is the hal file, so
here it is:

# my-lathe.hal, as of 17:13pm 15 Dec 2012 by Gene Heskett
loadrt  trivkins
loadrt  [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD 
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt  probe_parport
loadrt  hal_parport                     cfg="0x378 out  "
setp    parport.0.reset-time            1350
loadrt  encoder                         num_chan=1
loadrt  stepgen                         step_type=0,0
loadrt  pwmgen                          output_type=0
loadrt  pid                             num_chan=1
loadrt  mult2                           count=2
loadrt  comp                            count=1
loadrt  limit2                          count=3
loadrt  abs                             count=1
loadrt  sum2                            count=1
loadrt  scale                           count=2

addf    parport.0.read                  base-thread
addf    encoder.update-counters         base-thread
addf    stepgen.make-pulses             base-thread
addf    pwmgen.make-pulses              base-thread
addf    parport.0.write                 base-thread
addf    parport.0.reset                 base-thread

addf    encoder.capture-position        servo-thread
addf    stepgen.capture-position        servo-thread
addf    motion-command-handler          servo-thread
addf    motion-controller               servo-thread
addf    stepgen.update-freq             servo-thread
addf    mult2.0                         servo-thread
addf    mult2.1                         servo-thread
addf    sum2.0                          servo-thread
addf    pid.0.do-pid-calcs              servo-thread
addf    pwmgen.update                   servo-thread
addf    scale.0                         servo-thread
addf    scale.1                         servo-thread
addf    limit2.0                        servo-thread    # spindle speed ramp
addf    limit2.1                        servo-thread    # velocity maxv delta
addf    limit2.2                        servo-thread    # slow the electronic 
fuse
addf    comp.0                          servo-thread    # won't be needed 
eventually
addf    abs.0                           servo-thread    # make spindle vel abs


# setup spindle pwmgen.0
setp    pwmgen.0.pwm-freq               180.0
setp    pwmgen.0.scale                  490     # arbitrary, is gain control
setp    pwmgen.0.offset                 0.0     # overcome friction in drive?
setp    pwmgen.0.dither-pwm             true
setp    pwmgen.0.max-dc                 0.98
setp    pwmgen.0.min-dc                 0.005   # min duty cycle .5% or just 
creeping rpm
setp    pid.0.Pgain                     20.00   # more is stiffer but oscillates
setp    pid.0.Igain                     0.25    # 25% integral
setp    pid.0.Dgain                     0.0     # not useful in velocity mode 
for spindle
setp    pid.0.FF0                       39.000  # match encoder slots??
setp    pid.0.FF1                       0       # Similar to Igain? Similar 
effects... 
setp    pid.0.FF2                       0       # Similar to Dgain? not useful 
for velocity
setp    pid.0.maxoutput                 10000   # keep it from running away, 
but what is it?

# setup pid.0.command channel, with delay for startup surges, otherwise 
straight thru
# net   signal-name                     signal-src                      target1 
        target2         target3
net     spindle-drive0                  motion.spindle-speed-out-rps    
limit2.0.in
setp    limit2.0.maxv                   5                               # max 
delta speed per second
net     spindle-drive1                  limit2.0.out                    abs.0.in
net     spindle-drive2                  abs.0.out                       
pid.0.command
# Thats all for cmd folks!

# setup pid.0.feedback path with a "modified" square law due to motor
# controller in the lathe being very non-linear, to get any spindle motion 
# at all, the pwmgen output duty is around 25%!
# uses mult2.0, sum2.0
# net   signal-name                     signal-src                      target1 
        target2         target3
setp    scale.0.gain                    1.0     # set contribution to feedback 
from velocity
setp    scale.1.gain                    1.0     # set contribution to feedback 
from multiplied velocity
setp    scale.0.offset                  0.0
setp    scale.1.offset                  0.0     
net     spindle-feedback0               encoder.0.velocity              
scale.0.in      scale.1.in      mult2.0.in0

# connect in0 side of sum2
net     spindle-feedback1               scale.0.out                     
sum2.0.in0

# connect in1 side of sum2
net     spindle-feedback2               scale.1.out                     
mult2.0.in1
net     spindle-feedback3               sum2.0.out                      
pid.0.feedback

#                               hook pid to pwmgen and electronic fuse input
net     spindle-pwm                     pid.0.output                    
pwmgen.0.value

#                                       Setup encoder for closed loop spindle 
speed control
setp    encoder.0.counter-mode          false   # counts quadrature when false
setp    encoder.0.index-enable          true
setp    encoder.0.x4-mode               false   # smoother output?  Yes
setp    encoder.0.position-scale        39.00   # of slots in wheel for 1 turn 

net     spindle-enable                  motion.spindle-on               
pwmgen.0.enable         pid.0.enable

# Now, setup electronic fuse
setp    comp.0.in1                      31000.0 # rough swag, hyst is added to 
get trip point
setp    comp.0.hyst                     20.75   # arbitrary, neither calibrated 
yet
net     spindle-err                     pid.0.error                     
limit2.2.in
setp    limit2.2.maxv                   10
net     spindler-err-timed              limit2.2.out                    
mult2.1.in0             mult2.1.in1
net     fuse-trip-value                 mult2.1.out                     
comp.0.in0
net     save-a-fuse1                    comp.0.out                      
motion.enable

# This next one is needed to tell axis to make the +- buttons and the override 
slider
net     dumbsig                         motion.spindle-speed-out
net     spindle-velocity                motion.spindle-speed-in
net     spindle-index                   encoder.0.index-enable                  
motion.spindle-index-enable
net     spindle-index                                                           
pid.0.index-enable
net     spindle-ccw                     motion.spindle-reverse

# save spindle revs since initialized DO WE NEED THIS? Definitely not used 
anyplace
net     encoder.turns-motion            encoder.0.position-interpolated         
motion.spindle-revs

# This needs an EStop-in pin for the electronic fuse I just ordered!
net     estop-out                       parport.0.pin-01-out
net     xstep                           parport.0.pin-02-out
setp    parport.0.pin-02-out-reset      1
net     xdir                            parport.0.pin-03-out
net     zstep                           parport.0.pin-04-out
setp    parport.0.pin-04-out-reset      1
net     zdir                            parport.0.pin-05-out
setp    parport.0.pin-06-out-reset      1
net     astep                           parport.0.pin-08-out
setp    parport.0.pin-08-out-reset      1
net     adir                            parport.0.pin-09-out
net     spindle-ccw                     parport.0.pin-16-out
net     pwm-out                         pwmgen.0.pwm                    
parport.0.pin-14-out
net     xenable                         parport.0.pin-17-out
net     A-phase                         encoder.0.phase-A               
parport.0.pin-12-in
net     B-phase                         encoder.0.phase-B               
parport.0.pin-15-in
net     Z-index                         encoder.0.phase-Z               
parport.0.pin-13-in

setp    stepgen.0.position-scale        [AXIS_0]SCALE
setp    stepgen.0.steplen               1
setp    stepgen.0.stepspace             1
setp    stepgen.0.dirhold               8300
setp    stepgen.0.dirsetup              5300
setp    stepgen.0.maxaccel              [AXIS_0]STEPGEN_MAXACCEL
net     xpos-cmd                        axis.0.motor-pos-cmd            
stepgen.0.position-cmd
net     xpos-fb                         stepgen.0.position-fb           
axis.0.motor-pos-fb
net     xstep                           stepgen.0.step
net     xdir                            stepgen.0.dir
net     xenable                         axis.0.amp-enable-out           
stepgen.0.enable

setp    stepgen.1.position-scale        [AXIS_2]SCALE
setp    stepgen.1.steplen               1
setp    stepgen.1.stepspace             1
setp    stepgen.1.dirhold               8300
setp    stepgen.1.dirsetup              5300
setp    stepgen.1.maxaccel              [AXIS_2]STEPGEN_MAXACCEL
net     zpos-cmd                        axis.2.motor-pos-cmd            
stepgen.1.position-cmd
net     zpos-fb                         stepgen.1.position-fb           
axis.2.motor-pos-fb
net     zstep                           stepgen.1.step
net     zdir                            stepgen.1.dir
net     zenable                         axis.2.amp-enable-out           
stepgen.1.enable

net     estop-out                       iocontrol.0.user-enable-out
net     estop-out                       iocontrol.0.emc-enable-in

# NOT USED YET, Does it need to be addf'd when?
loadusr -W hal_manualtoolchange
net     tool-change                     iocontrol.0.tool-change         
hal_manualtoolchange.change
net     tool-changed                    iocontrol.0.tool-changed        
hal_manualtoolchange.changed
net     tool-number                     iocontrol.0.tool-prep-number    
hal_manualtoolchange.number
net     tool-prepare-loopback           iocontrol.0.tool-prepare        
iocontrol.0.tool-prepared

Error check me on the above, based on the eyeballs that made the error
are not capable of seeing it theory.

Thanks Michael.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
Three minutes' thought would suffice to find this out; but thought is
irksome and three minutes is a long time.
                -- A. E. Houseman
I was taught to respect my elders, but its getting 
harder and harder to find any...

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to