Beispiel #1
0
        //---------------------------------------------------------------------------

        /**
         * @brief     ACS Connection
         * @return
         * @param
         * @remark
         * -
         * @author    정지완(JUNGJIWAN)
         * @date      2019/12/16  9:55
         */
        public bool fn_ACSConnect(int type = 0)
        {
            //Local Var
            m_bConnect      = false;
            m_bConnectAsSim = false;

            string sIp  = "10.0.0.100";
            int    port = (int)EthernetCommOption.ACSC_SOCKET_STREAM_PORT;

            if (type == ACS_CON_NOR)
            {
                m_bConnect = ACS_MOTR.fn_OnConnectEthernet(sIp, port);
            }
            else
            {
                m_bConnect = ACS_MOTR.fn_OnConnectSimulator();
                if (m_bConnect)
                {
                    m_bConnectAsSim = true;
                }
            }

            if (m_bConnect)
            {
                if (m_bConnectAsSim)
                {
                    fn_WriteLog("[ACS] MOTOR Open as Simulator");
                }
                else
                {
                    fn_WriteLog("[ACS] MOTOR Open");
                }
            }
            else
            {
                fn_WriteLog(ACS_MOTR._sErrMsg);
            }

            return(m_bConnect);
        }