Exemplo n.º 1
0
        private void Init()
        {
            //ZMotion模組初始化
            ZMotion.ZMInitPortInf((uint)m_ZMotionInfo.PortNumber,
                                  m_ZMotionInfo.PortBoudrate,
                                  m_ZMotionInfo.PortDataBits,
                                                                    //m_ZMotionInfo.PortParity.ToString()[0],
                                  'n',
                                  (int)m_ZMotionInfo.PortStopBits); //5, 9600, 8, ... 預設值

            //ZMotion.ZMRegestCallbackFunc(ZMotionCallback);
            ZMotion.ZMInitial(false);
            ZMotion.AFOpenConnection();
            ZMotion.ZMDoorInterlock(false);  //  FALSE 表示safe
            ZMotion.ZMPowerSwitch(true);

            ZMotion.ZMHome(true);
        }
Exemplo n.º 2
0
 public bool Ready()
 {
     return(ZMotion.ZMReady());
 }
Exemplo n.º 3
0
 public void AF()
 {
     ZMotion.ZMAutofocus();
 }
Exemplo n.º 4
0
 private void MoveUpButton_Click(object sender, EventArgs e)
 {
     //double newPos = ZMotion.ZMGetCurrentPosition() + 10000.0;
     ZMotion.ZMRelMove(1000 / m_iSpeedPower);
 }
Exemplo n.º 5
0
 private void AFButton_Click(object sender, EventArgs e)
 {
     ZMotion.ZMAutofocus();
 }