In your config folder you can manually start the server by simply typing
mklauncher
or
for register.py you need firstly to add execution to chmod, i do this in my
config folder chmod +x *.py
after that allways in config folder
sudo ./register.py
1 question is for service name type something like "mklauncherservice" or
do not change the default name
2 After which target should the service start : change nothing
3 Which user should start the service : change nothing
4 Please enter the command that should be started : /usr/bin/mklauncher
/home/machinekit/yourfolder/
after you can activate this service : sudo systemctl enable
mklauncherservice (or the name you type in question 1)
test avec sudo service mklauncher start status stop
But this only start mklauncher service and need more configuration.
you need to configure or create a config startup script
something like runScript.py and allow execution chmod +x runScript.py
i have attached mine but you need to adapt.
and need to link this script in the file launcher.ini
[fcsg1]
name = MynameConfig
description = My test config
command = python runScript.py
variant = a
Br
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github:
https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/machinekit/1a523bb3-5d37-48db-a394-9966ccbcbf6c%40googlegroups.com.
#!/usr/bin/python
import sys
import os
import subprocess
import time
from machinekit import launcher
from machinekit import config
launcher.register_exit_handler()
#launcher.set_debug_level(5)
os.chdir(os.path.dirname(os.path.realpath(__file__)))
mkconfig = config.Config()
if 'MACHINEKIT_INI' not in os.environ: # export for package installs
os.environ['MACHINEKIT_INI'] = mkconfig.MACHINEKIT_INI
if 'HAL_RTMOD_DIR' not in os.environ: # export for package installs
os.environ['HAL_RTMOD_DIR'] = '/usr/lib/linuxcnc'
#if 'DISPLAY' not in os.environ: # export for connecting to display
# os.environ['DISPLAY'] = ':0.0'
try:
launcher.check_installation()
launcher.cleanup_session()
launcher.load_bbio_file('furaday_stepgen.bbio')
launcher.install_comp('fur.comp')
launcher.start_process('machinekit mainCetus.ini')
launcher.register_exit_handler() # enable on ctrl-C, needs to executed after HAL files
launcher.ensure_mklauncher() # ensure mklauncher is started
# launcher.start_process("configserver -n my_Cortini ../Cetus ../Machineface")
launcher.start_process("configserver -n my_Cortini ../Cetus")
while True:
launcher.check_processes()
time.sleep(1)
except subprocess.CalledProcessError:
launcher.end_session()
sys.exit(1)
sys.exit(0)