Esempio n. 1
0
        public int WriteBits(DeviceAddress address, byte value)
        {
            int rs = _plcReader.WriteBits(address, value);

            if (rs >= 0)
            {
                if (DataChange != null)
                {
                    ITag tag = GetTagByAddress(address);
                    if (tag != null)
                    {
                        DataChange(this,
                                   new DataChangeEventArgs(1,
                                                           new HistoryData[1] {
                            new HistoryData(tag.ID, QUALITIES.QUALITY_GOOD, new Storage {
                                Byte = value
                            },
                                            DateTime.Now)
                        }));
                    }
                }
            }

            return(rs);
        }
Esempio n. 2
0
 public int WriteBits(DeviceAddress address, byte value)
 {
     return(_reader.WriteBits(address, value));
 }