Esempio n. 1
0
 private void homeAll()
 {
     SingleChannelPipette.homeTool();
     MultiChannelPipette.homeTool();
     DynamixelCom.homeTool();
     writeSerial(SerialCommandType.Home, Axis.X, 0);
     writeSerial(SerialCommandType.Home, Axis.Y, 0);
 }
Esempio n. 2
0
 private void button33_Click(object sender, EventArgs e)
 {
     z1coor -= 10;
     SingleChannelPipette.sendPositionToMoveTo((Int16)z1coor);
     wait.Reset();
     wait.WaitOne();
     updatePositions();
 }
Esempio n. 3
0
 private void button6_Click_1(object sender, EventArgs e)
 {
     if (edtMoveValue.Text.Length != 0)
     {
         Int16 value = Convert.ToInt16(edtMoveValue.Text);
         z1coor = value;
         SingleChannelPipette.sendPositionToMoveTo((Int16)z1coor);
         updatePositions();
     }
 }
Esempio n. 4
0
 private void button34_Click(object sender, EventArgs e)
 {
     if (tbIncrement.Text.Length != 0)
     {
         Int16 value = Convert.ToInt16(tbIncrement.Text);
         z1coor -= value;
         SingleChannelPipette.sendPositionToMoveTo((Int16)z1coor);
         wait.Reset();
         wait.WaitOne();
         updatePositions();
     }
 }
Esempio n. 5
0
        private void btnHomeZ1_Click(object sender, EventArgs e)
        {
            z1coor = 0;
            SingleChannelPipette.homeTool();
            wait.Reset();
            wait.WaitOne();
            updatePositions();

            /*
             * ComChannelFactory.getGCodeSerial().WriteLine("HZ1");
             * z1coor = 0;
             * updatePositions();*/
        }
Esempio n. 6
0
 public void executeAction(DataSets.dsModuleStructure3.dtActionValueRow row)
 {
     if (row.dtActionTypeRow.pk_id == PIPETTE)
     {
         Int16 volume = 0;
         if (Int16.TryParse(row.description, out volume))
         {
             SingleChannelPipette.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))
         {
             SingleChannelPipette.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_Z1)
     {
         Int16 tempValue = 0;
         if (Int16.TryParse(row.description, out tempValue))
         {
             SingleChannelPipette.sendPositionToMoveTo(tempValue);
             wait.Reset();
             wait.WaitOne();
         }
     }
     else if (row.dtActionTypeRow.pk_id == HOME)
     {
         SingleChannelPipette.homeTool();
         wait.Reset();
         wait.WaitOne();
     }
 }
Esempio n. 7
0
        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');
            }
        }