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