7i96 and PlasmaC Permission Denied

More
20 Aug 2019 01:24 #142532 by MakingStuff
I have been trying to get the PlasmaC up and running on my machine and have run into a permission problem. I have been following the documentation and created a base machine that works fine using a 7i96 Mesa board.

When I try to run the config that the PlasmaC config tool created, I get an error that says "hm2_eth: rtapi_app_main : Permission Denied (-13)". I don't get this error on the base machine setup.

Anyone know what I am doing wrong? I am a Windows guy and Linux is still new to me. Any help would be appreciated.

Thanks,
Bob

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

More
20 Aug 2019 01:37 #142534 by PCW
Is it possible that you are attempting to run one config when another is still running?

Can you post the hal file that reports that error?

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

More
20 Aug 2019 02:48 - 20 Aug 2019 02:51 #142541 by MakingStuff
I rebooted the machine just to be sure nothing was running to prevent it from working, and now it says that the network is unreachable instead of Permission denied.

Here is the hal file that the PlasmaC tool created.

# This file was created with the 7i96 Wizard on Jul 13 2019 15:27:21
# If you make changes to this file DO NOT run the configuration tool again!
# This file will be replaced with a new file if you do!

# kinematics
loadrt [KINS]KINEMATICS

# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

# standard components
loadrt pid num_chan=4

# hostmot2 driver
loadrt hostmot2

loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](IPADDRESS) config="num_encoders=[HOSTMOT2](ENCODERS)num_stepgens=[HOSTMOT2](STEPGENS)"sserial_port_0=[HOSTMOT2](SSERIAL_PORT)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000

# THREADS
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -100
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread

# Joint 0
# axis enable chain
newsig emcmot.0.enable bit
sets emcmot.0.enable FALSE
net emcmot.0.enable <= joint.0.amp-enable-out
net emcmot.0.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable

# position command and feedback
net emcmot.0.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.0.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb joint.0.motor-pos-fb pid.0.feedback
net motor.0.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true

setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1

setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.0.maxerror [JOINT_0]MAX_ERROR

# Joint 1
# axis enable chain
newsig emcmot.1.enable bit
sets emcmot.1.enable FALSE
net emcmot.1.enable <= joint.1.amp-enable-out
net emcmot.1.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable

# position command and feedback
net emcmot.1.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.1.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb joint.1.motor-pos-fb pid.1.feedback
net motor.1.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true

setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1

setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.1.maxerror [JOINT_1]MAX_ERROR

# Joint 2
# axis enable chain
newsig emcmot.2.enable bit
sets emcmot.2.enable FALSE
net emcmot.2.enable <= joint.2.amp-enable-out
net emcmot.2.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable

# position command and feedback
net emcmot.2.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net motor.2.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb joint.2.motor-pos-fb pid.2.feedback
net motor.2.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true

setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1

setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.2.maxerror [JOINT_2]MAX_ERROR

# Joint 3
# axis enable chain
newsig emcmot.3.enable bit
sets emcmot.3.enable FALSE
net emcmot.3.enable <= joint.3.amp-enable-out
net emcmot.3.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable pid.3.enable

# position command and feedback
net emcmot.3.pos-cmd joint.3.motor-pos-cmd => pid.3.command
net motor.3.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb joint.3.motor-pos-fb pid.3.feedback
net motor.3.command pid.3.output hm2_[HOSTMOT2](BOARD).0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true

setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 1

setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
setp pid.3.deadband [JOINT_3]DEADBAND
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
setp pid.3.maxerror [JOINT_3]MAX_ERROR

# Spindle
#setp hm2_7i96.0.pwmgen.00.output-type 0
#setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
#setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY

# Standard I/O Block - EStop, Etc
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in

#Toolchange passthrough
net tool:change iocontrol.0.tool-change => iocontrol.0.tool-changed
net tool:prep iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Last edit: 20 Aug 2019 02:51 by MakingStuff.

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

More
20 Aug 2019 02:59 - 20 Aug 2019 03:00 #142542 by MakingStuff
I also figured out that if I boot the machine with the network cable plugged into the 7i96, I get network unreachable error. If I boot the machine with the network cable plugged into the router and then switch it over to the 7i96, I get permission denied error.

However, no matter where the network cable is plugged in while booting. The base machine always works.

Bob
Last edit: 20 Aug 2019 03:00 by MakingStuff.

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

More
20 Aug 2019 03:08 #142543 by rodw
You should have a direct connection between the mesa card and the Controlling PC

Does your HOSTMOT2 commands have matching entries in your ini file?

I'm a bit old school now but I have this in my hal file for my 7i76e

loadrt hm2_eth board_ip="10.10.10.10" config="firmware=/home/plasma/linuxcnc/configs/Plasma3.10.01/7i76e_7i76x1_PktD.bit num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=2xxxx"

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

More
20 Aug 2019 03:12 #142544 by MakingStuff

You should have a direct connection between the mesa card and the Controlling PC


It is a direct connection from the PC to the Mesa Board.

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

More
20 Aug 2019 03:27 #142545 by rodw
Sorry, you mentioned router. So permission denied usually means a file does not have execute permission.
I'm by no means a Linux expert either. I guess its possible you don't have permission to access the ethernet port.
The only thing I've ever noticed is that my 7i76e needs to be powered up before starting lInuxcnc. No need to boot the computer.

Can you ping the mesa IP? I'd get that right before worrying about your config.

How did you install Linuxcnc. Did you build from source or did you use the ISO file?
What version of Linuxcnc is running? Its reported on startup.

If you start linuxcnc from the command line, what errors are reported if any?

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

More
20 Aug 2019 04:23 #142552 by PCW
Sounds like you do not have the Ethernet port on your PC configured correctly

what does:

ip a

report?

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

More
20 Aug 2019 12:11 #142590 by MakingStuff

Can you ping the mesa IP? I'd get that right before worrying about your config.

How did you install Linuxcnc. Did you build from source or did you use the ISO file?
What version of Linuxcnc is running? Its reported on startup.

If you start linuxcnc from the command line, what errors are reported if any?


Yes I can ping the Mesa board. Everything works fine with the base machine config. The problem is only with the PlasmaC config.

I installed Linux with the Debian Stretch 2.7 ISO, then updated through synaptics to the master 2.9 branch.

If I start LinuxCNC from the command line, I get the same error.

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

More
20 Aug 2019 12:21 #142591 by MakingStuff

Sounds like you do not have the Ethernet port on your PC configured correctly

what does:

ip a

report?


It works fine with the base machine config I created. It is only the PlasmaC config that throws this error.

Here is what ip a says:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 40:61:86:85:9e:c1 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever

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

Moderators: snowgoer540
Time to create page: 0.221 seconds
Powered by Kunena Forum