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.

parameter sweep with C-scriptvalues instead of Schematics values

0 votes
28 views
Hello Guys,

how can I connect my InputSignal (0,0) im C-script with my simulationsscript? i tried it with an example illustrated down but it comes  an output of 0.
 It looks as if my C-script and simulation parameters were not connected.
Here instead of a circuit I have a C script and want to sweep the input parameters of my C script.

Please may somebody help me?

 

thanks in advance
asked Nov 23 by christi (14 points)

1 Answer

0 votes

Please see the section User Parameters in the chapter C-Scripts in the user manual to learn how to pass MATLAB/Octave expressions (including workspace variables) into C code. The section Multiple Sample Times - Turn-on Delay further below in the same chapter presents a small example implementation.

Alternatively you could also consider using the workspace variable in a Constant block and feed its output signal into the C-Script block.

answered Nov 23 by Wolfgang Hammer (340 points)
...