Work with probe

More
29 Jun 2015 14:55 - 29 Jun 2015 15:10 #60245 by verser
Replied by verser on topic Work with probe

I do however have a few suggestions which might be useful for those of us that use touch screens...

Thanks, Ben, for interesting suggestions. I will try add something of this as far as possible .
Last edit: 29 Jun 2015 15:10 by verser.

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

More
06 Jul 2015 16:49 #60463 by ruffle
Replied by ruffle on topic Work with probe
Very nice.

One slight issue (Linuxcnc 2.7-pre6); if you change the values in the control boxes by typing in numbers instead of clicking on the up/down arrows, the new values don't get saved in the <machinename>.pref file.

They might not even take effect when directly typed in but I'm not sure on that and not in front of a machine at the moment to check.

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

More
06 Jul 2015 17:00 #60464 by andypugh
Replied by andypugh on topic Work with probe

They might not even take effect when directly typed in but I'm not sure on that and not in front of a machine at the moment to check.


This problem exists in PyVCP. I can't recall if it is also an issue with Glade, I vaguely recall doing something about it in my lathe UI, but can't rememeber which version.

There may be some clues here:
thread.gmane.org/gmane.linux.distributions.emc.user/32397

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

More
06 Jul 2015 18:29 #60466 by ArcEye
Replied by ArcEye on topic Work with probe

They might not even take effect when directly typed in but I'm not sure on that and not in front of a machine at the moment to check.


This problem exists in PyVCP........

There may be some clues here:
thread.gmane.org/gmane.linux.distributions.emc.user/32397


I fixed this for pyVCP a couple of years ago re spinboxes, when you hit Enter after entering a value, it updates the value.
(commit 4c092a8dfea9ed85d7d6d2388b9f9e04e51814a5)

However these are glade widgets, so no idea re them.

regards
The following user(s) said Thank You: verser

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

More
07 Jul 2015 03:03 #60490 by verser
Replied by verser on topic Work with probe

I fixed this for pyVCP a couple of years ago re spinboxes, when you hit Enter after entering a value, it updates the value.
(commit 4c092a8dfea9ed85d7d6d2388b9f9e04e51814a5)

However these are glade widgets, so no idea re them.

"hit Enter after entering a value" also works in Probe Screen.

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

More
15 Jul 2015 22:19 #60636 by cgtull
Replied by cgtull on topic Work with probe
I am trying this out on a virtual machine not connected to a cnc. using the (SIM) --> Axis settings. Here is my error at startup.
Previuosly had to add this to the display header to get it this far.
MAX_FEED_OVERRIDE = 50

Is it possible I do not have my folders in the right locations? Ill append the axis config file below.

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.0
Machine configuration directory is '/home/clinton/linuxcnc/configs/sim/axis'
Machine configuration file is 'axis.ini'
INIFILE=/home/clinton/linuxcnc/configs/sim/axis/axis.ini
PARAMETER_FILE=sim.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
Starting TASK program: milltask
Starting DISPLAY program: axis
RTAPI: ERROR: Unexpected realtime delay on task 1
This Message will only display once per session.
Run the Latency Test and resolve before continuing.

Unexpected realtime delay: check dmesg for details.
**** GLADE VCP INFO: Not a libglade project, trying to load as a GTK builder project
Embeded tab command "halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -u python/probe_screen.py -x 75497790 probe_icons/probe_screen.glade" exited with error: 1
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=15705
Killing task milltask, PID=15761
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
Can not find -sec EMC -var NML_FILE -num 1

(gladevcp:15771): libglade-WARNING **: Expected <glade-interface>. Got <interface>.

