def LidCollate(): shake_cont.InitData(shake_cont.delt_z) # Action=shake_cont.Animation_Action Action = shake_trig.Hiwin_Solo_Action shake_cont.SpeedModeToggle(1) Action.LimitArmMove(shake_cont.Above_Lid_Pos, collate_speed, 5, shake_cont.gp_stop, '移動至雪克杯蓋上方') Action.GripCtrl(shake_cont.Lid_Pos, collate_speed, shake_cont.gp_tight_catch, '移動至雪克杯蓋', '夾住雪克杯蓋') tk.messagebox.showinfo(message='Lid OK?') Action.ArmMove(shake_cont.Above_Lid_Pos, collate_speed, shake_cont.gp_stop, '拿起雪克杯蓋') Action.ArmMove(shake_cont.Above_Shake_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯上方') Action.LimitArmMove(shake_cont.Collate_Lid_Pos, collate_speed, 5, shake_cont.gp_stop, '蓋杯蓋') tk.messagebox.showinfo(message='Lid OK?') Action.ArmMove(shake_cont.Above_Shake_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯上方') Action.ArmMove(shake_cont.Above_Lid_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯蓋上方') Action.GripCtrl(shake_cont.Lid_Pos, collate_speed // 2, shake_cont.gp_open, '放下雪克杯蓋', '鬆開雪克杯蓋') tk.messagebox.showinfo(message='Collation Finished!') Action.ArmMove(shake_cont.Home_Pos, collate_speed, shake_cont.gp_stop, '移動至原位') shake_cont.InitData(-shake_cont.delt_z)
def PosCollate(): shake_cont.InitData(shake_cont.delt_z) pos_list = [ shake_cont.Home_Pos, shake_cont.Full_Ice_Pos, shake_cont.Above_Ice_Pos, shake_cont.Above_Duo_Duo_Pos, shake_cont.Duo_Duo_Pos, shake_cont.Above_Duo_Duo_Pos, shake_cont.Above_Dong_Gua_T_Pos, shake_cont.Dong_Gua_T_Pos, shake_cont.Above_Dong_Gua_T_Pos, shake_cont.Above_Blace_T_Pos, shake_cont.Blace_T_Pos, shake_cont.Above_Blace_T_Pos, shake_cont.Above_Green_T_Pos, shake_cont.Green_T_Pos, shake_cont.Above_Green_T_Pos, shake_cont.Above_Lid_Pos, shake_cont.Back_Sugar_Pos, shake_cont.Above_Sugar_Unspined_Pos, shake_cont.Above_Sugar_Unspined_Pos, shake_cont.Back_Sugar_Pos ] pause_list = [1, 4, 7, 10, 13, 18] shake_cont.SpeedModeToggle(1) for i in range(len(pos_list)): shake_trig.Hiwin_Action.ArmMove( pos_list[i], collate_speed, 0, 'test point({}/{})'.format(i + 1, len(pos_list))) # shake_cont.Animation_Action.ArmMove(pos_list[i],20,0,'test point({}/{})'.format(i+1,len(pos_list))) if i in pause_list: tk.messagebox.showinfo(message='Next Point?') tk.messagebox.showinfo(message='Collation Finished!') # shake_cont.Home(shake_cont.Animation_Action) shake_cont.Home(shake_trig.Hiwin_Action) shake_cont.InitData(-shake_cont.delt_z)
def CupCollate(): global collate_speed shake_cont.InitData(shake_cont.delt_z) # Action=shake_cont.Animation_Action Action = shake_trig.Hiwin_Action shake_cont.SpeedModeToggle(1) Action.ArmMove(shake_cont.Above_Shake_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯上方') Action.ArmMove(shake_cont.Pre_Grip_Pos, collate_speed, shake_cont.gp_stop, '轉動') Action.ArmMove(shake_cont.Grip_Shake_For_Pour_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯') tk.messagebox.showinfo(message='Shake OK?') Action.GripCtrl(shake_cont.Grip_Shake_For_Pour_Pos, collate_speed, shake_cont.gp_tight_catch, '移動至雪克杯', '夾住雪克杯') tk.messagebox.showinfo(message='Shake OK?') Action.ArmMove(shake_cont.Lift_Up_Full_Shake_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯空位上方') Action.ArmMove(shake_cont.Pour_Product_Ready_Pos, collate_speed, shake_cont.gp_stop, '準備倒飲料至手搖杯') Action.ArmMove(shake_cont.Pour_Product_Pour_Pos, collate_speed, shake_cont.gp_stop, '倒飲料至手搖杯') Action.ArmMove(shake_cont.Pour_Product_Down_Pos, collate_speed, shake_cont.gp_stop, '向下移動') tk.messagebox.showinfo(message='Cup OK?') Action.ArmMove(shake_cont.Pour_Product_Pour_Pos, collate_speed, shake_cont.gp_stop, '向上移動') Action.ArmMove(shake_cont.Pour_Product_Ready_Pos, collate_speed, shake_cont.gp_stop, '倒飲料至手搖杯結束') Action.ArmMove(shake_cont.Lift_Up_Full_Shake_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯空位上方') Action.GripCtrl(shake_cont.Grip_Shake_For_Pour_Pos, collate_speed, shake_cont.gp_open, '放下雪克杯', '鬆開雪克杯') tk.messagebox.showinfo(message='Cup OK?') Action.ArmMove(shake_cont.Pre_Grip_Pos, collate_speed, shake_cont.gp_stop, '移動至雪克杯上方') Action.ArmMove(shake_cont.Above_Shake_Pos, collate_speed, shake_cont.gp_stop, '轉動') tk.messagebox.showinfo(message='Collation Finished!') Action.ArmMove(shake_cont.Home_Pos, collate_speed, shake_cont.gp_stop, '移動至原位') shake_cont.InitData(-shake_cont.delt_z)
def ArmTestAct(): shake_cont.InitData(shake_cont.delt_z) # shake_cont.ArmTest(shake_cont.Animation_Action) shake_cont.ArmTest(shake_trig.Hiwin_Action) shake_cont.InitData(-shake_cont.delt_z)
def RightCollate(): shake_cont.InitData(shake_cont.delt_z) # shake_cont.Right(shake_cont.Animation_Action) shake_cont.Right(shake_trig.Hiwin_Solo_Action) shake_cont.InitData(-shake_cont.delt_z)
def LeftCollate(): shake_cont.InitData(shake_cont.delt_z) shake_cont.Left(shake_cont.Animation_Action) # shake_cont.Left(shake_trig.Hiwin_Solo_Action) shake_cont.InitData(-shake_cont.delt_z)