// functions to controll direction of the motor
 public void BackwardX()
 {
     USBControler.DConfigBit(PortAux1, 0, PortDirection);
     USBControler.DBitOut(PortAux1, 0, HighLogicState);
     USBControler.DConfigBit(PortAux2, 1, PortDirection);
     USBControler.DBitOut(PortAux2, 1, LowLogicState);
     USBControler.AOut(XChannel, MccDaq.Range.Bip10Volts, XMotorControlerFreq);
 }
Esempio n. 2
0
        private void btnSendData_Click(object sender, System.EventArgs e)
        {
            float  volts    = 0.0F;
            ushort daCounts = 0;
            int    chan     = 0;

            foreach (TextBox box in _txtAOVolts)
            {
                //get voltage to output
                volts = float.Parse(box.Text);

                // convert from voltage to binary counts
                _bd.FromEngUnits(_range, volts, out daCounts);

                // load D/A
                _bd.AOut(chan, _range, daCounts);
                ++chan;
            }
        }