Back to Forums
10 posts / 0 new
Last post
#1 Apr 7, 2020
Siggi
Offline
Last seen: 4 years 2 weeks ago
Joined: 2020-04-07 05:09

Circuit-File (.cir) for setting simulation parameters and part values

Hi,

Im just getting started with PSpice and try to write a .cir file for easily manage simulation parameters, part values and Transformer core dimensions and so on.
But so far, I couldn't get to run my .cir file, that I am writing. There is anoter .cir file, that is generated with every simulation started, since it is changed with every simulation, I guess I am not supposed to use this, right?
Can someone please explain how I can get my .cir file to run?

I can open it in the "simulator & waveform viewer" but how can I run it?

Thank you so much

Siggi

 

Heres my .cir file. Changing for example the .TRAN command has no effect on my simulation output. This tells me, that I is not being executed...

 

.lib "C:\Cadence\SPB_17.2\tools\pspice\library\nom.lib" 

.inc SCHEMATIC1.als
.inc SCHEMATIC1.net


.TRAN  0 20m 0 0.1u 
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*)) 

.END

Tue, 2020-04-07 08:45
oldmouldy
Offline
Last seen: 2 years 5 months ago
Joined: 2016-07-06 04:23

The first thing is that the CIR file should contain a title line, for example:

* My CIR file

Then copy in the text from the .NET file, that avoids any issues with the .INC statement locating the file. Then add lines, as follows:

.LIB

.PROBE

.TRAN 0 20m 0 0.1u

.OPTIONS ADVCONV

.END

Save the resulting file. Start PSpice AD (Probe window), File>Open Simulation, change the "Files of type" to ".CIR" and browse to the saved CIR file. Then use Simulation>Run, or the "play" toolbar button to run the simulation. You will get a results tab, possibly messages or a blank Probe window which you can use Trace>Add Trace on.

Wed, 2020-04-08 04:16 (Reply to #2)
Siggi
Offline
Last seen: 4 years 2 weeks ago
Joined: 2020-04-07 05:09

Hi oldmouldy,

This Works!!! Thanks, man!


Copying the text from the .NET file, means I have to do that everytime again, when my circuit changes, correct?

But now it seems, that I am not able anymore to just click the probe on a net or node, which I found very handy to use. Is that not possible anymore now?

Wed, 2020-04-08 12:06
oldmouldy
Offline
Last seen: 2 years 5 months ago
Joined: 2016-07-06 04:23

There are two ways that you can approach simulating with PSpice. You can use Capture to enter a schematic, setup the simulation profile and run the simulation. With this you get graphical modification and probing of the circuit and the PSpice "Run" process creates the CIR file automatically and runs the simulation based upon the SImulation Profile settings. You can also use the CIR file approach, give a text netlist (CIR file) to the simulation engine and simulate that. Since there isn't anything "graphical" at the input, you lose the capability to probe the circuit but you still get all of the analysis functions that you have licensed once the simulation runs. If you want to make your CIR file a bit more flexible, now that you have a working example, you can start to investigate using the .INC statement to include a netlist. You still won't be able to probe the circuit nets graphically since there isn't any schematic at the input as far as simulating a CIR file is concerned.

Thu, 2020-04-09 04:23 (Reply to #4)
Siggi
Offline
Last seen: 4 years 2 weeks ago
Joined: 2020-04-07 05:09

Well, it's just logical, that the graphical Backend cannot be used anymore, when writing the .cir file.
Isn't there another way between "graphical" and "cir-file based". Like including a separate file, which only contains part parameters, values and so on?

You know how I mean? In this case I could use the graphical interface and have the freedom to change values in a separate file...

Can I do this with PSpice?
Sorry I am really just learning to use it :/

 

 

Thu, 2020-04-09 05:54
Siggi
Offline
Last seen: 4 years 2 weeks ago
Joined: 2020-04-07 05:09

Hi again,

I managed to get it working like I wanted.
Solution found in this video: https://www.youtube.com/watch?v=vaiRDVM9oy8
You basically need to place a special function in th schematic called "PARAMETERS", give it a new property via right-click, which is named like the value that you want to change by your own .inc file, for example RVAL. The value of this property is your standardvalue, if you do not want to change it by the inc file (you can leave that away I guess). The resistor value that you want to change, lets say it is R1, must then have the value {RVAL}. Now you create a .inc-file (e.g. MyParameters.inc) in the project folder (or any other). Go to "edit simulation" and include it on "Configuration Files" tab.
In your .inc-file you can place your commands like ".param RVAL=1k" or also ".STEP LIN PARAM VAL 2k 10k 2k". I hope this helps also others.

EDIT:
Actually it is not necessary to put the "PARAMETERS" function to the schematic. You can delet it and to everything in your .inc-file.

If you want to do a parameter sweep like the one above: ".STEP LIN PARAM VAL 2k 10k 2k" you STILL have to place the default value command ".param RVAL=1k" in your .inc-file.... I do not know why, but this seemingly is how PSPICE works.

 

Thank you for your help

Tue, 2023-03-21 05:36
soniyasharma
Offline
Last seen: 12 months 3 days ago
Joined: 2022-09-02 01:05

The information you shared is never-endingly unequivocally doubtlessly clear, Call Girl Number in Lucknow Lucknow CallGirl Call Girls Number in Lucknow CallGirls in Lucknow Hot Girls in Lucknow Lucknow online Call Girl Number Call Girls at Lucknow Lucknow Call Girl Cash Payment Lucknow Call Girls Service Call Girl Lucknow Number it gives me my optimal data to learn. Appreciative to you for sharing this standard information.

Tue, 2023-03-21 05:39
soniyasharma
Offline
Last seen: 12 months 3 days ago
Joined: 2022-09-02 01:05

Fair blog here! Correspondingly your site loads up astoundingly gigantic! What web have might you whenever Lucknow Call Girls no Lucknow Call Girl mobile Number LucknowCall Girls CallGirl Lucknow Cheap Call Girl in Lucknow Call Girl Number in Lucknow Lucknow CallGirl Call Girls Number in Lucknow CallGirls in Lucknow Hot Girls in Lucknow over an extended time at any point at long last say you are the utilization of? Will I'm getting your additional detail on your host? I wish my site stacked up as central as yours haha

Tue, 2023-04-25 06:59
soniyasharma
Offline
Last seen: 12 months 3 days ago
Joined: 2022-09-02 01:05

The data you shared is never-endingly unequivocally without a doubt clear, Vip Lucknow Call Girls Mobile Number Lucknow Red Light Hotel Hot Charbagh Call Girl Lucknow Call Girls Sex Stories Hindi Lucknow Call Girls Number it gives me my ideal information to learn. Grateful to you for sharing this standard data.

Tue, 2024-04-09 14:17
winbuzz
Offline
Last seen: 1 week 6 days ago
Joined: 2024-04-09 14:13

Winbuzz ID Online: get an instant winbuzz Login ID with 100% welcome bonus. india no 1 Cricket Match ID for Win Buzz.

Download PSpice and try it for free! Download Free Trial
Cadence