public NjOmroPLC(string name) : base(name) { try { PlcCompolet = new NJCompolet(); Setting = (OmroPLCSetting)FastData.SaveStatic.ReadBinF(Name); PlcCompolet.ConnectionType = Setting.ConnectionType; PlcCompolet.ReceiveTimeLimit = Setting.ReceiveTimeLimit; PlcCompolet.UseRoutePath = Setting.UseRoutePath; PlcCompolet.PeerAddress = Setting.PeerAddress; PlcCompolet.LocalPort = Setting.LocalPort; listvarname = Setting.listvar; circletime = Setting.circletime; } catch (Exception exp) { Setting.ConnectionType = ConnectionType.UCMM; Setting.ReceiveTimeLimit = 200; Setting.UseRoutePath = false; Setting.PeerAddress = "0.0.0.0"; Setting.LocalPort = 0; Setting.listvar = new List <string>(); circletime = 100; MessageBox.Show(Name + ": PLC配置参数初始化失败!\r\n" + exp); } }
public OmronGatewayWrapper(string ip) { _compolet = new NJCompolet(null); _compolet.ConnectionType = ConnectionType.UCMM; _compolet.UseRoutePath = false; _compolet.LocalPort = 2; _compolet.PeerAddress = ip; _compolet.RoutePath = @"2%192.168.250.1\1%0"; _compolet.UseRoutePath = false; }
public void NLPLC_ClosePort() { lock (this) { if (this._CIPcompolet == null) { this._CIPcompolet = new NJCompolet(); } _CIPcompolet.Active = false; } }
public void NLPLC_Initial(string ip, int portId) { lock (this) { if (this._CIPcompolet == null) { this._CIPcompolet = new NJCompolet(); } _CIPcompolet.Active = false; _CIPcompolet.ConnectionType = ConnectionType.UCMM; _CIPcompolet.ReceiveTimeLimit = 750; _CIPcompolet.PeerAddress = ip; _CIPcompolet.LocalPort = portId; _CIPcompolet.Active = true; } }
public PLC64Omron(string PLCAddress, int PortNo, IContainer Container) { try { NJPLC = new NJCompolet(Container); NJPLC.ConnectionType = OMRON.Compolet.CIPCompolet64.ConnectionType.UCMM; NJPLC.LocalPort = PortNo; NJPLC.PeerAddress = PLCAddress; NJPLC.UseRoutePath = false; NJPLC.DontFragment = false; NJPLC.ReceiveTimeLimit = ((long)(750)); } catch (Exception) { // throw(ex); } }
public OmroPlcMultiVar(NJCompolet _njCompolet) { InitializeComponent(); njCompolet = _njCompolet; }