private void MotionControlAjin_Load(object sender, EventArgs e)
        {
            try
            {
                if (m_motion != null)
                {
                    for (int i = 0; i < m_motion.GetAxisCount(); i++)
                    {
                        comboBox_Axis.Items.Add(String.Format("{0} - {1}", i, m_motion.ListAxis[i].DevName));
                        listView_motion_data.Columns.Add(String.Format("Axis {0}", i));
                    }

                    if (comboBox_Axis.Items.Count > 0)
                    {
                        comboBox_Axis.SelectedIndex = 0;
                    }
                }

                LoadData(Application.StartupPath.ToString() + "\\motionAbsPosData");

                //m_regionPosSetting = new RegionPositionSetting(MotionAjin.GetKindOfMotion());
            }
            catch (Exception E)
            {
                LogFile.LogExceptionErr(E.ToString());
                MessageBox.Show(E.Message);
            }
        }
示例#2
0
        private void MotionSettingAjin_Load(object sender, EventArgs e)
        {
            if (m_motion != null)
            {
                if (m_motion.MOTFilePath != "")
                {
                    textBox_MOT_filepath.Text = m_motion.MOTFilePath;
                }

                for (int i = 0; i < m_motion.GetAxisCount(); i++)
                {
                    comboBox_Axis.Items.Add(String.Format("{0} - {1}", i, m_motion.ListAxis[i].DevName));
                    comboBox_gan_master_axis.Items.Add(String.Format("{0} - {1}", i, m_motion.ListAxis[i].DevName));
                    comboBox_gan_slave_axis.Items.Add(String.Format("{0} - {1}", i, m_motion.ListAxis[i].DevName));
                }

                if (comboBox_Axis.Items.Count > 0)
                {
                    comboBox_Axis.SelectedIndex = 0;
                }

                GetGantrySetInfo();
                CheckGantryStatus();
            }
        }