예제 #1
0
        private int machineAxesCount;                                                                       // 설비 축 개수
        #endregion

        #region Constructor
        public InterfaceSiemens(CommInfo commInfo)
        {
            try
            {
                base.division  = "CNC";
                base.commInfo  = commInfo;
                base.isConnect = false;
                //base.sendData = new Dictionary<string, object>();
                //base.receiveData = new Dictionary<string, object>();

                base.SPINDLE      = new Dictionary <object, object>();
                base.AXIS_ABS     = new Dictionary <object, object>();
                base.AXIS_LOAD    = new Dictionary <object, object>();
                base.MODAL_VALUE  = new Dictionary <object, object>();
                base.SPINDLE_LOAD = new Dictionary <object, object>();
                base.PARAM_VALUE  = new Dictionary <object, object>();
                base.MACRO_VALUE  = new Dictionary <object, object>();
                base.PLC_VALUE    = new Dictionary <object, object>();

                if (CallDDEServer())
                {
                    DdeInfo ddeInfo = new DdeInfo(DDE_SERVICE, DDE_TOPIC);

                    siemensHandle = new DdeHandler(ddeInfo);
                }
                else
                {
                    siemensHandle = null;
                }
            }
            catch (Exception ex)
            {
                LogHandler.PrintLog(string.Format("{0} :: Constructor Exception :: Message = {1}", this.ToString(), ex.Message));
            }
        }
예제 #2
0
        private int machineAxesCount;               // 전체 축의 개수
        #endregion

        #region Constructor
        /// <summary>
        /// Property 초기화
        /// </summary>
        /// <param name="commInfo">통신 정보를 저장하는 CommInfo Object</param>
        public InterfaceHeidenhain(CommInfo commInfo)
        {
            try
            {
                base.division  = "CNC";
                base.commInfo  = commInfo;
                base.isConnect = false;
                //base.sendData = new Dictionary<string, object>();
                //base.receiveData = new Dictionary<string, object>();

                base.SPINDLE      = new Dictionary <object, object>();
                base.SPINDLE_LOAD = new Dictionary <object, object>();
                base.AXIS_ABS     = new Dictionary <object, object>();
                base.AXIS_LOAD    = new Dictionary <object, object>();
                base.MODAL_VALUE  = new Dictionary <object, object>();
                base.PARAM_VALUE  = new Dictionary <object, object>();
                base.MACRO_VALUE  = new Dictionary <object, object>();
                base.PLC_VALUE    = new Dictionary <object, object>();

                this.heidenhainHandle = new JHMachine();
            }
            catch (Exception ex)
            {
                LogHandler.WriteLog(base.division, string.Format("{0} :: Constructor Exception :: Message = {1}", this.ToString(), ex.Message));
            }
        }
예제 #3
0
        private ModbusTcpHandler doosanHandle;  // ModbusTCP 핸들
        #endregion

        #region Constructor
        public InterfaceDoosan(CommInfo commInfo)
        {
            base.division  = "IO";
            base.commInfo  = commInfo;
            base.isConnect = false;
            base.SEND_DATA = new Dictionary <object, object>();
            //base.sendData = new Dictionary<string, object>();
            //base.receiveData = new Dictionary<string, object>();

            doosanHandle = new ModbusTcpHandler();
        }
예제 #4
0
        private List <string> addrList; // 읽으려는 PLC Address 리스트
        #endregion

        #region Constructor
        public InterfaceLs(CommInfo commInfo)
        {
            base.division  = "PLC";
            base.commInfo  = commInfo;
            base.isConnect = false;
            //base.sendData = new Dictionary<string, object>();
            //base.receiveData = new Dictionary<string, object>();
            base.PLC_VALUE = new Dictionary <object, object>();

            lsHandle = new TcpClient();
            addrList = GetAddresses();
        }
예제 #5
0
        public List <byte> subQosLevels;    // 구독 QoS 리스트
        #endregion

        #region Constructor
        public InterfaceNeuromeka(CommInfo commInfo)
        {
            base.division  = "ROBOT";
            base.commInfo  = commInfo;
            base.isConnect = false;
            base.SEND_DATA = new Dictionary <object, object>();
            //base.sendData = new Dictionary<string, object>();
            //base.receiveData = new Dictionary<string, object>();

            neuromekaHandle = new MqttHandler(commInfo.machineIp);
            subTopics       = new List <string>();
            subQosLevels    = new List <byte>();
        }
예제 #6
0
        private ModbusTcpHandler sollaeHandle;  // ModbusTCP 핸들
        #endregion

        #region Constructor
        public InterfaceSollae(CommInfo commInfo)
        {
            try
            {
                TcpInfo tcpInfo = new TcpInfo(commInfo.machineIp, commInfo.machinePort);

                base.division  = "IO";
                base.commInfo  = commInfo;
                base.isConnect = false;
                //base.sendData = new Dictionary<string, object>();
                //base.receiveData = new Dictionary<string, object>();

                sollaeHandle = new ModbusTcpHandler(tcpInfo);
            }
            catch (Exception ex)
            {
                LogHandler.WriteLog(base.division, string.Format("{0} :: Constructor Exception :: Message = {1}", this.ToString(), ex.Message));
            }
        }
예제 #7
0
        private SerialHandler arduinoHandle;                        // Serial 핸들
        #endregion

        #region Constructor
        public InterfaceArduino(CommInfo commInfo)
        {
            try
            {
                base.division  = "CNC";
                base.commInfo  = commInfo;
                base.isConnect = false;
                //base.sendData = new Dictionary<string, object>();
                //base.receiveData = new Dictionary<string, object>();

                SerialInfo serialInfo = new SerialInfo();
                serialInfo.portName = commInfo.machineSerialPort;
                serialInfo.baudRate = 57400;
                serialInfo.parity   = System.IO.Ports.Parity.None;
                serialInfo.dataBits = 8;
                serialInfo.stopBits = System.IO.Ports.StopBits.One;

                arduinoHandle = new SerialHandler(serialInfo);
            }
            catch (Exception ex)
            {
                LogHandler.PrintLog(string.Format("{0} :: Constructor Exception :: Message = {1}", this.ToString(), ex.Message));
            }
        }