Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Assign an array to an output in a C-script

0 votes
97 views
Hello everyone!
I was wondering if it was possible to assign a whole variable array within the C-script to a single Output (i).

Like that:

//Code declaration

double array[3]  

// Output function

double array[3]={1,2,3};
Output(0)=array[];

But it does not work ... is there a way? It's possible to do it?

Thank you!
asked Nov 17, 2018 by nikilito (89 points)

1 Answer

+1 vote
 
Best answer
You should study the PLECS Documentation for the C-Script. Also you should look into getting familiar with C if you need to use the C-Script block (your code above is not valid C code). For reference, you can see the "Space Vector PWM" block, which uses a multiple input/output C-Script.
answered Nov 19, 2018 by Falk Kyburz (186 points)
selected Nov 27, 2018 by nikilito
...