Ejemplo n.º 1
0
 //****************************************//
 //    Open RS232 Port for MPQ device      //
 //****************************************//
 public void PortInit(String ConnectString)
 {
     if (m_MPQIO == null)
     {
         m_MPQIO = new MPQIO();
         m_MPQIO.CloseComm();
         if (!m_MPQIO.OpenComm(ConnectString))
         {
             throw new Exception("Error in OpenComm: " + m_MPQIO.m_LastError);
         }
         else
         {
             OnMPQMessage(new MPQMessageEventArgs("MPQ_OpenComm: Success"));
         }
     }
 }
Ejemplo n.º 2
0
 //****************************************//
 //    Open RS232 Port for MPQ device      //
 //****************************************//
 public void PortInit(String ConnectString)
 {
     if (m_MPQIO == null)
     {
         m_MPQIO = new MPQIO();
         m_MPQIO.CloseComm();
         if (!m_MPQIO.OpenComm(ConnectString))
             throw new Exception("Error in OpenComm: " + m_MPQIO.m_LastError);
         else
             OnMPQMessage(new MPQMessageEventArgs("MPQ_OpenComm: Success"));
     }
 }