Update urrobot.py
This commit is contained in:
parent
4d06b6021d
commit
d19b3e841b
@ -251,26 +251,28 @@ class URRobot(object):
|
|||||||
"""
|
"""
|
||||||
set voltage to be delivered to the tool, val is 0, 12 or 24
|
set voltage to be delivered to the tool, val is 0, 12 or 24
|
||||||
"""
|
"""
|
||||||
|
assert(val in [0, 12, 24])
|
||||||
prog = "set_tool_voltage(%s)" % (val)
|
prog = "set_tool_voltage(%s)" % (val)
|
||||||
self.send_program(prog)
|
self.send_program(prog)
|
||||||
|
|
||||||
def set_tool_digital_in(self, input_id):
|
# def get_tool_digital_in(self, input_id):
|
||||||
"""
|
# """
|
||||||
set voltage to be delivered to the tool, val is 0, 12 or 24
|
# get tool digitial input
|
||||||
"""
|
# """
|
||||||
prog = "set_tool_digital_in(%s)" % (input_id)
|
# prog = "get_tool_digital_in(%s)" % (input_id)
|
||||||
self.send_program(prog)
|
# self.send_program(prog)
|
||||||
|
|
||||||
def set_tool_digital_out(self, input_id, signal_level):
|
def set_tool_digital_out(self, input_id, signal_level):
|
||||||
"""
|
"""
|
||||||
set voltage to be delivered to the tool, val is 0, 12 or 24
|
set tool digital output
|
||||||
"""
|
"""
|
||||||
|
assert(input_id in [0, 1])
|
||||||
prog = "set_tool_digital_out(%s, %s)" % (input_id, signal_level)
|
prog = "set_tool_digital_out(%s, %s)" % (input_id, signal_level)
|
||||||
self.send_program(prog)
|
self.send_program(prog)
|
||||||
|
|
||||||
def set_tool_communication(self, enabled=True, baud_rate=9600, parity=0, stop_bits=1, rx_idle_chars=1.0, tx_idle_chars=3.5):
|
def set_tool_communication(self, enabled=True, baud_rate=9600, parity=0, stop_bits=1, rx_idle_chars=1.0, tx_idle_chars=3.5):
|
||||||
"""
|
"""
|
||||||
set voltage to be delivered to the tool, val is 0, 12 or 24
|
set tool RS485 communication protocol.
|
||||||
"""
|
"""
|
||||||
prog = "set_tool_communication(%s, %s, %s, %s, %s, %s)" % (enabled, baud_rate, parity, stop_bits, rx_idle_chars, tx_idle_chars)
|
prog = "set_tool_communication(%s, %s, %s, %s, %s, %s)" % (enabled, baud_rate, parity, stop_bits, rx_idle_chars, tx_idle_chars)
|
||||||
self.send_program(prog)
|
self.send_program(prog)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user