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