Clear Filters
Clear Filters

"Data type mismatch" error in Embedded Coder Support Package for Texas Instruments C2000 Processors Simulink model

13 views (last 30 days)
Dear friends,
I am working with the Embedded Coder Support Package for Texas Instruments C2000 Processors package for Simulink and trying to implement a certain type of control system. For this, I need to measure two currents and take the Clarke Transformation of them.
Inside this "Current Sensors" subsystem, I have this:
Just measuring two AC currents and removing the offset given by an external conditioning circuit. The "DTC" blocks (Data Type Conversion) are used a lot in my program, since some Texas Instruments blocks requires a certain type of data.
They are all set as "Inherit: Inherit via back propagation", so they will adequate the data type according to the next block. But it doesn't work in this section of the model... and I don't know why.
Basically, I got this error message:
Data type mismatch. The internal rule determines the output of 'TCC_CPU1/Clarke Transformation/Multiply by 2' to be a signal of data type 'sfix32_En16'. However, it is driving a signal of data type 'sfix32_En21'.
Why are the DTC block generating a "sfix32_En21" type, if the "Clarke Transformation" block requires a "sfix32_en16"? Checking the "Clarke Transformation" block, we got this:
It seems that the "DTC A" block is working properly, but the "DTC B" isn't. If I change manually the "DTC B" block from "Inherit: Inherit via back propagation" to "sfix32_En16", I got this error message:
Invalid setting in 'TCC_CPU1/Current Sensors/DTC B' for parameter 'OutDataTypeStr'.
Caused by:
Error evaluating parameter 'OutDataTypeStr' in 'TCC_CPU1/Current Sensors/DTC B'
Undefined function or variable 'sfix32_En16'.
Variable 'sfix32_En16' does not exist.
I am using another 5 "Data Type Conversion" blocks, and none of them give me problems. But this one, specifically, is giving me a headache.
Someone knows how to solve this?
Thank you, Gabriel
  1 Comment
Yaki on 7 Apr 2023
Where did you find the CLARKE transformation to be used with TI DSP's? We need AB/DQ blocks as well....did you install something in particular. We think we are all set, but this CLARKE block doesn't appears to us.
Thanks in advance.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!