• Home
  • Product
    • DSIM 2026a
    • DSIM Features
    • Release Review
    • Get DSIM
  • Try DSIM
  • Application
    • User Cases
    • Simulation Cases
  • Solution
    • SST Solution
  • Resources
    • Technical Resources
    • Q&A
  • Events
    • Webinar
    • Research Support Program
    • Teaching Support Program
  • About Us
    • Contact Us

DSIM -- Power Electronics Simulation

  • Log in
  • Register
Quit
Contact us
简体中文 (CN)

C Block

The C Block enables users to input C code directly without the need for compilation.  A C interpreter engine will interpret and execute the C code at runtime. This feature simplifies the process of writing custom C code.

C Block Code Consists of Four Sections:

In this case, the controlled current source and C Block are employed to construct a three-phase current source, which demonstrates the function of the C Block. Specifically, the C Block defines the output for each simulation step within the SimulationStep function, namely the three-phase sinusoidal signal. Subsequently, it outputs the three-phase sinusoidal current through the controlled current source.

The following figure shows the three-phase current waveform of the output of the controlled current source. 

Predefined Global variables and user-defined functions.
SimulationStep function Code that is called by DSIM at every time step.

SimulationBegin function

Code that is called only once at the beginning of the simulation.
SimulationEnd function Code that is called only once at the end of the simulation.

 

A Case of the C Block

Features

  • Switching Transient Model Simulation
  • Loss Calculation
  • C Block
  • DLL Block
  • AC Sweep Frequency Analysis
  • Script
  • Co-simulation with MATLAB/Simulink
  • DSIM API(MATLAB)
  • DSIM API( C/C++)
  • DSIM API(Python)
Product
  • DSIM 2026a
  • DSIM Features
  • Release Review
  • Get DSIM
  • Contact Us
About Us
Copyright © DSIM- Power Electronic Simulation
Application
  • Simulation Cases
  • User Cases
  • SST Solution
Solution
Events
  • Webinar
  • Research Support Program
  • Teaching Support Program
  • Technical Resources
  • Q&A
Resources
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6
 本网站由阿里云提供云计算及安全服务
本网站支持 IPv6