PsimCmd in the command prompt doesn't return to new line. How to fix this?

Aakash Kamalapur
Aakash Kamalapur New Altair Community Member
edited September 2023 in Community Q&A

Hi,

I am using the PsimCmd to automate simulations from MATLAB, which doesn't return to new line after it has finished execution. This is really important so that I can start the next simulation. Can someone please help me with this?

image

Thank You,

Aakash Kamalapur

Tagged:

Answers

  • Albert_Dunford
    Albert_Dunford
    Altair Employee
    edited May 2023

    how are you calling PSIM is this from a batch file? what version of PSIM are you using?

    I see you are calling a file that is on your onedrive, I would recommend against scripting simulations that are on onedrive. run the sims in a local folder.

    There are some examples in the examples\command line folder this ".bat" one should generate 5 output files.

    Of note you can chose to save the simulation results as a .mat file.

    image

     

    Please let me know which version you have

     

  • Aakash Kamalapur
    Aakash Kamalapur New Altair Community Member
    edited May 2023

    I am using PSIM 2022.2. I am calling the command from the command prompt as follows. Based on what you recommended, I have changed the location of the sim file to a local folder. But the PsimCmd never comes to the new line. I need to run a new simulation with updated parameters but the command prompt never seems to finish the PsimCmd

    image

  • Aakash Kamalapur
    Aakash Kamalapur New Altair Community Member
    edited May 2023

    I am using PSIM 2022.2. I am calling the command from the command prompt as follows. Based on what you recommended, I have changed the location of the sim file to a local folder. But the PsimCmd never comes to the new line. I need to run a new simulation with updated parameters but the command prompt never seems to finish the PsimCmd

    image

    Even the bat file in the examples doesn't come to new line. I have a script in MATLAB that generates new parameters for each new simulation iteration, however the PsimCmd doesn't return to the new line after it has finished developing the desired output file. This is critical for me so that the command prompt can be prepared for running the new iteration.

    image

  • Albert_Dunford
    Albert_Dunford
    Altair Employee
    edited May 2023

    I am using PSIM 2022.2. I am calling the command from the command prompt as follows. Based on what you recommended, I have changed the location of the sim file to a local folder. But the PsimCmd never comes to the new line. I need to run a new simulation with updated parameters but the command prompt never seems to finish the PsimCmd

    image

    are you running a batch file?

    you might be better off running with scripts. here is a tutorial video

    you can use the asimulate command to run scripts in parallel. I just found an issue with the batch file exectution and have made a bug report. 

    try using scripts there are plenty of examples in the examples folder.

  • Albert_Dunford
    Albert_Dunford
    Altair Employee
    edited May 2023

    my 2022.2 runs gives the "exiting" command once it is finished.

    C:\Altair\PSIM_2022.2\examples\Command Line>..\..\PsimCmd.exe -i "L-C filter upstream link.sch" -o "out40.txt" -v "Ro=40" -g
    File Open Successful.
    Simulation Successful.
      Exiting.

    try with the scripting tool. 

  • Aakash Kamalapur
    Aakash Kamalapur New Altair Community Member
    edited May 2023

    Hi,

    Mine doesn't do an exit. Could you please send me the file or instructions to run things in the command prompt with the "exit" 

     

    Thank you,

    Aakash Kamalapur

     

  • Albert_Dunford
    Albert_Dunford
    Altair Employee
    edited May 2023

    I have asked some colleagues to look into the batch command. it looks like there is a problem.

     

    I would suggest running a  PSIM script. there are many examples and a tutorials in help->tutorial

    image

     

  • Rhonda_20369
    Rhonda_20369 New Altair Community Member
    edited September 2023

    This was a bug in PSIM2022. It is fixed in PSIM2023.0

  • Leopoldino
    Leopoldino Altair Community Member
    edited May 28

    This was a bug in PSIM2022. It is fixed in PSIM2023.0

    Hi, 

    I'm using the PSIM2023.0 and appears it not working properly yet.

    More details here on my question: https://community.altair.com/community?id=community_question&sys_id=16787f931b417990c4dfdbd9dc4bcb24

    image

  • Rhonda_20369
    Rhonda_20369 New Altair Community Member
    edited September 2023

    Hi, 

    I'm using the PSIM2023.0 and appears it not working properly yet.

    More details here on my question: https://community.altair.com/community?id=community_question&sys_id=16787f931b417990c4dfdbd9dc4bcb24

    image

    Your Altair license for PSIM was not updated to 2023 from 2022.