emc2 to linuxcnc config files problems

More
23 Dec 2012 01:26 #27967 by lelef
Hi,
I've changed my old cnc pc running emc and on the new one I've installed linuxcnc
I've a lot of problems changing the config files to make it work

errors... reported
....................................................................................................
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.1
Machine configuration directory is '/home/lele/linuxcnc/configs/GRAZIOLI'
Machine configuration file is 'GRAZIOLI.ini'
INIFILE=/home/lele/linuxcnc/configs/GRAZIOLI/GRAZIOLI.ini
PARAMETER_FILE=stepper.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2619
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Unrecognized line skipped: POC FMS LEN DIAM COMMENT
GRAZIOLI.hal:5: Ini variable '[EMCMOT]SHMEM_KEY' not found.
2619
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 560.789393] I-pipe: Domain RTAI registered.
[ 560.789399] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 560.789401] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 560.789404] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 560.789405] PIPELINE layers:
[ 560.789407] f8d68e20 9ac15d93 RTAI 200
[ 560.789409] c085cb20 0 Linux 100
[ 560.805878] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 560.805963] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 560.805966] RTAI[sched]: hard timer type/freq = APIC/12557075(Hz); default timing: periodic; linear timed lists.
[ 560.805968] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2813003000 hz.
[ 560.805970] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 560.806036] RTAI[usi]: enabled.
[ 560.850915] RTAI[math]: loaded.
[ 561.199375] RTAI[math]: unloaded.
[ 561.226757] SCHED releases registered named ALIEN RTGLBH
[ 561.240708] RTAI[malloc]: unloaded.
[ 561.340038] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 561.342065] I-pipe: Domain RTAI unregistered.
[ 561.342072] RTAI[hal]: unmounted.
.......................................................................................................................................................
this is my .ini
.....................................................................................................................................................
# Generated by stepconf at Tue May 13 01:05:50 2008
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
MACHINE = GRAZIOLI
NML_FILE = emc.nml
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/cnc/emc2/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm3
PYVCP = panel.xml
EDITOR = gedit

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = stepper.var

[EMCMOT]
EMCMOT = motmod
#SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010

#+ Base task period, in nanosecs - this is the fastest thread in the machine
BASE_PERIOD = 25000
#- Servo task period, in nanosecs - will be rounded to an int multiple of BASE_PERIOD
SERVO_PERIOD = 500000
#- Trajectory Planner task period, in nanosecs - will be rounded to an
# integer multiple of SERVO_PERIOD
TRAJ_PERIOD = 5000000
[HAL]
HALUI = halui
HALFILE = GRAZIOLI.hal
# HALFILE = joypad_V3.hal
HALFILE = joypad_and_pendant.hal

# POSTGUI_HALFILE = custom_postgui.hal

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 5.00
MAX_VELOCITY = 20.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 22.00
MAX_ACCELERATION = 60.0
STEPGEN_MAXACCEL = 61.0
SCALE = 665.6
FERROR = 1
MIN_FERROR = .40
MIN_LIMIT = -2000.0
MAX_LIMIT = 2000.0
HOME_OFFSET = 0.0
BACKLASH = 0.000
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 18.00
MAX_ACCELERATION = 42.0
STEPGEN_MAXACCEL = 43.0
SCALE = 1024
FERROR = 1
MIN_FERROR = .40
MIN_LIMIT = -2000.0
MAX_LIMIT = 2000.0
HOME_OFFSET = 0.0
BACKLASH = 0.000
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 38.0
STEPGEN_MAXACCEL = 39.0
SCALE = 1486.26285714
FERROR = 1
MIN_FERROR = .30
MIN_LIMIT = -2000.0
MAX_LIMIT = 2000.0
HOME_OFFSET = 0.0
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
.................................................................................................................................................
these are my .hal files
............................................................................................................................................................
# Generated by stepconf at Tue May 13 01:05:50 2008
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES
#0000:01:06.0 Parallel controller: NetMos Technology: Unknown device 9865 (prog-i f 03 #[IEEE1284])
# Subsystem: Unknown device a000:2000
# Flags: bus master, medium devsel, latency 32, IRQ 11
# I/O ports at a000
# I/O ports at a400
# Memory at df003000 (32-bit, non-prefetchable) [size=4K]
# Memory at df000000 (32-bit, non-prefetchable) [size=4K]
# Capabilities: <available only to root>

