Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 import roslib; roslib.load_manifest('pipette_driver')
00036
00037 import pipette_driver
00038 import time
00039
00040 bd_addr = "00:80:98:e6:2b:30"
00041
00042 port = 1
00043
00044 def print_position(pipette):
00045 print 'Requesting position'
00046 cmd = pipette_driver.ViafloPositionQueryCommand()
00047 resp = pipette.send_msg(cmd)
00048 print resp
00049
00050 print 'Opening pipette'
00051 pipette = pipette_driver.ViafloPipette()
00052 pipette.open(bd_addr, port)
00053
00054 print 'Requesting info'
00055 info_cmd = pipette_driver.ViafloInfoCommand()
00056 info_resp = pipette.send_msg(info_cmd)
00057 print info_resp
00058
00059 print 'Requesting version'
00060 version_cmd = pipette_driver.ViafloVersionCommand()
00061 version_resp = pipette.send_msg(version_cmd)
00062 print version_resp
00063
00064 print_position(pipette)
00065
00066 print 'Sending asperate command'
00067 action = pipette_driver.ViafloAspirateCommand(8,500,2)
00068 action_resp = pipette.send_msg(action)
00069 print action_resp
00070
00071 print_position(pipette)
00072
00073 time.sleep(2)
00074
00075 print 'Sending dispense command'
00076 action = pipette_driver.ViafloDispenseCommand(8,250,5)
00077 action_resp = pipette.send_msg(action)
00078 print action_resp
00079
00080 print_position(pipette)
00081
00082 time.sleep(3)
00083
00084 print 'Sending purge command'
00085 action = pipette_driver.ViafloPurgeCommand(8,1)
00086 action_resp = pipette.send_msg(action)
00087 print action_resp
00088
00089 print_position(pipette)
00090
00091
00092
00093
00094
00095
00096
00097