Exemplo n.º 1
0
 def check_hal_connections(self):
     level = int(self.i.find('TRAJ', 'SPINDLES')) or 1
     if hal.get_value('plasmac.multi-tool'):
         if level >= 2:
             hal.new_sig('plasmac:scribe-is-on',hal.HAL_BIT)
             hal.connect('spindle.1.on','plasmac:scribe-is-on')
             hal.connect('plasmac.scribe-on','plasmac:scribe-is-on')
         if level == 3:
             hal.new_sig('plasmac:centre-spot-is-on',hal.HAL_BIT)
             hal.connect('spindle.2.on','plasmac:centre-spot-is-on')
             hal.connect('plasmac.centre-spot-on','plasmac:centre-spot-is-on')
Exemplo n.º 2
0
        time.sleep(0.1)
    print("queued_mdi_commands at %d after %.3f seconds" %
          (s.queued_mdi_commands, timeout))
    sys.exit(1)


c = linuxcnc.command()
s = linuxcnc.stat()
e = linuxcnc.error_channel()

h = hal.component("test-ui")
h.newpin("digital-poker", hal.HAL_BIT, hal.HAL_OUT)
h['digital-poker'] = False
h.ready()

hal.new_sig('poke', hal.HAL_BIT)
hal.connect('motion.digital-in-00', 'poke')
hal.connect('test-ui.digital-poker', 'poke')

# Wait for LinuxCNC to initialize itself so the Status buffer stabilizes.
wait_for_linuxcnc_startup(s)

c.state(linuxcnc.STATE_ESTOP_RESET)
c.state(linuxcnc.STATE_ON)
c.home(-1)
c.wait_complete()

c.mode(linuxcnc.MODE_MDI)

# At startup there's nothing in the queue.
s.poll()
Exemplo n.º 3
0
        time.sleep(0.1)
    print "queued_mdi_commands at %d after %.3f seconds" % (s.queued_mdi_commands, timeout)
    sys.exit(1)


c = linuxcnc.command()
s = linuxcnc.stat()
e = linuxcnc.error_channel()


h = hal.component("test-ui")
h.newpin("digital-poker", hal.HAL_BIT, hal.HAL_OUT)
h['digital-poker'] = False
h.ready()

hal.new_sig('poke', hal.HAL_BIT)
hal.connect('motion.digital-in-00', 'poke')
hal.connect('test-ui.digital-poker', 'poke')


# Wait for LinuxCNC to initialize itself so the Status buffer stabilizes.
wait_for_linuxcnc_startup(s)

c.state(linuxcnc.STATE_ESTOP_RESET)
c.state(linuxcnc.STATE_ON)
c.home(-1)
c.wait_complete()

c.mode(linuxcnc.MODE_MDI)

# At startup there's nothing in the queue.