#0000:01:06.2 Parallel controller: NetMos Technology: Unknown device 9865 (prog-i f 03 #[IEEE1284])
# Subsystem: Unknown device a000:2000
# Flags: bus master, medium devsel, latency 32, IRQ 9
# I/O ports at a800
# I/O ports at ac00
# Memory at df001000 (32-bit, non-prefetchable) [size=4K]
# Memory at df002000 (32-bit, non-prefetchable) [size=4K]
# Capabilities: <available only to root>
#vecchia 0000:01:06.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
# Subsystem: LSI Logic / Symbios Logic: Unknown device 0010
# Flags: medium devsel, IRQ 11
# I/O ports at 8000
# I/O ports at 8400
# I/O ports at 8800
# I/O ports at 8c00
# I/O ports at 9000
#I/O ports at 9400


loadrt probe_parport
#loadrt hal_parport cfg="0xa000"
loadrt hal_parport cfg="0xa000 0xa800 in"

setp parport.0.reset-time 1000
#setp parport.1.reset-time 1000
loadrt stepgen step_type=0,0,0


addf parport.0.read base-thread
addf parport.1.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.write base-thread
addf parport.1.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cw <= motion.spindle-forward
net coolant-flood <= iocontrol.0.coolant-flood

setp parport.0.pin-02-out-invert 1
setp parport.0.pin-04-out-invert 1
setp parport.0.pin-06-out-invert 1
net xdir => parport.0.pin-02-out
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net spindle-cw => parport.0.pin-14-out
net coolant-flood => parport.0.pin-16-out

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 14000
setp stepgen.0.dirsetup 10300
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_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 14000
setp stepgen.1.dirsetup 10300
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

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

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

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
...........................................................................................................................................
n2
......................................................................................................................................
# Hal configuration file to move a cnc machine using a joypad using joyhandle component

# Copyright 2008 Paul Willutzki <paul[at]willutzki[dot]de>

# Licence: GPL

# Version 3

# This Hal-File needs the joyhandle component.
# This uses the following formula for a non linear joypad movements:
# y = (scale * (a*x^power + b*x)) + offset
#
# The parameters a and b are adjusted in such a way, that the function starts at (deadband,offset) and ends at (1,scale+offset).
# Negative values will be treated point symetrically to origin. Values -deadband < x < +deadband will be set to zero.
# Values x > 1 and x < -1 will be skipped to +-scale+offset. Negative scale values invert the movement.
# With power one can adjust the nonlinearity (default = 2).
# Default for deadband is 0.
# Valid values are: power >= 1.0 (reasonable values are 1.x .. 4-5), 0 <= deadband < 0.99 (reasonable 0.1). If you use high deadbands (>0.5) you need higher power values to smoothly start at (deadband,offset).
# The additional offset component can be set in special cases (default = 0).
# All values can be adjusted for each instance (joypad axis) separately.

# Please take also a look at the manpages for johandle.

# Insert the following lines in the INI-File (section [HAL])
# HALUI = halui
# HALFILE = joypad_V3.hal

# Load the hal_input component that creates pins for axes and buttons
# See man hal_input for details and finding input devices
#loadusr -W hal_input -GreenAsia Inc. USB Joystick
loadusr -W hal_input -KRAL GreenAsia

# load joyhandle component and attach to threads (in this case 3 instances)
loadrt joyhandle count=3
addf joyhandle.0 servo-thread # x
addf joyhandle.1 servo-thread # y
addf joyhandle.2 servo-thread # z


setp halui.jog-speed 400 # desired maximum jog speed mm/min

# --Start-- These parameters ara used to set up joyhandle
setp halui.jog-deadband 0.05 # important: default value is 0.2, that would override joyhandle.deadband
setp joyhandle.0.power 1
setp joyhandle.1.power 1
setp joyhandle.2.power 1 # in my case the z-axis is set up more sensitive

setp joyhandle.0.scale 1
setp joyhandle.1.scale 1 # negative values invert jogging
setp joyhandle.2.scale 1 # in my case the z-axis is scaled to lower speed
# --End--

