Announcement

Collapse
No announcement yet.

Ethernet IP developer questions

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Ethernet IP developer questions

    Hi there
    I am currently developing a EthernetIP control interface on one of our products. I am at a stage now where I am designing the Class1 connection and I have made the O->T packet look like this
    |-16 Bit in channel selector-|---------32 bit in Data--------|-16 Bit out channel selector-|

    The T->O packet is simply:-
    |---------32 bit out Data--------|

    I have a Productivity P1-540 which I am controlling/programming with the Productivity Suit Programming Software (V3.0.1(1)).
    I admit I am not a PLC/Ladder programmer, I am a software/firmware engineer, but I am using the Productivity GUI to learn.
    The question I have is, how do I create Tags to populate the O->T message? Or how do I split it into the 3 Tags I want to load with data?
    I see there is a stucture type Tag. But I can not work out how it is configured.

    A more esoteric question is, is the use of frames containing a structure of several different base types of variables, like the above, likely to be usable by the other PLC programmers, both software and liveware? I am thinking that even if the structure Tag type the Productivity Suite uses, works as I want it, will other PLC MMIs be able to access the minor Tags in the same way. I guess I am asking is this a normal/useful way of encoding data packets?
    Q
    Last edited by markQ; 01-04-2018, 04:24 AM.


  • #2
    Originally posted by markQ View Post
    The question I have is, how do I create Tags to populate the O->T message? Or how do I split it into the 3 Tags I want to load with data?
    In the O->T tab you define a Data Array tag, this is where the data shared between devices resides. You can define this Array tag in the Tag data base before you begin the EIP configuration, or you can define the tag as you create it.

    To define during configuration, simply type your tag name into the Data Arry entry field and tab or click out of the field. Then a Define Tag window will open. Here you select the data type for the data and assign the number of columns, which will determine the amount of data you will be sharing.

    We have a very good series of videos on configuring EtherNet/IP in the Productivity series. Check them out ... https://www.youtube.com/watch?v=qqtmmN6pnzk&t=46s
    - J. Payne
    "Controls make the world go round"

    Comment



    • #3
      ... and the structure used in the configuration window does NOT define the data type(s) that will be shared between devices. It defines the system and status tags only, not the data tags.
      - J. Payne
      "Controls make the world go round"

      Comment



      • #4
        It looks like I can only create arrays of one type, i.e. arrays of 16 bit values or arrays of 32 bit values. What I need to do is create and array of mixed type or a custom structure, if you like. I need a tag that contains:
        Unsigned 16bit
        Unsigned 32bit
        Unsigned 16bit
        Is there a way of creating custom structures like this?
        If not I suppose I could use a 4 x 16bit array and split/unpack the required 32 value to then be placed in to the 2nd and third members of the array. Is this my only option?

        Comment



        • #5
          Yes you would need to pack or unpack your 16 bit data into a 32 bit data using the PKW/UPKW or PWA/UPWA instruction.

          Comment



          • #6
            markQ , can you clarify one point in this configuration ... Is the P1-540 the Scanner or Adapter?

            If the P1-540 = EIP Scanner
            The adapter should have multiple data blocks defined (one for each data type) and each with different Assembly Instances.
            If so, you can specify a second message in the Scanner (Client) configuration to read the second data block
            If not, the Pack/Unpack is the best solution

            If the P1-540 = EIP Adapter
            You can specify a different data block for each data type in the EtherNet/IP Adapter configuration (max of 4 blocks)

            In either case you define the Array tag and must pack/unpack the data to/from those arrays.
            - J. Payne
            "Controls make the world go round"

            Comment



            • #7
              Thanks
              Are there any views on my second question?

              Comment



              • #8
                Originally posted by markQ View Post
                Thanks
                Are there any views on my second question?
                Yes ... and the short answer is "no", you cannot create an array of different data types. Although packetizing multiple data types is common in protocols, it's not for the Implicit (I/O) Messaging of EtherNet/IP [not in our experience]. Each instance is typically a single data type. Which is why we use arrays. A device will commonly have a large block of a single data type and we use the unpack instructions to easily move those into usable tags for the host controller.

                We plan to support user defined structures in the Productivity series, but even then I don’t expect you would be able to use it in the EIP I/O messaging protocol. However, we’ll continue to look into this to see how it may work. –Thanks!
                - J. Payne
                "Controls make the world go round"

                Comment

                Working...
                X