Code generator, ADC block and Simplified C block

Altair Forum User
Altair Employee

I'm trying to do an AD conversion with ADC blocks and Simplified C Block to DSP 2837X. But it results in the following error.
I read that the Simplified C Block is compatible with the Sim Coder, what would be the problem?
Code below:
in[0] = x1;
out[0] = y1;
out[1]=y2;
if (x1 > 3.0)
{
y1=3;
y2=0;
}
else
{
y1=0;
y2=2.75;
}
0
Answers
-
Hi conrado_gomes, please remove the first 3 lines. in[] and out[] only apply to C blocks, not in simplified C blocks. Without Simcoder, in[] and out[] may be ignored in simplified C blocks.
In Simplified C blocks, use x1, x2, … and y1, y2, … directly.0