Ejemplo n.º 1
0
        private void Update(TagInt32 Tag)
        {
            int   index = (Tag.Address.Index - this.Address.Index) * sizeof(UInt16);
            Int32 value = BitConverter.ToInt32(Buffer, index);

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