I am running into a couple of problems that I cant figure out.
Using the board discovery option only works when I run PNCconf as root. If I do not run as root, it will generate an error and under the output tab say "You need root privileges (or setuid root) to access PCI Hardware".
Is this normal or is this an install problem on my end?
When I run PNCConf as root, the board discovery option works fine and detects the board as it should. While running as root works to fix that, it causes other more major problems down the line. (For example, the /linuxcnc/configs and /linuxcnc/nc_files both are created as root folders, and linux cnc cant access them. It may also screw up some other things, but I am not sure on that)
Using the hostmot2 text method works fine and does not require you to run pncconf as root.
Both methods leave me with the same result. I think what is happening is it is looking a file that it cant find?
Sample one. Errors pulled from terminal while trying to run the PID Test through PNCconf
Code:
nc@nc:~$ pncconf
**** INFO firmware 0 changed
**** INFO firmware 0 changed
**** INFO firmware 0 changed
**** INFO firmware 0 changed
s-stepgen-step None
s-pwm-pulse None
s-encoder-a None
spindle-enable None
spindle-cw None
spindle-ccw None
spindle-brake None
s-pot-output None
s-stepgen-step None
s-pwm-pulse None
s-encoder-a None
spindle-enable None
spindle-cw None
spindle-ccw None
spindle-brake None
s-pot-output None
Note: Using POSIX realtime
config=" num_encoders=2 num_pwmgens=2 num_stepgens=10": dlopen: /usr/lib/linuxcnc/modules/config=" num_encoders=2 num_pwmgens=2 num_stepgens=10".so: cannot open shared object file: No such file or directory
<stdin>:14: waitpid failed /usr/bin/rtapi_app config=" num_encoders=2 num_pwmgens=2 num_stepgens=10"
<stdin>:14: /usr/bin/rtapi_app exited without becoming ready
<stdin>:14: insmod for config=" num_encoders=2 num_pwmgens=2 num_stepgens=10" failed, returned -1
<stdin>:15: parameter or pin 'hm2_5i25.0.pwmgen.pwm_frequency' not found
<stdin>:16: parameter or pin 'hm2_5i25.0.pwmgen.pdm_frequency' not found
<stdin>:17: parameter or pin 'hm2_5i25.0.watchdog.timeout_ns' not found
HAL: ERROR: function 'hm2_5i25.0.read' not found
<stdin>:18: addf failed
HAL: ERROR: function 'hm2_5i25.0.write' not found
<stdin>:23: addf failed
<stdin>:42: parameter or pin 'hm2_5i25.0.stepgen.00.step_type' not found
<stdin>:43: parameter or pin 'hm2_5i25.0.stepgen.00.control-type' not found
<stdin>:44: parameter or pin 'hm2_5i25.0.stepgen.00.position-scale' not found
<stdin>:45: parameter or pin 'hm2_5i25.0.stepgen.00.steplen' not found
<stdin>:46: parameter or pin 'hm2_5i25.0.stepgen.00.stepspace' not found
<stdin>:47: parameter or pin 'hm2_5i25.0.stepgen.00.dirhold' not found
<stdin>:48: parameter or pin 'hm2_5i25.0.stepgen.00.dirsetup' not found
<stdin>:50: parameter or pin 'hm2_5i25.0.stepgen.00.maxaccel' not found
<stdin>:51: parameter or pin 'hm2_5i25.0.stepgen.00.maxvel' not found
<stdin>:52: Pin 'hm2_5i25.0.stepgen.00.enable' does not exist
<stdin>:53: Pin 'hm2_5i25.0.stepgen.00.velocity-cmd' does not exist
<stdin>:54: Pin 'hm2_5i25.0.stepgen.00.position-fb' does not exist
<stdin>:55: Pin 'hm2_5i25.0.stepgen.00.velocity-fb' does not exist
Sample 2. Error when you try and launch Linuxcnc using the auto generated setup.
Code:
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:
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/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/nc/linuxcnc/configs/TEST1'
Machine configuration file is 'TEST1.ini'
INIFILE=/home/nc/linuxcnc/configs/TEST1/TEST1.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=tklinuxcnc
COORDINATES=XYZ
KINEMATICS=trivkins coordinates=XYZ
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
Found file(REL): ./TEST1.hal
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
hm2: loading Mesa HostMot2 driver version 0.15
hm2: unloading
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
config=" num_encoders=2 num_pwmgens=2 num_stepgens=10": dlopen: /usr/lib/linuxcnc/modules/config=" num_encoders=2 num_pwmgens=2 num_stepgens=10".so: cannot open shared object file: No such file or directory
./TEST1.hal:9: waitpid failed /usr/bin/rtapi_app config=" num_encoders=2 num_pwmgens=2 num_stepgens=10"
./TEST1.hal:9: /usr/bin/rtapi_app exited without becoming ready
./TEST1.hal:9: insmod for config=" num_encoders=2 num_pwmgens=2 num_stepgens=10" failed, returned -1
4822
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file: /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.
Date: Wed Jul 29 18:34:40 EDT 2020
UTC Date: Wed Jul 29 22:34:40 UTC 2020
this program: /usr/bin/linuxcnc_info
uptime: 18:34:40 up 1:18, 1 user, load average: 0.17, 0.17, 0.18
lsb_release -sa: LinuxMint Linuxcnc Uspace Powered by Linux Mint 19.2 Tina 19.2 tina
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/nc/linuxcnc/configs/TEST1
USER: nc
LOGNAME: nc
HOME: /home/nc
EDITOR:
VISUAL:
LANGUAGE: en_US
TERM: dumb
COLORTERM:
DISPLAY: :0
DESKTOP: mate
display size: 1920x1080 pixels (508x285 millimeters)
PATH: /usr/bin:/home/nc/linuxcnc/configs/TEST1/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
uname items:
nodename -n: nc
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Thu Mar 5 00:02:34 AEDT 2020
machine -m: x86_64
processor -p: x86_64
platform -i: x86_64
oper system -o: GNU/Linux
/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.106-rt44-lcnc root=UUID=b576e09e-7c03-4e54-91d8-6f38c7096c56 ro quiet splash isolcpus=1,2,3 vt.handoff=1
model name: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
cores: 4
cpu MHz: 1870.338
parport:
serial: 0000-0000 : serial
Versions:
gcc: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
python: Python 2.7.17
git: git version 2.17.1
git commit: NA
tcl: 8.6
tk: 8.6
glade: not_in_PATH
glade-gtk2: not_in_PATH
linuxcnc_var all:
LINUXCNCVERSION: 2.8.0~pre1
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /etc/init.d/realtime
RTS: uspace
HALLIB_DIR: /usr/share/linuxcnc/hallib
dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-============================-============-=====================================================================
un linuxcnc <none> <none> (no description available)
un linuxcnc-dev <none> <none> (no description available)
un linuxcnc-doc <none> <none> (no description available)
ii linuxcnc-doc-en 1:2.8.0~pre1.5821.g7525a1528 all motion controller for CNC machines and robots (English documentation)
un linuxcnc-sim <none> <none> (no description available)
un linuxcnc-sim-dev <none> <none> (no description available)
ii linuxcnc-uspace 1:2.8.0~pre1.5821.g7525a1528 amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.8.0~pre1.5821.g7525a1528 amd64 PC based motion controller for real-time Linux
Any thoughts? I am not sure where to start on it.
If it tells you anything, I get the same error on a virtual machine. From what I can tell the setups for standardized mesa firmware work fine, so I think it is a problem isolated to the non standard mesa firmware.
Thanks,
Shawn