Author Topic: CompactLogix Over Net-Eni  (Read 2011 times)

mas_Sam50

  • Newbie
  • *
  • Posts: 1
    • View Profile
CompactLogix Over Net-Eni
« on: July 18, 2014, 11:08:29 AM »
Hello. Anyone know how to read tag  from a CompactLogix using Net-Eni ?
this is what i Try so far. C#

This is a basic connection without using threads or any type of validation .

Thank you guys.


private EthernetIPforCLXComm pumpRoom2;


 private Void InitializeConnection()
 {
   
                pumpRoom2 = new EthernetIPforCLXComm();

               
                pumpRoom2.IPAddress = _PumpRoomIPAddressENI;

}

private void PumpRoom()
        {
            while (isScanning)
            {
                try
                {
                   
                   //FirstTry
                    N7PumpRoom[0] = int.Parse(pumpRoom2.ReadAny("integers[0]"));
                   
                    //Secondtry
                    N7PumpRoom[0] = int.Parse(pumpRoom2.ReadAny("N7:0"));

                     ....
 
                }
                catch { }
            }

        }