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.
Tool/software: Code Composer Studio
Hi,
i hope you can help me.
I have a question on mapping the in- and outputs in CCS. I have already mapped the objects in SSC, that looks like this:
So i have different data types in my objects.
Now if i follow the description, in CCS i have to modify the functions in my generated .c-file:
In this case the pointer pData is a type of UINT16. If the programm does "pData++" the adress of the pointer move to the next 16bit memory but my variable ***_Enable0x7000 is just 8 bit long and the next variable ***_Power0x7001.PWR1 is also in that adress. That does´nt fit to the memory adress in TwinCat.
For example:
I write in TwinCat:
***_Power0x7001.PWR1 = 1
Now looking in CCS results, that ***_Power0x7001.PWR1 is still 0 but my first variable ***_Enable0x7000 was changed
The 1 was set in next 8 bit of ***_Enable0x7000 --> HEX: 0x0100.
So my question is, how can i handle the mapping with multiple data types if pData can just by one sort of data types. Do i have to change all my varaibles to one data type? If thats true, in next step of the project i need floating points, so pData should be UINT32 and all my variables too.
With best regards
Willi Konrad
Willi,
We have put an example to help customers with this. If you look at the TMDSECATCNCD379D EtherCAT solution reference guide/example and generate C28 SSC code with example, you will see how this can be handled.
Please follow SPRUIG9, available in below folder in controlSuite.
C:\ti\controlSUITE\development_kits\TMDSECATCND379D_V1.0
The example application's mapping functions show how to move data from the array to the input/output objects.
Please let us know if you need any further help with this.
Best Regards
Santosh Athuru