Menu

Oriental Motor Driver AZ-KEP

jtm48
2020-08-07
2023-01-19
  • jtm48

    jtm48 - 2020-08-07

    Has anyone tried communicating with the AZ-KEP driver with this dll?

    i have been trying to communicate with the Remote-IO function (R-I/O) and
    have been unsuccessful in creating an instance.

    I am able to "RegisterSession" successfully (and ping the IP set
    192.168.0.3). But it is when i try to set an instance and address the hex
    location I am having an issue.

    The Remote IO settings parameters are on page 137 of this manual:

    https://www.orientalmotor.com/products/pdfs/opmanuals/HM-60372E.pdf

    I have tried using the 7 or so sample programs available with the EEIP
    project as the template for my connection. No luck with any of them. I do
    not think I am setting the instanceID correctly. I did not include error
    messages as they differ based on what I try.

    If anyone has tried this with the AZ series and/or has a suggestion of how
    to setup the connection and test it I would appreciate it.

    thank you.

    [image: image.png]

     
  • jtm48

    jtm48 - 2020-08-12

    I have more information on the AZD-KEP if it helps anyone help me...

    I attached the EDS file. I have been trying to follow this and using the implicit examples in the EEIP.NET solution.

    In addition to the EDS File, tech support at Oriental gave me the following screen shot from a PLC setup to describe the ID and data size.

    I am trying to use the "Remote I/O (R-IN)". See the "Params" in the EDS file.

    Example:
    Sres.Net.EEIP.EEIPClient eeipClient = new Sres.Net.EEIP.EEIPClient();
    eeipClient.IPAddress = "192.168.0.3";
    eeipClient.RegisterSession();

            //Parameters from Originator -> Target
            eeipClient.O_T_InstanceID = 100;              //Instance ID of the Output Assembly
            eeipClient.O_T_Length = 20;                     //The Method "Detect_O_T_Length" detect the Length using an UCMM Message
            eeipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Modeless;   //Header Format
            eeipClient.O_T_OwnerRedundant = false;
            eeipClient.O_T_Priority = Sres.Net.EEIP.Priority.Scheduled;
            eeipClient.O_T_VariableLength = true;
            eeipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point;
            eeipClient.RequestedPacketRate_O_T = 500000;        //500ms is the Standard value
    
            //Parameters from Target -> Originator
            eeipClient.T_O_InstanceID = 101;
            eeipClient.T_O_Length = 28;
            eeipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Modeless;
            eeipClient.T_O_OwnerRedundant = false;
            eeipClient.T_O_Priority = Sres.Net.EEIP.Priority.Scheduled;
            eeipClient.T_O_VariableLength = true;
            eeipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point;
            eeipClient.RequestedPacketRate_T_O = 500000;    //RPI in  500ms is the Standard value
    
            //Forward open initiates the Implicit Messaging
            eeipClient.ForwardOpen();
    
            I always get an error: 
            "Sres.Net.EEIP.CIPException: 'Connection failure, General Status Code: 1 Additional Status Code: 789 Invalid segment in connection path'"
    
            any help is appreciated.  I am hoping the EDS file helps.
    
     
  • jtm48

    jtm48 - 2020-08-12

    forgot the screenshot from PLC setup:

    see attached

     
    • jtm48

      jtm48 - 2020-08-13

      issue is resolved.

       
      • alura

        alura - 2022-01-18

        Hi jtm48... I'm fighting with an AZD-KEP... how do you fix your problem ?

        actually I'm trying to use eeipClient.SetAttributeSingle(0x4, 0x65, 3, outBuff); with a properly filled outBuff (I hope so). No error but nothing is updated in driver (checked using mexe m8 monitor) and no operation at all.

        Reading using inBuff = eeipClient.GetAttributeSingle(0x4, 0x64, 3); is working perfectly.

        Maybe you are so kind to help me showing the right direction.

        Thank you

        Marco (alura)

         
        • jtm48

          jtm48 - 2022-01-25

          Hello Marco,

          Sorry I have been off this project for a long time. i think I found some open source code that helped me solve my issues.
          I believe it was "EtherNetIpTool.v1.6.0.Source.zip", Copyright (c) Hilscher Gesellschaft fuer Systemautomation mbH.
          I do not have it anymore, but perhaps you can search and find it.
          I hope this helps.

           
          • alura

            alura - 2022-01-26

            Thank you for you kind reply. The filename you suggest is found only on a chinese site, apparently requires to pay to download it, but the problem is that it really hard for me navigate on chines site.
            Still no success in solving this issue. Oriental Motor point out that the connection is not "exclusive" but I cannot understand how to make it exclusive and it is very hard to have good support from O.E.
            I think my company may pay for help for this topic... let me know if you may be interested. In this case contact me privately.
            Best regards
            Marco (www.hi-tec.it)

             
            • alura

              alura - 2022-01-26

              Hi jtm48... finally I solved the issue... the main problem where the mixing of O_T and T_O. But this still generate a path error. This was caused by realtime format, that need to be Header32Bit for 0x65

              Bye ;)

               
              • Bisl

                Bisl - 2022-03-01

                Hi Alura,

                I think I am having the exact same issue as you did.

                Trying to communicate with an AZ-KEP, the GetAttributeSingle works great and the SetAttributeSingle executes successfully but with no change on the device itself.

                I tried setting the realtime format of 0x65 to Header32Bit as you suggested but it didn't make any difference.

                Never managed to get ForwardOpen to execute either, getting "789 Invalid segment in connection path"

                could you share what you needed to do to get it working?
                I've posted my T_O setup below for reference:

                Best regards

                Leon

                     //Parameters from Target -> Originator
                            eeipClient.T_O_InstanceID = 101;// 0x65;
                            eeipClient.T_O_Length = 40;
                            eeipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit;// Sres.Net.EEIP.RealTimeFormat.Modeless;
                            eeipClient.T_O_OwnerRedundant = false;
                            eeipClient.T_O_Priority = Sres.Net.EEIP.Priority.Scheduled;
                            eeipClient.T_O_VariableLength = true;
                            eeipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Multicast;// .Multicast;
                            eeipClient.RequestedPacketRate_T_O = 500000;    //RPI in  500ms is the Standard value
                
                 
                • alura

                  alura - 2022-03-02

                  Hi Leon, this is my (working) code:

                  eeipClient = new EEIPClient();
                  eeipClient.IPAddress = ip;
                  eeipClient.RegisterSession();
                  
                  //Parameters from Originator -> Target
                  eeipClient.O_T_InstanceID = 0x65;
                  eeipClient.O_T_Length = 40;
                  eeipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit;   //Header Format
                  eeipClient.O_T_OwnerRedundant = false;
                  eeipClient.O_T_Priority = Sres.Net.EEIP.Priority.Scheduled;
                  eeipClient.O_T_VariableLength = false;
                  eeipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point;
                  eeipClient.RequestedPacketRate_O_T = 10000;        //500ms is the Standard value
                  
                  //Parameters from Target -> Originator
                  eeipClient.T_O_InstanceID = 0x64;
                  eeipClient.T_O_Length = 56;
                  eeipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Modeless;
                  eeipClient.T_O_OwnerRedundant = false;
                  eeipClient.T_O_Priority = Sres.Net.EEIP.Priority.Scheduled;
                  eeipClient.T_O_VariableLength = false;
                  eeipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point;
                  eeipClient.RequestedPacketRate_T_O = 10000;    //RPI in  500ms is the Standard value
                  
                  eeipClient.ForwardOpen();
                  

                  I hope it helps.

                  Ciao

                  Marco (Alura)

                   
                  • dadreamer

                    dadreamer - 2022-08-23

                    @alura
                    Just want to say thanks. I applied these settings to my test LabVIEW program. Everything works like a charm. There's one oddity though - the T_O_IOData and O_T_IOData arrays are 505 bytes long straight away, but I mostly don't care as I only use 56 and 40 bytes of them (for input and output respectively as per the driver manuals).

                     

                    Last edit: dadreamer 2022-08-23
  • Shuzo Yanai

    Shuzo Yanai - 2020-10-02
     

    Last edit: Shuzo Yanai 2020-10-02
  • Nurchi Guseynov

    Nurchi Guseynov - 2023-01-19

    @dadreamer,

    This is normal. As I understand, 505 (or 504) bytes is the maximum, so the array is preallocated. You only fill/read the data relevant to your application. This is the reason there are O_T_Length and T_O_Length properties.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.