public clsLS_XG(enPlcType plcType, string strIPAddress, int intPort, string _strDeviceType) : base(true) { switch (PlcType) { case enPlcType.LS_XGI: _c_header[12] = 0xa4; break; case enPlcType.LS_XGT: _c_header[12] = 0xa0; break; default: throw new Exception("clsLG_XG 모듈은 LGI, LGT 타입만 생성 가능합니다."); break; } Comm.Received += new PLCSocket.Receive(this.Received); Comm.strServerIP = strIPAddress; Comm.iPort = intPort; delStart = new delScanThread(Start_PLCScan); }
public clsLS_XGI(string strIPAddress, int intPort, string _strDeviceType) { Comm.Received += new PLCSocket.Receive(this.Received); Comm.strServerIP = strIPAddress; Comm.iPort = intPort; delStart = new delScanThread(Start_PLCScan); }
public clsMelsecA(string strIPAddress, int intPort, string _strDeviceType) { Comm.Received += new PLCSocket.Receive(this.Received); Comm.strServerIP = strIPAddress; Comm.iPort = intPort; this.strDeviceType = _strDeviceType; delStart = new delScanThread(Start_PLCScan); //Command 초기화 this.ReadCommand.Command = 0x01; this.ReadCommand.No = 0xff; this.ReadCommand.Timer = new byte[] { 0x28, 0x00 }; this.ReadCommand.Len = 0x01; this.ReadCommand.x00 = 0x00; this.WriteCommand.Command = 0x03; this.WriteCommand.No = 0xff; this.WriteCommand.Timer = new byte[] { 0x28, 0x00 }; this.WriteCommand.Len = 0x01; this.WriteCommand.x00 = 0xff; }