(gladevcp:15771): libglade-WARNING **: did not finish in PARSER_FINISH state
/usr/bin/gladevcp:191: GtkWarning: Unknown property: HAL_LED.pick-color-blink
builder.add_from_file(xmlname)
/usr/bin/gladevcp:191: GtkWarning: Unknown property: HAL_LED.led-shiny
builder.add_from_file(xmlname)
/usr/bin/gladevcp:191: GtkWarning: Unknown property: HAL_LED.blink-color
builder.add_from_file(xmlname)
/usr/bin/gladevcp:191: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
builder.add_from_file(xmlname)
Traceback (most recent call last):
File "/usr/bin/gladevcp", line 304, in <module>
main()
File "/usr/bin/gladevcp", line 209, in main
handlers = load_handlers(opts.usermod,halcomp,builder,opts.useropts)
File "/usr/bin/gladevcp", line 111, in load_handlers
mod = __import__(basename)
File "python/probe_screen.py", line 33, in <module>
CONFIGPATH1 = os.environ
File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
raise KeyError(key)
KeyError: 'CONFIG_DIR'
<commandline>:0: gladevcp exited without becoming ready
15705
PID TTY STAT TIME COMMAND
15761
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 5961.634388] I-pipe: Domain RTAI registered.
[ 5961.634514] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 5961.634521] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 5961.634568] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 5961.634582] PIPELINE layers:
[ 5961.634628] f8963e20 9ac15d93 RTAI 200
[ 5961.634642] c085cb20 0 Linux 100
[ 5961.682214] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 5961.684090] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 5961.684140] RTAI[sched]: hard timer type/freq = APIC/4124972(Hz); default timing: periodic; linear timed lists.
[ 5961.684166] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2393999000 hz.
[ 5961.684323] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 5961.689887] RTAI[usi]: enabled.
[ 5961.823082] RTAI[math]: loaded.
[ 5962.162209] RTAPI: ERROR: Unexpected realtime delay on task 1
[ 5962.162213] This Message will only display once per session.
[ 5962.162215] Run the Latency Test and resolve before continuing.
[ 5962.165934]
[ 5962.165937] In recent history there were
[ 5962.165938] 5302512, 148438, 2289085, 1363668, and 2364255
[ 5962.165940] elapsed clocks between calls to the motion controller.
[ 5962.165948] This time, there were 2409494 which is so anomalously
[ 5962.165950] large that it probably signifies a problem with your
[ 5962.165952] realtime configuration. For the rest of this run of
[ 5962.165954] EMC, this message will be suppressed.
[ 5962.165955]
[ 5969.615777] RTAI[math]: unloaded.
[ 5969.689224] SCHED releases registered named ALIEN RTGLBH
[ 5969.707544] RTAI[malloc]: unloaded.
[ 5969.805863] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 5969.826934] I-pipe: Domain RTAI unregistered.
[ 5969.827583] RTAI[hal]: unmounted.


***************************************
Axis.ini

# EMC controller parameters for a simulated machine.

# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

# General section
[EMC]

# Version of this INI file
VERSION = $Revision$

# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-HAL-SIM-AXIS

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7FFFFFFF
DEBUG = 0

# Sections for display options
[DISPLAY]

DISPLAY = axis
EMBED_TAB_NAME=Probe Screen
EMBED_TAB_COMMAND=halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -u python/probe_screen.py -x {XID} probe_icons/probe_screen.glade
MAX_FEED_OVERRIDE = 50

# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100

# Path to help file
HELP_FILE = doc/help.txt

# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE

# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2
MAX_SPINDLE_OVERRIDE = 1.0

MAX_LINEAR_VELOCITY = 1.2
DEFAULT_LINEAR_VELOCITY = .25
# Prefix to be used
PROGRAM_PREFIX = /home/clinton/linuxcnc/nc_files

# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5

EDITOR = gedit
TOOL_EDITOR = tooledit

INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script

png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

# Task controller section
[TASK]

# Name of task controller program, e.g., milltask
TASK = milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.001

