Yes, I checked that, using ngspice in interactive mode, the results of the fourier analysis are produced if I use a .CONTROL section. But if a .CONTROL section is not used the fourier results are not produced (which I find odd). Just to clarify: 1) If I use a netlist file which (in short) looks like this * circuit description precedes this line .AC DEC 100 1 1MEG .TRAN 300u 3 .FOUR 2 V(2) .END the fourier results are not produced. 2) But if I use a netlist file which (in short) looks like this *...
Yes, I understand that it is not relevant to discuss now the issues of older versions of ngspice.
I’ll ask the system administrator to update ngspice to version 34 but this will surely take quite a while. So I guess that, for the time being, and won’t be able to access the fourier vectors.
I’m using version 27 of ngspice in Ubuntu 16.04. To load the circuit I’m using a handler to function ngSpice_Circ and to start the simulation I’m using a handler to function ngSpice_Command with command bg_run. Then, I wait for the end of the simulation. For this, I check for parameter bool of the callback function setup with parameter BGThreadRunning in ngSpice_Init. When this function is called with this parameter having a false value I assume the simulation is finished. Then, and only then, I...
I’m using version 27 of ngspice in Ubuntu 16.04. To load the circuit I’m using a handler to function ngSpice_Circ and to start the simulation I’m using a handler to function ngSpice_Command with command “bg_run”. Then, I wait for the end of the simulation. For this, I check for parameter “bool” of the callback function setup with parameter BGThreadRunning in ngSpice_Init. When this function is called with this parameter having a “false” value I assume the simulation is finished. Then, and only then,...
Yes, I tried it in interactive mode doing the following: Using a file that (in short) looks like this * circuit description precedes this line .AC DEC 100 1 1MEG .TRAN 300u 3 .END I started ngspice, executed the “source <filename>” command, then the “run” command and then the “Fourier 2 V(2)” command, which produced the expected fourier listing (with “Harmonic”, “Frequency”, “Magnitude”, etc. columns). Then, after executing a “display” command, I get the following list of available vectors:</filename>...
Hello again. I still haven’t been able to figure out what I’m doing wring. The thing is this: I’m not sending the fourier command after the background job (which was in fact started with bg_run) is ready; It is the netlist that has all the commands, including the .FOURIER command, in the following order: * circuit description precedes this line .AC DEC 100 1 1MEG .TRAN 300u 3 .FOURIER 2 V(2) .END After the simulation job is ready (and I’m pretty sure it is ready), function ngSpice_AllPlots returns...
Hello Holger. Thanks for your rapid reply. Yes, I had a look to chapter 17.5.29 and tried the fourier analysis in interactive mode. It worked fine. My problem is when using it while using ngspice as a shared library. As the manual says, “The fourier command not only issues a printout, but also generates vectors, one per expression.” but I fail to get those vectors with function ngSpice_AllVecs, even looking in all plots returned by function ngSpice_AllPlots. I’m pretty sure that I’m doing something...