Script
DSIM provides Script functions that can be used in the Script tool to perform calculation, run simulation, and plot graphs. The Script tool can be found in the Tools menu in DSIM.
The Script Tool Supports the Following Functions:
In this case, the Script function is employed to perform batch simulations of a three-phase diode rectifier circuit. Different load resistance and inductance are set during each simulation. The following figure shows the schematic, the parameter settings, the script code and running results.
First, the circuit is built, and the values of the load resistance and inductance are defined as variable names (C1 and R1).
● Mathematical operators
● Computational functions
● Formula functions
● Control functions
● Array functions
● String functions
● Complex numbers
● File functions
● Graph function
● Simulation function
A Case of Script in DSIM
Secondly, write a script, set simulation parameters such as simulation time and parameter values of different scenarios, and set simulation output to "txt" format to facilitate data processing.
Finally, check the syntax of the script and run the script to get multiple results through batch simulation. "test1"~"test6" record the results of each run of batch simulation.
Open the simulation result "Script_test1.txt", its data format is shown as follows. This file can be opened directly using DSIMViewer, or imported into other data processing tools for further data processing.
Use DSIMViewer to open "Script_test1.txt". The waveform is shown as below. The figure below shows the three-phase input current, output voltage and current.