Exemplo n.º 1
0
 public void F03(InPLC data)
 {
     if (data.Id == 1)
     {
         Z.F03(PLCSite.D(data.Address), data.F03, (rdata) =>
         {
             _clients.All.SendAsync("F03Return", new { name = Z.Name, data = ReceiveData.F03(rdata, data.F03) });
         });
     }
     else
     {
         C.F03(PLCSite.D(data.Address), data.F03, (rdata) =>
         {
             _clients.All.SendAsync("F03Return", new { name = C.Name, data = ReceiveData.F03(rdata, data.F03) });
         });
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取设备参数
        /// </summary>
        public void GetDeviceParameter()
        {
            ModbusSocket device = Z;

            device.F03(PLCSite.D(500), 17, (data) => {
                _clients.All.SendAsync("DeviceParameter", new { name = device.Name, data = ReceiveData.F03(data, 17) });
            });
        }