예제 #1
0
        private void SendTo_Robodactic1_Experience3_4()
        {
            float O = 0, X = 0, W = 0;

            try
            {
                float T = (float)numericUpDownTemps_T.Value;
                float R = (float)numericUpDownRouesRayon_R.Value;
                float V = (float)numericUpDownTranslationVitesse_V.Value;

                cinStruct MyStruct1 = new cinStruct(Robot.Robot1, Experience.Exp3, T, X, V, R, O, W);
                Program.frmSerialTalk.msg_textbox.Text = MyStruct1.BuildMessage();
                Program.frmSerialTalk.send_button.PerformClick();

                W = V / R;
                X = V * T;
                O = W * T;
                Console.WriteLine("W = " + W);
                Console.WriteLine("X = " + X);
                Console.WriteLine("O = " + O);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        private void SendTo_Robodactic1_Experience1_2()
        {
            float O = 0, X = 0, V = 0;

            try
            {
                float T = (float)numericUpDownTemps_T.Value;
                float R = (float)numericUpDownRouesRayon_R.Value;
                float W = (float)numericUpDownRouesVitesse_W.Value;

                cinStruct MyStruct1 = new cinStruct(Robot.Robot1, Experience.Exp1, T, X, V, R, O, W);
                Program.frmSerialTalk.msg_textbox.Text = MyStruct1.BuildMessage();
                Program.frmSerialTalk.send_button.PerformClick();

                V = R * W;
                X = V * T;
                O = W * T;
                Console.WriteLine("V = " + V);
                Console.WriteLine("X = " + X);
                Console.WriteLine("O = " + O);
                // SerialTest.StartTest();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }