private void button1_Click(object sender, EventArgs e) { double start_vel, max_vel, acc, dec; int dist; int rc = 0; start_vel = Convert.ToDouble(textBox1.Text); max_vel = Convert.ToDouble(textBox2.Text); acc = Convert.ToDouble(textBox3.Text); dec = Convert.ToDouble(textBox4.Text); dist = Convert.ToInt32(textBox5.Text); CPci9014.p9014_set_t_profile(m_axis, start_vel, max_vel, acc, dec); switch (m_type) { case 0: { CPci9014.p9014_pmove(m_axis, dist, 0, 2); break; } case 1: { CPci9014.p9014_vmove(m_axis, 1, 2); break; } case 2: { CPci9014.p9014_vmove(m_axis, 0, 2); break; } } if (rc != 0) { MessageBox.Show("Stop Axis fail,return code:" + Convert.ToString(rc)); } }
public override int VMove(SingleDemura.PCI9014AxisInfo axinfo, int dir) { return(CPci9014.p9014_vmove(axinfo.No, dir, 2)); }