How to show time during dynamic run?
Lets say this is the code: psspy.run(0,5,1000,1,0)
I would like to print the time at each time step and store it in a variable for further use.
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
Lets say this is the code: psspy.run(0,5,1000,1,0)
I would like to print the time at each time step and store it in a variable for further use.
During the simulation you can access the time with this code:
ierr, the_time_right_now = psspy.dsrval('TIME', INDX)
Integer INDX is an index to a dynamics array. It is Ignored for 'TIME'.
So, if you were running and stopping, you could capture the time whenever you pause.
In case you work with user-written models, you may consider storing the TIME variable into on of your VAR memory positions. For example, assuming it is in the first VAR position of your model, you should write the following in your Fortran code:
VAR(L+0) = TIME !store in a variable for further use.
Asked: 2025-04-20 21:49:33 -0500
Seen: 1,227 times
Last updated: Apr 29 '25
Can someone share the original IEEE 14,24 or 39 bus systems data?
DYRE Terminated--system model requires too many STAT
How to change Pgen of generators in dynamic simulation
How to perform load connexion event in dynamic simulation ?
Two Base Frequencies in one Dynamic Simulation Case
Generator ZSORCE incompatibility
whit loves you. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
Do you really want to print the time in progress window at every time step? What is the purpose?
Channel data stores variable value, and plots w.r.t. time. When you export Channel Data in to Excel (right click and export to excel), all data, including time step will be exported to excel.