private void button36_Click(object sender, EventArgs e) { z2coor -= 10; MultiChannelPipette.sendPositionToMoveTo((Int16)z2coor); wait.Reset(); wait.WaitOne(); updatePositions(); }
private void button7_Click_1(object sender, EventArgs e) { if (edtMoveValue.Text.Length != 0) { Int16 value = Convert.ToInt16(edtMoveValue.Text); z2coor = value; MultiChannelPipette.sendPositionToMoveTo((Int16)z2coor); updatePositions(); } }
private void button37_Click(object sender, EventArgs e) { if (tbIncrement.Text.Length != 0) { Int16 value = Convert.ToInt16(tbIncrement.Text); z2coor -= value; MultiChannelPipette.sendPositionToMoveTo((Int16)z2coor); wait.Reset(); wait.WaitOne(); 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'); } }