Created
April 30, 2015 16:35
-
-
Save machinekoder/d71ec0d8d90f88abeb25 to your computer and use it in GitHub Desktop.
run.py for axis config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import os | |
import subprocess | |
import importlib | |
from machinekit import launcher | |
from time import * | |
launcher.register_exit_handler() | |
launcher.set_debug_level(5) | |
os.chdir(os.path.dirname(os.path.realpath(__file__))) | |
try: | |
launcher.check_installation() # make sure the Machinekit installation is sane | |
launcher.cleanup_session() # cleanup a previous session | |
#launcher.load_bbio_file('myoverlay.bbio') # load a BBB universal overlay | |
#launcher.install_comp('led_dim.comp') # install a comp HAL component of not already installed | |
#launcher.install_comp('fake_ext.comp') # install a comp HAL component of not already installed | |
launcher.start_process("configserver -n Testmachine ~/projects/Cetus ~/projects/Machineface") # start the configserver | |
launcher.start_process('linuxcnc axis.ini') # start linuxcnc | |
except subprocess.CalledProcessError: | |
launcher.end_session() | |
sys.exit(1) | |
while True: | |
sleep(1) | |
launcher.check_processes() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment