simulation mode
- kccheng
- Topic Author
- Offline
- New Member
- Posts: 9
- Thank you received: 1
The Z axis is reversed, that's why I invert the PIN 6 (Z-Direction)
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
I'm installing linuxcnc from source (2.9 version) on a RPi4.
Software building runs fine, no error at all but I cannot start in simulation mode to make my first tests.
I mean, I run the following on the command line:
. /home/pi/linuxcnc/scripts/rip-environment
linuxcnc
Then I select any default configuration among qtdragon, qmoccapy, even axis and always get the same in my linuxcnc_debug.txt:
Can not find -sec TRAJ -var TPMOD -num 1
Can not find -sec EMCMOT -var HOMEMOD -num 1
Here is my log:
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/pi/linuxcnc/configs/sim/qtvcp_screens/qtdragon'
Machine configuration file is 'qtdragon.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./core_sim.hal
Found file(lib): /home/pi/linuxcnc/lib/hallib/simulated_home.hal
[QTvcp][INFO] Logging to "/home/pi/linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon.log" (logger.py:102)
Traceback (most recent call last):
File "/home/pi/linuxcnc/bin/qtvcp", line 22, in <module>
from qtvcp.lib import xembed
File "/home/pi/linuxcnc/lib/python/qtvcp/lib/xembed.py", line 47, in <module>
from Xlib.protocol import event
ModuleNotFoundError: No module named 'Xlib'
Shutting down and cleaning up LinuxCNC...
task: 205 cycles, min=0.000029, max=0.024989, avg=0.009657, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/pi/linuxcnc_debug.txt
and
/home/pi/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
Here is my linuxcnc_debug.txt:
Can not find -sec TRAJ -var TPMOD -num 1
Can not find -sec EMCMOT -var HOMEMOD -num 1
7633
7670
Stopping realtime threads
Unloading hal components
And my linuxcnc_debug.txt:
RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/pi/linuxcnc/bin
LINUXCNC_TCL_DIR=/home/pi/linuxcnc/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/pi/linuxcnc/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/pi/linuxcnc/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
INIFILE=/home/pi/linuxcnc/configs/sim/qtvcp_screens/qtdragon/qtdragon.ini
VERSION=1.1
PARAMETER_FILE=qtdragon.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=qtvcp qtdragon
COORDINATES=XYZ
KINEMATICS=trivkins coordinates=XYZ
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: qtvcp
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
I can't figure out what is happening. Whatever example configuration I try, I always get the same error basically. I am absolutely lost.
Any addressing will be appreciated!
Thanks in advance.
PS: I realize LINUXCNC_DIR, TPMOD and HOMEMOD are in blanks but, I don't know if it is ok for a default simulation configuration nor where to set up to try.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
I wonder if this is Pi-specific? Otherwise I would have expected to hear more about it.
When did you last do a git pull? Possibly this was spotted and fixed.
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
Sorry to hear this. I installed version 2.9 on a RPi3 about a year ago and works fine, although a little slow. I was hopping on a RPi4 runs a little faster.This seems to be related to recent changes made to allow pluggable trajectory planners and homing modules.
I pulled the source about 2 weeks ago.When did you last do a git pull? Possibly this was spotted and fixed.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
Thanks andypugh!
Please Log in or Create an account to join the conversation.
- dgarrett
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 323
> Can not find -sec EMCMOT -var HOMEMOD -num 1
The above (irrelevant) messages have been silenced:
Ref: github.com/LinuxCNC/linuxcnc/commit/e54a8abb3e
The likely first fatal error reported is:
> from Xlib.protocol import event
> ModuleNotFoundError: No module named 'Xlib'
The required package (master branch) is python3-xlib:
Ref: github.com/LinuxCNC/linuxcnc/blob/master...n/control.top.in#L36
Install using:
$ sudo apt-get install python3-xlib
Example test to verify presence:
$ dpkg -l python3-xlib|grep ii
ii python3-xlib 0.29-1 all interface for Python 3 to the X11 protocol
$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Xlib
>>> help('Xlib.protocol')
...
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
Sorry Dewey, I was trying to clear a forum backlog and clearly didn't read the output carefully enough.> Can not find -sec TRAJ -var TPMOD -num 1
> Can not find -sec EMCMOT -var HOMEMOD -num 1
The above (irrelevant) messages have been silenced:
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
Yes dear, you are right but I underestimate this error because AFAIR it did not appear when I was testing for Axis (and Gmoccapy I think). So, I understand that the only common errors among all the GUIs I tested (QtDragon, Gmoccapy and Axis) were:> from Xlib.protocol import event
> ModuleNotFoundError: No module named 'Xlib'
> Can not find -sec TRAJ -var TPMOD -num 1
> Can not find -sec EMCMOT -var HOMEMOD -num 1
On the other hand, I trust in you:
But all this comments AFAIU, don't match to me. In Axis the python3-xlib problem did not appear, but all the above did.> Can not find -sec TRAJ -var TPMOD -num 1
> Can not find -sec EMCMOT -var HOMEMOD -num 1
The above (irrelevant) messages have been silenced:
Ref: github.com/LinuxCNC/linuxcnc/commit/e54a8abb3e
So now, I'm getting so lost!
Anyway, I'll do all you suggest:
1 - I'll do a brand new pull from git
2 - I'll install the python3-xlib
Many thanks dgarrett!
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
I did all what you suggest but none of it worked, sorry.
I send you my recent testing logs about qtdragon_auto_tool_probe simulation mode.
I ran dmesg --clear too before run linuxcnc, so dmseg output keeps clean before and after.
I'm absolutely stuck, so any tip are welcome!
Thanks in advance!
Attachments:
Please Log in or Create an account to join the conversation.