PLECS: Using the C-Script Block

The C-Script block is a versatile tool in the PLECS component library that can be used for implementing custom controllers and components. The advanced capabilities of the C programming language combined with the flexible sample time settings in the C-Script block allow almost any custom component model, from a simple mathematical function to a complex state machine, to be implemented. The C-Script block can also simplify the workflow when writing C code for DSP controllers since the code can be reused for the DSP. In this tutorial the user will learn how the C-Script block interfaces with the simulation engine through function calls and the different time settings available in the C-Script block. Exercises include using the C-Script block for implementing a mathematical function and for implementing both a continuous and discrete PI controller.

tutorial_files: 
https://www.plexim.com/sites/default/files/tutorials_categorized/plecs/cscript_controller.zip
tutorial_product: 
PLECS
pdf_file: 
https://www.plexim.com/sites/default/files/tutorials_categorized/plecs/cscript_controller.pdf
pdf_image: 
files_image: 
tutorial_priority: 
110