private void Update(TagUInt32 Tag) { int index = (Tag.Address.Index - this.Address.Index) * sizeof(UInt16); UInt32 value = BitConverter.ToUInt32(Buffer, index); Tag.ValueSetter(value); }
public void Write(TagUInt32 Tag, UInt32 Value) { if (Tag.Address.Table == Table.HoldingRegisters) { WriteHoldingRegisters(Tag.Address.Index, BitConverter.GetBytes(Value)); } }
public void Add(TagUInt32 Tag, UInt16 Index) { Tag.PLC = this; Tag.Address = new Address { Table = Table.HoldingRegisters, Index = Index }; Add(Tag); }