Linux AdvancedHMIDrivers example reading Rockwell L61 PLC

I used Linux Mint 17.3, so you can do the same with other Debian based ditributions.

  • Step 1: Install mono and mono vb
    • sudo apt-get install mono-complete
    • sudo apt-get install mono-vbnc
  • Step 2: Download AdvancedHMIDrivres libs
  • Step 3: extract lib to your project directory
  • Simple example, how to use this lib:
    • using System;
      using System.Threading;
      using System.Collections.Generic;
      using System.ComponentModel;
      using AdvancedHMIDrivers;
      using MfgControl.AdvancedHMI.Drivers.Common;
      
      public class RWreader
      {
          public static void Main(string[] args){
              AdvancedHMIDrivers.EthernetIPforCLXComm RW_plc = new EthernetIPforCLXComm();
              try{
                  RW_plc.IPAddress = "192.168.1.55";
                  RW_plc.ProcessorSlot = 0;
                  
                  while (true) {
                      double tmp = 0;
                      string s_ret = RW_plc.ReadAny("SinSignal");
                      tmp = Double.Parse(s_ret);
                      Console.WriteLine("SinSignal: "+tmp);
      
                      Thread.Sleep (1000);
                  }
              }catch(Exception exc){
                  Console.Error.WriteLine(DateTime.Now + "\n"+exc);
              }
          }
              
      }
  • Step 4: compile the example:
    • mcs RWreader.cs -r:AdvancedHMIDrivers.dll -r:MfgControl.AdvancedHMI.Drivers.dll -out:./RWreader
  • Step 5: run
    • mono ./RWreader

 

dont forget to set up you IP address, so that you can reach the PLC (use ping, or Browser)

in this example, i used a Rockwell L61 PLC with 1756-EN2T/C

So the protocol is Industrial Ethernet/IP or EIP.

 

You can download the sources with libs here: linux_advancedHMI_example.tar.gz (301 downloads)

Short video with all steps:

Leave a Reply

Your email address will not be published. Required fields are marked *

* Please Add the Values