Example #1
0
#!/usr/bin/python

import sys
import os
import subprocess
import time
from machinekit import launcher

launcher.register_exit_handler()
#launcher.set_debug_level(5)
os.chdir(os.path.dirname(os.path.realpath(__file__)))

try:
    launcher.check_installation()
    launcher.cleanup_session()
    launcher.ensure_mklauncher()
    launcher.load_bbio_file('cramps2_cape.bbio')
    launcher.start_process("configserver -n MendelMax ~/Machineface")
    launcher.start_process('linuxcnc fabrikator-mini.ini')
    while True:
        launcher.check_processes()
        time.sleep(1)
except subprocess.CalledProcessError:
    launcher.end_session()
    sys.exit(1)

sys.exit(0)
Example #2
0
#!/usr/bin/python

import sys
import os
import subprocess
import time
from machinekit import launcher

launcher.register_exit_handler()
#launcher.set_debug_level(5)
os.chdir(os.path.dirname(os.path.realpath(__file__)))

try:
    launcher.check_installation()
    launcher.cleanup_session()
    launcher.ensure_mklauncher()
    launcher.load_bbio_file('cramps2_cape.bbio')
    launcher.start_process("configserver -n MendelMax ~/Machineface")
    launcher.start_process('linuxcnc CRAMPS.ini')
    while True:
        launcher.check_processes()
        time.sleep(1)
except subprocess.CalledProcessError:
    launcher.end_session()
    sys.exit(1)

sys.exit(0)
Example #3
0
args = parser.parse_args()

if args.debug:
    launcher.set_debug_level(5)

if 'MACHINEKIT_INI' not in os.environ:  # export for package installs
    mkconfig = config.Config()
    os.environ['MACHINEKIT_INI'] = mkconfig.MACHINEKIT_INI

try:
    launcher.check_installation()
    launcher.cleanup_session()  # kill any running Machinekit instances
    launcher.load_bbio_file('parallel_cape_io_test.bbio')  # load the BBIO pin overlay
    launcher.start_realtime()  # start Machinekit realtime environment
    launcher.load_hal_file(MAIN_HAL)  # load the main HAL file
    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 {} .'.format(NAME))

    while True:
        launcher.check_processes()
        time.sleep(1)

except subprocess.CalledProcessError:
    launcher.end_session()
    sys.exit(1)

sys.exit(0)
Example #4
0
if args.debug:
    launcher.set_debug_level(5)

if 'MACHINEKIT_INI' not in os.environ:  # export for package installs
    mkconfig = config.Config()
    os.environ['MACHINEKIT_INI'] = mkconfig.MACHINEKIT_INI

try:
    launcher.check_installation()
    launcher.cleanup_session()  # kill any running Machinekit instances
    launcher.start_realtime()  # start Machinekit realtime environment
    launcher.load_hal_file('anddemo.py')  # load the main HAL file
    launcher.register_exit_handler()  # enable on ctrl-C, needs to executed after HAL files

    launcher.ensure_mklauncher()  # ensure mklauncher is started

    if not args.no_config:
        # the point-of-contact for QtQUickVCP
        launcher.start_process('configserver -n AND-Demo .')
    if args.gladevcp:
        # start the gladevcp version
        if args.local:
            # no -N flag - local case, use IPC sockets, no zeroconf resolution
            launcher.start_process('gladevcp -E -u motorctrl.py motorctrl.ui')
        else:
            # -N - remote case, use zeroconf resolution
            launcher.start_process('gladevcp -N -E -u motorctrl.py motorctrl.ui')
    if args.halscope:
        # load scope only now - because all sigs are now defined:
        launcher.start_process('halscope')