Home Forums Development Run circuit in the command line?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #732
    mbeck6765
    Participant

      The original version of QUCS had a terminal call “qucsator” that allowed one to run the simulation engine on circuits via the command line. Is there any such capability in QucsStudio?

      #904
      pault
      Participant

        I am able to run from the command line using:

        qucssim.exe netlist.txt outputname.dat

        This also works from a dos() command in matlab in case you want to call the simulator to operate on the netlist.txt which you can get by copying the netlist it makes after running the schematic in the GUI and pasting it into a text file.

        #1010
        zhu
        Participant

          qs_bin=getenv(‘qucs3_bin’); %environmental variable
          qs_prj=getenv(‘qs_prj’);      %environmental variable
          qsfun=fullfile(qs_bin,’qucssim.exe’);
          infile=fullfile(qs_prj,’netlist.txt’);
          outfile=fullfile(qs_prj,’model.dat’);
          %call Qucssim simulator
          dostxt=[qsfun,’ -a ‘,infile,’ ‘,outfile, ‘>nul’];
          dos(dostxt);

           

          The following error message appears:

          Error: Wrong netlist line format ‘QucsData’ (line 1).

           

          Using the original netlist created by QucsStudio the following error message appears:

          Error: Wrong netlist line format ‘QucsData’ (line 1).

           

          #1015
          pault
          Participant

            I tried this in the QucsStudio window using octave with a single line. It didn’t work unless I put the whole thing in ‘ single quotes and you need to use ” double quotes around your paths if they have spaces in the names. To get the netlist I run the schematic and then it appears in the .qucs folder, you can also go to ->Simulation ->Show last netlist and then save it to the location of your choice.

            For example, this directly works for me, I pasted  it from my one line octave script which also works in matlab:

            dos(‘”C:\Temp\qucssim.exe” “C:\Temp\netlist.txt” “C:\Temp\datafile.dat”‘)

            the data in .dat are saved in a binary format which requires the use of the octave post processing scripts provided in the octave folder, a few tweaks are needed to use them in matlab due to how it opens the binary files.

             

             

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.