🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Code generator, ADC block and Simplified C block

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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.

image

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;
}

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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.