Issue with G38.5
- christer
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
Using linuxcnc 2.8.4-1 and having issues with g38.5 commands. The probe I am using is a magnetic encoder on a rail and spring system to measure distance. My hal is setup so that a displacement of >0.005in will trigger the probe input. The gcode starts with a g38.3 to probe the piece to get its location. Then using g38.5 command to determine the edge of a part by moving in z until the probe falls off. I've had issues with "probe tripped during non probe move" so I am controlling the activation of the probe input signal with a digital io pin. I am still getting "probe tripped during non probe move" errors and confused as to why it is still happening.
Hal config:
#Negate Encoder Position
setp mult2.2.in0 -1.0
setp comp.0.in0 0.005 # Threshold value for encoder
net enable-probe <= motion.digital-out-03 => and2.1.in1
# Encoder position and comparator
net negated-encoder-out <= mult2.2.out
net negated-encoder-out comp.0.in1 # Connect to comparator input
net encoder-threshold-met <= comp.0.out => and2.1.in0
# AND logic to trigger only during probing motion
net probe-trigger and2.1.out motion.probe-input
Gcode:
M64 P3 (enable probing)
G38.3 F15 Y1.6 (probe vertically into the part)
G38.5 Z4 F25 (drag off edge)
M65 P3 (disable probing)
G4 P0.1 (dwell to make sure the signal was sent to disable probing)
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4605
- Thank you received: 2038
github.com/LinuxCNC/linuxcnc/pull/3537
Note that if you are considering to update the currently recommended version is 2.9.7pre:
forum.linuxcnc.org/21-axis/57364-axis-co...-9-6?start=10#336538
Please Log in or Create an account to join the conversation.
- christer
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
- Posts: 61
- Thank you received: 0
vers 2.84.
Please Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
- Posts: 61
- Thank you received: 0
As planned, I installed 2.9.4 with both 254 and 290 cores. The test result is bad - excellent jitter (less than 1000), but the same sensor response error (when performing G38.5, the sensor moves, the response stops, stops and flies out error The sensor was activated during working movement - but in the g-code program there are no commands of the form G1-G3 at all!).
In addition, a completely new mistake for me is misalignment of axes (joints)! First, Joint0 (this is the first X motor), then Joint3 (the first Y motor) - XXYYZ circuit.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 19741
- Thank you received: 4578
But given your reported issues elsewhere it might be worth setting-up to build from source. It's not especially difficult, though there is a oe-time investment in installing all the build dependencies.
Get the basic tools:
sudo apt-get install git git-gui build-essentialThen get the LinuxCNC source code:
git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-devThen enter the source directory and switch to the 2.9 branch
cd linuxcnc-dev
git checkout 2.9
git pullNow you are going to need a whole bunch of packages, dpkg knows what you need: (you need to be in the linuxcnc-dev folder , where you can see the debian folder)
./debian/configure nodocs
dpkg-checkbuilddeps
[code]
This will give a while list of packages, that you can copy and paste after a sudo apt-get install command.
Note that it might now be nodoc rather than nodocs. And the list of packages will contain a few alternatives and version numbers, so will need a bit of light editing. I am _fairly_ sure that this works still with RTAI, I know that dpkg-buildpackage doesn't (which is why RTAI debs are a bit of effort to create)
Then you can build linuxcnc. This takes about 10 minutes the first time.
[code]cd src
./autohgen.sh
./configure --enable-build-documentation=none
makeThe only complication here is that the build will be a run-in-place (can exist alongside a standard install) and to chose it you need to run a script.
. ~/linuxcnc-dev/scripts/rip-environmentPlease Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
- Posts: 61
- Thank you received: 0
2.8.4 and 4.19. 195-rtai-amd64 - works almost flawlessly, except for a known (and already fixed in 2.9.7) bug (I easily ported it to 2.9.4, as well as matrixkin from 2.10 to 2.9.7 and 2.9.4), so I have to do without G38.5
2.9.4 with kernels 254 and 290 - they are unable to work due to a bug for multi-engine configurations, see forum.linuxcnc.org/9-installing-linuxcnc...-2-9?start=60#339123
2.9.7 - of course, I don't like userspace, but I am ready to use it for G38 tasks. It is unable to work due to this, forum.linuxcnc.org/38-general-linuxcnc-q...bing?start=10#338958, bug
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 19741
- Thank you received: 4578
I am quite proficient with build-install-clone commands and have the ability to simultaneously have and use all the versions
I realised that several posts later, and could have saved myself a great deal of typing.
It is unable to work due to this, forum.linuxcnc.org/38-general-linuxcnc-q...bing?start=10#338958, bug[/b][/b][/b]
I will try to look into this, probably with a simulated probe input for simplicity.
Have you tried inserting an explicit queue-buster between the successive probe moves? (I almost feel that we should have a specific code for that, maybe related to M70)
If you insert M66 P0 L0 between the probe moves then the queue might be cleared as a side effect.
Doing some offline research about this I found wiki.linuxcnc.org/cgi-bin/wiki.pl?QueuebustersRevisited which whilst not immediately relevant does discuss some of the issues around the motion queue.
Please Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
- Posts: 61
- Thank you received: 0
Great news, thanks for the idea. I'll check it out tomorrow with version 2.9.7 and let you know the results.If you insert M66 P0 L0 between the probe moves then the queue might be cleared as a side effect.
Please Log in or Create an account to join the conversation.
- abs32
- Offline
- Senior Member
-
- Posts: 61
- Thank you received: 0
Please Log in or Create an account to join the conversation.