Exemplo n.º 1
0
        /// <summary>
        /// 读取轴当前位置
        /// </summary>
        /// <param name="Name">轴名称</param>
        /// <returns></returns>
        public static int getAxisCurrentLocation(string Name, out double mCurrentLocation)
        {
            mCurrentLocation = 0;
            int CardNum  = 0;
            int AxisNum  = 0;
            int Pulse    = 0;
            int Acc      = 0;
            int Speed    = 0;
            int ResetNum = 0;

            mWDataToolClass.getDataAxis(Name, out CardNum, out AxisNum, out Pulse, out Acc, out Speed, out ResetNum);
            mWCardClass.getAxisCurrentLocation(CardNum, AxisNum, Pulse, out mCurrentLocation);
            return(0);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 更新下拉列表数据
        /// </summary>
        public void UpdateCorrAxis()
        {
            int rtn = 0;

            rtn = mWDataToolClass.getDataAxis(out dtCorrAxis);
            if (rtn != 0)
            {
                MessageBox.Show("SelectShowModel");
            }
            if (dtCorrAxis.Rows.Count > 0)
            {
                dgvPataAddCorrAxis.Items.Clear();
                dgvPataModifyCorrAxis.Items.Clear();
                dgvPataAddCorrAxis.Items.Add("无");
                dgvPataModifyCorrAxis.Items.Add("无");
                for (int i = 0; i < dtCorrAxis.Rows.Count; i++)
                {
                    dgvPataAddCorrAxis.Items.Add(dtCorrAxis.Rows[i]["Name"].ToString());
                    dgvPataModifyCorrAxis.Items.Add(dtCorrAxis.Rows[i]["Name"].ToString());
                }
            }
        }