Esempio n. 1
0
 public PLC(ModbusCommunicator modbusCommunicator, int id)
 {
     this.Id                 = id;
     this.Ip                 = modbusCommunicator.IP_Address;
     this.Port               = modbusCommunicator.IP_Port;
     this.CommType           = modbusCommunicator.Type;
     this.modbusCommunicator = modbusCommunicator;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes the necessary objects
 /// </summary>
 public void Init()
 {
     modbusCommunicator = new ModbusCommunicator()
     {
         IP_Address          = Ip,
         IP_Port             = Port,
         SerialPort_PortName = SerialPort,
         SerialPort_BaudRate = BaudRate,
         SerialPort_DataBits = DataBits,
         SerialPort_Parity   = Parity,
         SerialPort_StopBits = StopBits,
         Type            = CommType,
         ResponceTimeout = 1000
     };
 }
Esempio n. 3
0
 public void Init(ModbusCommunicator modbusCommunicator)
 {
     this.modbusCommunicator = modbusCommunicator;
 }