private void homeAll() { SingleChannelPipette.homeTool(); MultiChannelPipette.homeTool(); DynamixelCom.homeTool(); writeSerial(SerialCommandType.Home, Axis.X, 0); writeSerial(SerialCommandType.Home, Axis.Y, 0); }
private void btnHomeZ2_Click(object sender, EventArgs e) { z2coor = 0; MultiChannelPipette.homeTool(); wait.Reset(); wait.WaitOne(); updatePositions(); /* * ComChannelFactory.getGCodeSerial().WriteLine("HZ2"); * z2coor = 0; * updatePositions();*/ }
public void executeAction(DataSets.dsModuleStructure3.dtActionValueRow row) { if (row.dtActionTypeRow.pk_id == PIPETTE) { Int16 volume = 0; if (Int16.TryParse(row.description, out volume)) { MultiChannelPipette.pipette(volume); wait.Reset(); wait.WaitOne(); Int16 delay = Convert.ToInt16(row.description); System.Threading.Thread.Sleep(delay / 2); } } else if (row.dtActionTypeRow.pk_id == DISPENSE) { Int16 volume = 0; if (Int16.TryParse(row.description, out volume)) { MultiChannelPipette.dispense(volume); wait.Reset(); wait.WaitOne(); Int16 delay = Convert.ToInt16(row.description); System.Threading.Thread.Sleep(delay / 2); } } else if (row.dtActionTypeRow.pk_id == MOVE_Z2) { Int16 tempValue = 0; if (Int16.TryParse(row.description, out tempValue)) { MultiChannelPipette.sendPositionToMoveTo(tempValue); wait.Reset(); wait.WaitOne(); } } else if (row.dtActionTypeRow.pk_id == HOME) { MultiChannelPipette.homeTool(); wait.Reset(); wait.WaitOne(); } }
public void move(DataSets.dsModuleStructure3.dtActionValueRow actionValue) { if (actionValue.fk_action_type == MOVE_X) { //String value = "X" + Int32.Parse(actionValue.description) + '\n'; //String value = "G1 X" + Int32.Parse(actionValue.description) / 10 + " F" + desiredXSpeed + "\n"; String value = "G1 X" + Int32.Parse(actionValue.description) / 10; write(value); wait.WaitOne(); } else if (actionValue.fk_action_type == MOVE_Y) { //String value = "Y" + Int32.Parse(actionValue.description) + '\n'; //String value = "G1 Y" + Int32.Parse(actionValue.description) / 10 + " F" + desiredYSpeed + "\n"; String value = "G1 Y" + Int32.Parse(actionValue.description) / 10; write(value); wait.WaitOne(); } else if (actionValue.fk_action_type == MOVE_Z1) { Int16 tempValue = 0; if (Int16.TryParse(actionValue.description, out tempValue)) { SingleChannelPipette.sendPositionToMoveTo(tempValue); wait.WaitOne(); } //serial.Write("Z1" + Int32.Parse(actionValue.description) + '\n'); } else if (actionValue.fk_action_type == MOVE_Z2) { Int16 tempValue = 0; if (Int16.TryParse(actionValue.description, out tempValue)) { MultiChannelPipette.sendPositionToMoveTo(tempValue); wait.WaitOne(); } //serial.Write("Z2" + Int32.Parse(actionValue.description) + '\n'); } else if (actionValue.fk_action_type == MOVE_Z3) { Int16 tempValue = 0; if (Int16.TryParse(actionValue.description, out tempValue)) { DynamixelCom.sendPositionToMoveTo(tempValue); wait.WaitOne(); } //serial.Write("Z3" + Int32.Parse(actionValue.description) + '\n'); } else if (actionValue.fk_action_type == HOME) { switch (actionValue.description) { case "X": //write("HX",1); write("G28 X"); wait.WaitOne(); break; case "Y": //write("HY",1); write("G28 Y"); wait.WaitOne(); break; case "Z1": SingleChannelPipette.homeTool(); wait.WaitOne(); break; case "Z2": MultiChannelPipette.homeTool(); wait.WaitOne(); break; case "Z3": DynamixelCom.homeTool(); wait.WaitOne(); break; default: break; } //if (actionValue.description == //serial.Write("H" + actionValue.description + '\n'); } }