コード例 #1
0
        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);
        }
コード例 #2
0
        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();
        }