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.

CCS/TMDSECATCNCD379D: TMDSECATCNCD379D:Data sending and receiving problems of TwinCAT3.1 and TMDSECATCNCD379D

Part Number: TMDSECATCNCD379D

Tool/software: Code Composer Studio

Hello
At present, I have used the reference materials provided by TI to implement the sending and receiving of a DatafromMaster and DatatoMaster. Now I want to achieve the sending and receiving of multiple channels of data. How do I modify the XML file and CCS project (TMDSECATCNCD379D_EtherCAT_Solution_Ref)? Thanks for reading, any reply is greatly appreciated

  • Hello

    This requires edits to two places: main application and ESI file

    In the main application, echoback.c, you'll need to update the functions: APPL_InputMapping() and APPL_OutputMapping().

    Additionally, you'll need to modify the object library in the echobackobjects.h to account for the new data variable.

    Next you'll need to update this in the ESI file. You can modify the C28xx_Config.xml, there are comments where the current variables are setup and use those as reference to create new sections for your new variables. Second option is to use within the SSC tool under Tool->Applications to create an excel and rebuild the variables you need there. When using that option, you'll want to use the F28379D stack import option that doesn't include the existing object dictionary defines.

    Best regards

    Chris

  • Thank you for your reply. I changed the following according to your suggestions, but the status of the slave state machine is ERR PREOP. What is wrong?Thanks for reading, any reply is greatly appreciated

    What I changed is as follows:

    1XML file changes:

    1.1Data Type:

    Add a SubIndex004 to DT1601

    BitSize changed from 112 to 144

    Add a SubIndex004 to DT1A01

    BitSize changed from 112 to 144

    Add a DT6016

    Add a DT7016

    1.2Objects:

    Add a SubIndex004 in # x1601

    BitSize changed from 112 to 144

    Add a SubIndex004 in # x1A01

    BitSize changed from 112 to 144

    Add a #x6016

    Add a #x7016

    1.3RxPdo:

    1.4TxPdo:

    1.5Sm:

    Outputs DefaultSize changed from 11 to 15

    Intputs DefaultSize changed from 11 to 15

    2TMDSECATCNCD379D-EchoBack.c changes

    2.1APPL_InputMapping


    2.2APPL_OutputMapping


    2.3APPL_Application:

    3TMDSECATCNCD379D-EchoBackObjects.h changes

    3.1Object 0x1601 : Output mapping 1

    3.2Object 0x1A01 : Input mapping 1

    3.3Object 0x6010 : DataToMaster

    3.4Object 0x7010 : DatafromMaster

     

     

  • Hello

    First, just verify that you are using SSC v5.11

    If you haven't already, do a comparison between the previous ESI and the new one, to make sure everything matches except for the expected changes.

    Make sure you re-program the EEPROM with the ESI and replace the ESI file in your master.

    For the 0x6016 and 0x7016, you should create a whole separate section for each like you see in echobackobjects.h. Essentially copy everything from 0x7010 from where it says \addtogroup to the line with /**@}*/ and then use that as a template for the new the "DatafromMaster". Do same for DatatoMaster.

    Also check that the sizes are matching in APPL_GenerateMapping(). With the 16-bit addressing, sometimes padding and etc can get odd, requiring some tweaking.

    Best regards

    Chris