# Part program interpreter section
[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE = sim.var

# Motion control section
FEATURES=30
SUBROUTINE_PATH = /home/clinton/linuxcnc/configs/sim/probe_sensor_sub
[TOOLSENSOR]
# Control probe rappid feed
RAPID_FEED = 600
[EMCMOT]

EMCMOT = motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010

# BASE_PERIOD is unused in this configuration but specified in core_sim.hal
BASE_PERIOD = 0
# Servo task period, in nano-seconds
SERVO_PERIOD = 1000000

# Hardware Abstraction Layer section
[HAL]

# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#

# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_sim.hal
HALFILE = axis_manualtoolchange.hal
HALFILE = simulated_home.hal

# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta

# Single file that is executed after the GUI has started. Only supported by
# AXIS at this time (only AXIS creates a HAL component of its own)
#POSTGUI_HALFILE = test_postgui.hal

HALUI = halui

# Trajectory planner section
[TRAJ]

AXES = 3
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 1.2
POSITION_FILE = position.txt
MAX_LINEAR_VELOCITY = 1.2

# Axes sections

# First axis
[AXIS_0]

TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1
HOME_IS_SHARED = 1

# Second axis
[AXIS_1]

TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -40.0
MAX_LIMIT = 40.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 1

# Third axis
[AXIS_2]

TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 100.0
BACKLASH = 0.000
INPUT_SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -8.0
MAX_LIMIT = 0.0001
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 1.0
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 20.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
HOME_SEQUENCE = 0
HOME_IS_SHARED = 1

# section for main IO controller parameters
[EMCIO]

# Name of IO controller program, e.g., io
EMCIO = io

# cycle time, in seconds
CYCLE_TIME = 0.100

# tool table file
TOOL_TABLE = sim.tbl
TOOL_CHANGE_POSITION = 0 0 0
TOOL_CHANGE_QUILL_UP = 1

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

More
17 Jul 2015 14:29 - 17 Jul 2015 14:32 #60668 by ruffle
Replied by ruffle on topic Work with probe
Can I suggest a modest but potentially very useful mod for this?

A probe tip offset/compensation method.

I've bought a probe (admittedly not a Renishaw!) and getting the tip centered to any reasonable accuracy is turning out to be a right pain.

Given that the probe would always be mounted in the same orientation (not unreasonable as the cable kind of dictates a natural place and I'd mark the front of the probe body and always use that facing the front of the machine), I know that probing in -X it measures 0.12 less than +X, +Y some 0.08 more than +X and -Y 0.04 less than +X.

It's easy to measure the offsets by turning the probe through 90 degrees and probing a known face in +X so if I could enter those differences into the probe routines (it doesn't even need to be in the GUI, editing the .pref file or setting a value in the machine's .ini file would be fine) and the calculations took account of the offsets I wouldn't need to worry that the probe tip is not 100% on centre.

Any chance of getting this added? or is it already there? I see references to 'tool_offset[]' in probe_screen.py but that array doesn't seem to be set to anything (warning my Python skills are less than my levitation skills :) so I could be missing the blindingly obvious!).
Last edit: 17 Jul 2015 14:32 by ruffle.

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

More
17 Jul 2015 14:39 #60669 by andypugh
Replied by andypugh on topic Work with probe

A probe tip offset/compensation method..


You can probably do this as a tool offset (ie in the tool table) for whatever tool the probe is (mine is tool 99)

I have a button for M61 T99 G43 H99

And one day I will remember to have my probe-routines check that the tool number is correct.

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

More
17 Jul 2015 18:09 #60676 by ruffle
Replied by ruffle on topic Work with probe
Doesn't the tool table only provide for one offset per axis? or have I missed something?

If it is only one offset then that doesn't help when probing a corner or circle as that needs two or three offsets respectively (assuming +X is 0 ie the probe tip radius) and even for single axis probes I'd have to change it each time.

Looking at the code some more, the references to tool_offset[] seem to apply to X, Y and Z so that's not what I'm looking for.

However, probe_screen.py calls 'xminus.ngc', 'yminus.ngc' etc and somehow gets the result of the probe therein back into the Python code (probed_position_with_offsets()? is it the print from xminus.ngc that gets fed back into python? the python stuff doesn't reference 5061 or 5062).

When I get back in front of my mill, I'll try hacking xminus.ngc as, if my guesswork is right, a tweak along the lines of:
...
G38.2 X[-#<_hal[probe.ps_probe_latch]>*2]
#<offsetprobe>=#5061 + #<_ini[TOOLSENSOR]XMINUS_OFFSET>
(print, probe X=#<offsetprobe> )
G90
...

might do the trick.

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

More
17 Jul 2015 18:14 #60677 by andypugh
Replied by andypugh on topic Work with probe

Doesn't the tool table only provide for one offset per axis? or have I missed something?


Maybe I am the one missing something, but the offset between the probe ball and the spindle axis can be described by an X offset and a Y offset. If you insert the probe into the spindle and then G43 the centre of the ball will be where the encoders say it is.

Your changes to the probe routine will probably work fine too, though.

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

Time to create page: 0.174 seconds
Powered by Kunena Forum