Code generator, ADC block and Simplified C block

Altair Forum User
Altair Forum User
Altair Employee
edited August 2023 in Community Q&A

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

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    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.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.