private void Form1_Load(object sender, EventArgs e) { int rc; int card_count = 0; int[] card_id = new int[16]; rc = CPci9014.p9014_initial(ref card_count, card_id); if (rc != 0) { MessageBox.Show("Initialize PCI-9014 fail"); } if (card_count < 1) { MessageBox.Show("Find No PCI-9014 device"); } else { for (int i = 0; i < card_count; i++) { for (int j = 0; j < 4; j++) { axis = card_id[i] * 4 + j; CPci9014.p9014_set_pos(axis, 0, 0); str = Convert.ToString(axis); m_ctlAxisSel.Items.Add(str); } } } textBox1.Text = "1000"; textBox2.Text = "10000"; textBox3.Text = "50000"; textBox4.Text = "50000"; textBox5.Text = " 10000"; m_ctlAxisSel.Text = Convert.ToString(card_id[0] * 4); m_axis = card_id[0] * 4; radioButton1.Checked = true; m_type = 0; }
/// <summary> /// 设置位置计数器 /// </summary> /// <param name="axinfo"></param> /// <param name="pos"></param> /// <returns></returns> public override int SetCurrentPos(SingleDemura.PCI9014AxisInfo axinfo, int pos) { return(CPci9014.p9014_set_pos(axinfo.No, 0, pos)); }