Back to Browse

C-Coder Script - PSCAD V5

144 views
Apr 30, 2026
13:14

C-Coder Script Overview In this video, we introduce the C-Coder feature in PSCAD V5 This tool allows for the translation of existing PSCAD control modules into valid C-code that can be compiled separately from PSCAD for different purposes, including running directly on a microcontroller. Key Chapters Covered: 00:14 - Setup – A look at the example module configuration, featuring a ramp-up calculation driven by sliders and time-based inputs to demonstrate the logic before translation. 00:59 Running the C-Coder – How to use the “Independent C-Code” generation tool and configure specific data types for integers and floating-point values to ensure hardware compatibility. 03:53 Using Auto-Generated Code – A walkthrough of the output folder containing the header and source files, and how the translated logic is structured within the primary C file. 7:07 Modifying the auto-generated code for dynamic allocation – Instructions on how to adjust the generated code to support dynamic memory allocation, allowing for more flexible integration into external programs. 8:36 Limitations – An overview of the specific constraints of the C-Coder, such as the requirement for components to be written in C-script rather than Fortran. 9:44 Adding Custom Components to C-Coder – How to ensure custom component logic is compatible with the translation process by defining it within the specialized C-script section. Please refer to this Help System topic for further information. https://www.pscad.com/support/support-resources

Download

0 formats

No download links available.

C-Coder Script - PSCAD V5 | NatokHD