Greetings;

I have a startup error that doesn't make any sense to me.

From dmsg:

gene@lathe:~/linuxcnc/configs/my-lathe$ linuxcnc -l
LINUXCNC - 2.6.0-pre0-3610-g3ff05c9
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
(time=1355606562.264318,pid=2836): Registering server on TCP port 5005.
(time=1355606562.264584,pid=2836): running server for TCP port 5005 
(connection_socket = 3).
io started
iocontrol: machine: 'my-lathe'  version 'unknown'
halcmd loadusr io started
task pid=2898
task: machine: 'my-lathe'  version 'unknown'
emcTaskOnce: Python plugin configuredemcTaskOnce: extract(task_instance): 
KeyError: ('task',)

emcTaskOnce: no Python Task() instance available, using default iocontrol-
based task methods
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...
(time=1355606570.945526,pid=2836): Deleting 5 channels from the 
NML_Main_Channel_List.
(time=1355606570.945584,pid=2836): Deleting emcCommand NML channel from 
NML_Main_Channel_List.
(time=1355606570.945614,pid=2836): deleting NML (1)
(time=1355606570.945640,pid=2836):  delete (CMS *) 0x980a1e8;
(time=1355606570.945678,pid=2836): rcs_shm_close(shm->key=1001(0x3E9),shm-
>size=8192(0x2000),shm->addr=0xb7708000)
(time=1355606570.945737,pid=2836): deleting CMS (emcCommand)
(time=1355606570.945771,pid=2836): free( data = 0x980abd0);
(time=1355606570.945800,pid=2836): Leaving ~CMS()
(time=1355606570.945825,pid=2836):  CMS::delete(0x980a1e8)
(time=1355606570.945852,pid=2836):  CMS::delete successful.
(time=1355606570.945878,pid=2836): Leaving ~NML()
(time=1355606570.945902,pid=2836): NML channel deleted from 
NML_Main_Channel_List
(time=1355606570.945928,pid=2836): Deleting emcStatus NML channel from 
NML_Main_Channel_List.
(time=1355606570.945954,pid=2836): deleting NML (2)
(time=1355606570.945979,pid=2836):  delete (CMS *) 0x980fab8;
(time=1355606570.946008,pid=2836): rcs_shm_close(shm->key=1002(0x3EA),shm-
>size=16384(0x4000),shm->addr=0xb7704000)
(time=1355606570.946050,pid=2836): deleting CMS (emcStatus)
(time=1355606570.946081,pid=2836): free( data = 0x98104a0);
(time=1355606570.946109,pid=2836): Leaving ~CMS()
(time=1355606570.946133,pid=2836):  CMS::delete(0x980fab8)
(time=1355606570.946158,pid=2836):  CMS::delete successful.
(time=1355606570.946184,pid=2836): Leaving ~NML()
(time=1355606570.946209,pid=2836): NML channel deleted from 
NML_Main_Channel_List
(time=1355606570.946233,pid=2836): Deleting emcError NML channel from 
NML_Main_Channel_List.
(time=1355606570.946259,pid=2836): deleting NML (3)
(time=1355606570.946284,pid=2836):  delete (CMS *) 0x98148d0;
(time=1355606570.946312,pid=2836): rcs_shm_close(shm->key=1003(0x3EB),shm-
>size=8192(0x2000),shm->addr=0xb7702000)
(time=1355606570.946355,pid=2836): deleting CMS (emcError)
(time=1355606570.946385,pid=2836): free( data = 0x98152b8);
(time=1355606570.946413,pid=2836): Leaving ~CMS()
(time=1355606570.946438,pid=2836):  CMS::delete(0x98148d0)
(time=1355606570.946463,pid=2836):  CMS::delete successful.
(time=1355606570.946489,pid=2836): Leaving ~NML()
(time=1355606570.946513,pid=2836): NML channel deleted from 
NML_Main_Channel_List
(time=1355606570.946538,pid=2836): Deleting toolCmd NML channel from 
NML_Main_Channel_List.
(time=1355606570.946564,pid=2836): deleting NML (4)
(time=1355606570.946589,pid=2836):  delete (CMS *) 0x9817638;
(time=1355606570.946616,pid=2836): rcs_shm_close(shm->key=1004(0x3EC),shm-
>size=1024(0x400),shm->addr=0xb7701000)
(time=1355606570.946660,pid=2836): deleting CMS (toolCmd)
(time=1355606570.946689,pid=2836): free( data = 0x9818020);
(time=1355606570.946716,pid=2836): Leaving ~CMS()
(time=1355606570.946740,pid=2836):  CMS::delete(0x9817638)
(time=1355606570.946766,pid=2836):  CMS::delete successful.
(time=1355606570.946792,pid=2836): Leaving ~NML()
(time=1355606570.946817,pid=2836): NML channel deleted from 
NML_Main_Channel_List
(time=1355606570.946841,pid=2836): Deleting toolSts NML channel from 
NML_Main_Channel_List.
(time=1355606570.946869,pid=2836): deleting NML (5)
(time=1355606570.946894,pid=2836):  delete (CMS *) 0x98187d0;
(time=1355606570.946921,pid=2836): rcs_shm_close(shm->key=1005(0x3ED),shm-
>size=8192(0x2000),shm->addr=0xb76ff000)
(time=1355606570.946964,pid=2836): deleting CMS (toolSts)
(time=1355606570.946994,pid=2836): free( data = 0x98191b8);
(time=1355606570.947020,pid=2836): Leaving ~CMS()
(time=1355606570.947044,pid=2836):  CMS::delete(0x98187d0)
(time=1355606570.947071,pid=2836):  CMS::delete successful.
(time=1355606570.947096,pid=2836): Leaving ~NML()
(time=1355606570.947120,pid=2836): NML channel deleted from 
NML_Main_Channel_List
(time=1355606570.947147,pid=2836): deleting NML (1)
(time=1355606570.947174,pid=2836): Leaving ~NML()
(time=1355606570.947200,pid=2836): NML::operater delete(0x980a008)
(time=1355606570.947228,pid=2836): NML channel deleted from 
Dynamically_Allocated_NML_Objects
(time=1355606570.947255,pid=2836): deleting NML (2)
(time=1355606570.947280,pid=2836): Leaving ~NML()
(time=1355606570.947304,pid=2836): NML::operater delete(0x980f938)
(time=1355606570.947330,pid=2836): NML channel deleted from 
Dynamically_Allocated_NML_Objects
(time=1355606570.947356,pid=2836): deleting NML (3)
(time=1355606570.947381,pid=2836): Leaving ~NML()
(time=1355606570.947405,pid=2836): NML::operater delete(0x98146d0)
(time=1355606570.947431,pid=2836): NML channel deleted from 
Dynamically_Allocated_NML_Objects
(time=1355606570.947456,pid=2836): deleting NML (4)
(time=1355606570.947481,pid=2836): Leaving ~NML()
(time=1355606570.947505,pid=2836): NML::operater delete(0x98174b8)
(time=1355606570.947532,pid=2836): NML channel deleted from 
Dynamically_Allocated_NML_Objects
(time=1355606570.947557,pid=2836): deleting NML (5)
(time=1355606570.947582,pid=2836): Leaving ~NML()
(time=1355606570.947607,pid=2836): NML::operater delete(0x9818650)
(time=1355606570.947635,pid=2836): NML channel deleted from 
Dynamically_Allocated_NML_Objects
/usr/bin/milltask (pid 2898) died on signal 11, backtrace stored in 
/tmp/backtrace.2898
/usr/bin/milltask exiting
/usr/bin/linuxcnc: line 411:  2898 Segmentation fault      $EMCTASK -ini 
"$INIFILE"
Cleanup done

