31 lines
628 B
Python
31 lines
628 B
Python
|
|
def move_scanner():
|
|
"""
|
|
"""
|
|
print "move_scanner"
|
|
|
|
#Initial checks
|
|
robot.assert_no_task()
|
|
robot.reset_motion()
|
|
robot.wait_ready()
|
|
robot.assert_cleared()
|
|
#robot.assert_in_known_point()
|
|
|
|
#Enabling
|
|
enable_motion()
|
|
|
|
barcode_reader.start_read(10.0)
|
|
if not robot.is_scanner():
|
|
robot.move_scanner()
|
|
|
|
time.sleep(0.25)
|
|
dm = barcode_reader.get_readout()
|
|
if dm is None:
|
|
detected = is_pin_detected_in_scanner()
|
|
else:
|
|
detected = True
|
|
|
|
print ("Detected: " + str( detected) + " - Datamatrix: " + str(dm))
|
|
|
|
return (detected, dm)
|