public Sharp7Connector(PlcConnectionSettings settings, IS7VariableNameParser variableNameParser) { this.variableNameParser = variableNameParser; this.ipAddress = settings.IpAddress; this.cpuSlotNr = settings.CpuMpiAddress; this.port = settings.Port; this.rackNr = settings.RackNumber; ReconnectDelay = TimeSpan.FromSeconds(5); }
public Sharp7Plc(string ipAddress, int rackNumber, int cpuMpiAddress, int port = 102) { this.ipAddress = ipAddress; this.rackNumber = rackNumber; this.cpuMpiAddress = cpuMpiAddress; this.port = port; plcConnectionSettings = new PlcConnectionSettings() { IpAddress = ipAddress, RackNumber = rackNumber, CpuMpiAddress = cpuMpiAddress, Port = port }; varaibleNameParser = new S7VariableNameParser(); }