This was captured with full debug enabled in the .ini, but it had not been 
edited for months before this.

The machine had crashed on a linuxcnc exit, from the menu->quit about an 
hour ago, and has since been rebooted.  On the reboot, update-manager 
updated both the linuxcnc and the freecad installs, and it seems now stuck 
in the above state.

I'll go do a powerdown this time.

Didn't help.  The hal file I've been hacking on is attached.  Perhaps I've 
broken a rule somehow by setp'ing a pin?

Dave E., you might see what it is I am trying to do with this recalcitant 
cast iron bitch, attempting to compensate for the near exponential response 
of the controller board in this toy.

Logically, I think it looks like this:

motor drive
----------  --------------  ---------  -------------
| rps   >|--|> limit2.0 >|--|> abs >|--|>pid.0.cmd |
----------  --------------  ---------  -------------

Feedback
                           ---------------     
setp some value ---------->|>mult2.0.in0 |
                           | mult2.0.out>|>>
net spdlefb0    enc.0.vel->|>mult2.0.in1 | |
                \          --------------- |
                 \       <<<<<<<<<<<<<<<<<<<
                  \      |  ---------------
                   \     |->|> sum2.0.in0 |   ------------------
                    \       | sum2.0.out >|>->| pid.0.feedback |
                     \----->|> sum2.0.in1 |   ------------------
                            ---------------

So the setp controls the multipliers gain contribution to the feedback.

Earlier I was feeding both inputs of the multiplier with vel, with a scale 
& offset, but that worked so well I could get 1 rps for a 1 requested, but 
only about 1.75 rps for a 10 rps requested.  Not terribly useful. :)

Comments, fixes welcome as always.

Thanks.

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!
The universe is all a spin-off of the Big Bang.
I was taught to respect my elders, but its getting 
harder and harder to find any...
# my-lathe.hal, as of 17:13pm 08 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            1300
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    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
#addf   abs.1                           servo-thread

# 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 feedback with a "modified" square law
# uses mult2.0, sum2.0
# net   signal-name                     signal-src                      target1 
                target2                 target3
setp    mult2.0.in0                     0.001                           # set 
gain of mult2.0, start low
net     spindle-feedback0               encoder.0.velocity              
sum2.0.in0              mult2.0.in1 # feed both
net     spindle-feedback1               mult2.0.out                     
sum2.0.in1
net     spindle-feedback2               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
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!!!!!!!!!!!!!!!!!!
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?
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
------------------------------------------------------------------------------
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