# connect hal_input to halui via
net joy-x-jog halui.jog.0.analog <= input.0.abs-x-position
net joy-y-jog halui.jog.1.analog <= input.0.abs-y-position
net joy-z-jog halui.jog.2.analog <= input.0.abs-rz-position


# comandi button
net spindleOn input.0.btn-top2 => halui.spindle.start
net spindleOff input.0.btn-base => halui.spindle.stop


net floodon input.0.btn-pinkie => halui.flood.on
net floodoff input.0.btn-base2 => halui.flood.off




net zerox input.0.btn-trigger => halui.joint.0.home
net zeroy input.0.btn-thumb => halui.joint.1.home
net zeroz input.0.btn-thumb2 => halui.joint.2.home





# ON button


net machineOn input.0.btn-base6 => halui.machine.on

#
# Jog Pendant
setp parport.1.pin-01-out true #il led
setp parport.1.pin-14-out true #non fa nlla
setp parport.1.pin-16-out true #
setp parport.1.pin-17-out true
loadrt or2 count=1
loadrt encoder num_chan=1
loadrt mux4 count=1
setp encoder.0.x4-mode false


addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
addf or2.0 servo-thread

setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001

net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in

net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale <= mux4.0.out
net pend-scale axis.2.jog-scale <= mux4.0.out

net mpg-a encoder.0.phase-A <= parport.1.pin-02-in-not
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in-not


net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts <= encoder.0.counts
net pend-counts axis.2.jog-counts <= encoder.0.counts

net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in

# net ENwhell parport.1.pin-08-in => parport.1.pin-01-out

# pin 08 enable switch secondo scatto divnta true quando premuto
# pin 15 emergenza premuto false disarmato +true
#parport.1.pin-01-out
#parport.1.pin-14-out
#parport.1.pin-16-out
#parport.1.pin-17-out


# FUNGO button

net fungoon input.0.btn-base5 => or2.0.in0
net buttonPE parport.1.pin-15-in-not => or2.0.in1
net buttonemergenz or2.0.out => halui.estop.activate


# FUNGO button
#net fungoon input.0.btn-base5 => halui.estop.activate
net fungooff input.0.btn-top => halui.estop.reset



I'v just done some changes but the errors seems to be really a lot

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 01:38 #27968 by BigJohnT
Did you follow the instructions on this page for upgrading?

John

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 02:56 #27969 by lelef
Thank you,
it doesn't look very easy
I've spent a lot of days to make it working on emc and now there is a lot of work to do again.
Is it possible to download the old emc2
Sorry to say it but incompatibility between one version and another that have to be corrected by users isn't a good way to write software.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 06:05 #27970 by Rick G
What version were you running?

Rick G

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 16:00 - 23 Dec 2012 16:09 #27976 by lelef
the old should be 2.3 or 2.4
The pc is broken, I've installed the last version on a new pc and I've taken the old config files from the old hd but I don't know if is possible to understand what was the emc2 version I've used
I've modified the ini making copy and past with the stepper mm example config and now it seems to be ok.
The "panel" wasn't a problem, it's only a remainder for when I change from 3 axes to 4 axis that has a different .ini and .hal files
the .hal files seems to be more complex because I use external buttons ,a joypad and a pendant
I've started to work with the 3 axis files
If I can I prefer to use the last version , but I've to learn again how to make the configurations, the last time I've done this work was 4 years ago
Last edit: 23 Dec 2012 16:09 by lelef.

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 17:17 #27977 by Rick G

I've modified the ini making copy and past with the stepper mm example config and now it seems to be ok.


O.K. so you have the 3 axis up and running, but are you still having problems with the hal file?

Rick G

Please Log in or Create an account to join the conversation.

More
23 Dec 2012 20:34 #27978 by lelef
probably I've done some errors with the joypad device rules I've added only on old joypad .hal till now (whithout pendant and buttons).
I've seen the example and it seems to be the same used with emc2 ,I've copied the old rules on the new pc and I'm trying to make it work.
I'will copy and paste one pice at time till I'll find the problem

Please Log in or Create an account to join the conversation.

Time to create page: 0.474 seconds
Powered by Kunena Forum