This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: Ethernet IP Industrial communication SDK 9.2

Part Number: AM6442

Hi all,

We are using Industrial communication SDK 09.02.00.08 for ethernet Ip adapter discrete io device profile demo program to communicate via PLC.

In the process we're having challenges as we are not able to control led from PLC.

We tried to debug example program and observed that it is going from ready state to idle state and looping in idle state and not going to run state.

if (dataReceived == EI_APP_DIO_DEVICE_receiveData_s && command == EI_APP_DOP_receiveReadyToRun)
{
nextState = EI_APP_DOP_SM_getStateFuncs(EI_APP_DOP_SM_RUN);
}

Moving further we observed that EI_APP_DIO_DEVICE_receiveData_s is zero and it is assigned in EI_APP_DIO_DEVICE_cmgrCbcondition 

if(EI_APP_DIO_DEVICE_IO_CONNECTION == cmgrInfo.forwardOpenInfo.typeTrigger
&& EI_APP_DIO_DEVICE_ASSEMBLY_CONSUMING == cmgrInfo.forwardOpenInfo.conPath[5])
{
EI_APP_DIO_DEVICE_receiveData_s = EI_APP_DIO_DEVICE_DATA_RECEIVED;
EI_APP_DIO_DEVICE_connectionState_s = EI_APP_DIO_DEVICE_ConnectionEstablished;
}

as cmgrInfo.forwardOpenInfo.conPath[5] value is zero it's not entering inside the if statement.

we wanted to know from where it is taking cmgrInfo.forwardOpenInfo.conPath[5] value and how can we control Led from PLC.

 

Thanks & regards

Sonu

  • Hi Sonu,

    I am currently working with the EthernetIP Stack Team in order to understand the issue better. 
    Please ping the thread again if there is no update in a couple of business days.

    Thank you for your patience. 

    Regards
    Archit Dev

  • Hi Archit,

    Any update on EthernetIP Stack.

    Regards

    Sonu 

  • Hi Sonu,

    Please find the response from the stack team attached below.

    For the state machine to change its state to Run, the Attribute 0x06, Instance 0x01, Class 0x1E should be set to one. If you are curious about this attribute, please see the specification for Discrete I/O Device Profile, here a snapshot of instance attributes of class 0x1E:

    As it can be seen, the Attribute number 6 is used to set the state for a group of DOPs to Run or Idle.

    The answer to your second part of your question is in EDS file, please make sure that you are using the correct path when stablishing forward open. (i.e. after using the correct path the variable cmgrInfo.forwardOpenInfo.conPath[5] should contain 0x65)
    Just for your information, in discrete I/O example there is a known issue which we are working on, please refer to the Release notes (issue [DTKEIPA-1919]).

    Regards
    Archit Dev
  • Hi Archit,

    We're able to set command value using Attribute 0x06, Instance 0x01& Class 0x1E but even then, state machine is not going from ready to run state because cmgrInfo.forwardOpenInfo.conPath[5] value is 0, which should be 0x65.  

    Path in the eds file is   is same as the one provided in the SDK 9.2 and we are using example program so no change in eds file.

    I wanted to know why cmgrInfo.forwardOpenInfo.conPath[5] value is 0.

    Thanks & regards

    Sonu

  • Hi Sonu,

    I have communicated this to our EIP Stack Team. I will get back to you with an update.

    Thank you for your patience. 

    Regards
    Archit Dev

  • Hi Sonu,

    Please find the response from our Stack expert attached below.

    The callback function EI_APP_DIO_DEVICE_cmgrCb is called whenever a ForwardOpen/ForwardClose/LargeForwardOpen request is received from Host. The argument cmgrInfo contains the detailed info about the request.

    The array cmgrInfo.forwardOpenInfo.conPath contains the Forward-Open connection Path received from the host (in your case, from PLC). That means if you read 0 in index 5, then that means wrong path has been requested from PLC.

    Below is an example of a successful Forward-Open with correct path:

    Please send us a Wireshark capture to see what actually the PLC is sending.

    Regards
    Archit Dev