Ask Your Question

Gusimurrvl's profile - activity

2015-10-21 00:46:42 -0500 received badge  Famous Question (source)
2015-10-21 00:46:42 -0500 received badge  Notable Question (source)
2015-10-21 00:46:42 -0500 received badge  Popular Question (source)
2015-10-05 09:08:15 -0500 received badge  Popular Question (source)
2015-10-05 09:08:15 -0500 received badge  Famous Question (source)
2015-10-05 09:08:15 -0500 received badge  Notable Question (source)
2015-10-05 05:44:03 -0500 answered a question Connection between Python and an already running PSSE-process

What I learned:

  1. PSSE Version 33.4 contains a bug so that you can't import module wx or cmath without getting ImportError respectively making PSSE and Python crash. The bug is fixed in version 33.5 and 33.6 of PSSE so update your version of PSSE if you run into the problem. There is no quick-fix for the problem. Update your PSSE version instead!
  2. You can't open PSSE GUI graphically after calling psseinint() from python.
  3. You can't establish contact between an already running GUI PSSe instance and python code EXCEPT via "Run automation File".
2015-10-04 17:24:27 -0500 received badge  Famous Question (source)
2015-10-02 03:54:29 -0500 received badge  Commentator
2015-10-02 03:54:29 -0500 commented answer Connection between Python and an already running PSSE-process

The Easy fix they said would work didn't work so still interested if you got any other ideas that could help me. I'll be in contact with Siemens now to try to get Option 1. to work.

2015-10-02 03:44:32 -0500 commented answer Connection between Python and an already running PSSE-process

I might have just gotten lucky! I contacted Siemens PSSe support and they affirmed that it's a bug in PSSe version 33.4 that you cant import wx but that there is an easy fix for fixing the problem. I'll write under "Answer" if it works.

2015-10-02 03:36:59 -0500 commented answer Connection between Python and an already running PSSE-process

Everytime I want to try a new calculation based on an altered working case I got to save to a new *.SAV-file and then load that *.SAV from python. It wont make my program user friendly having to do those steps of saving and loading after every change i do in the PSSE GUI.

2015-10-02 03:36:50 -0500 commented answer Connection between Python and an already running PSSE-process

My last option/choice No.4 for my program is to run PSSe GUI seperate from my python program. The only way to get to the GUI PSSE working case data is to save it to a *.SAV-file, start python and psseinit() and load the *.SAV file.

2015-10-02 03:19:11 -0500 commented answer Connection between Python and an already running PSSE-process

Choice No.3 - I can't establish contact between an already running GUI PSSe instance and my python code except via "Run automation File".

2015-10-02 03:18:37 -0500 commented answer Connection between Python and an already running PSSE-process

Ok. Then I know that my choice No. 2 and No.3 for running my program isn't possible because (correct me if im wrong): Choice No.2 - I can't open PSSE GUI graphically after calling psseinint() from python.

2015-10-02 03:17:25 -0500 commented answer Connection between Python and an already running PSSE-process

Problem is that my PSSe V33.4 get ImportError when trying to "import wx" in PSSe. My program is all written with wx as base for the GUI. .... File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module> import _core_ ImportError: DLL load failed: cant find module

2015-10-02 03:15:35 -0500 commented answer Connection between Python and an already running PSSE-process

Choice No. 1 for running my program is by opening PSSe GUI and loading my script with "Run automation file". I've been struggeling for 3 days trying to get that to work.

2015-10-01 09:07:46 -0500 commented answer Connection between Python and an already running PSSE-process

Ok. Check. I cant communicate between different instances of PSSE. Won't try to any more. Do you know if its possible to open the PSSE instance graphically that was initiated when calling psseinit() from python? I cant find the PSSE instance in the windows task bar list even though its running.

2015-10-01 02:39:48 -0500 received badge  Notable Question (source)
2015-09-30 12:34:24 -0500 received badge  Popular Question (source)
2015-09-30 11:09:20 -0500 commented answer Connection between Python and an already running PSSE-process

Thanks for your answer but after some thinking I realised I asked the wrong question. I've edited the question now. @jconto

2015-09-30 05:50:35 -0500 received badge  Editor (source)
2015-09-30 05:48:04 -0500 asked a question Problem importing wx in PSSE

Hello! I've been running Python on top and got no problems with running my script and importing wx in it when running from my IDE or directly with python.exe. The connection with PSSE runs without any problem after psseinit().

Now I've realised that I've got to have PSSE on top because of a number of reasons, one of which is that I need my program working with the current PSSE working case and not a saved *.SAV-file because I don't want to have to save my working case every time before i press "Run Automation File" and run my script again.

As I try to run my script with PSSE on top by "Run Automation File" it errors when I'm trying to import the wx module.

While searching for what causes the problem I tried importing wx immedietly from within PSSE with output as seen below (or in this link Output)

import math, csv, numpy, matplotlib, psspy, wx

Traceback (most recent call last): (Output from PSSE Output Bar) (wx is the only module with error)

File "<string>", line 1, in <module>
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in <module>
from wx._core import *
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module>
import _core_
ImportError: DLL load failed: Did not find the specified module.

I'm running PSSE Version 33.4.0 with 32bit Python on a Windows 7 computer.

The wx version in my Python27-folder is wx-2.8-msw-unicode Version '2.8.11.0'.

In the PSSE folder another wx folder lies under path C:\Program Files (x86)\PTI\PSSE33\PSSPY27\wx with version '2.8.12.0'. PSSE doesnt seem to be linked to using this wx-module but the one in the Python27 folder as seen in the output above.

What I've already tried to problem solve: I've tried to import wx in PSSE on two different collegues computers in my office with the same error message in PSSE appearing.

I've tried downloading msvcr90.dll and placing it in the wx folder (some guy on a forum said something about doing it). New error message:

File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module>
      import _core_
ImportError: DLL load failed: Initialization of a DLL-file failed.

I've tried moving the C:\Program Files (x86)\PTI\PSSE33\PSSPY27\wx to C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx with new error message from PSSE:

  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in <module>
       import _core_
  ImportError: DLL load failed: Did not find the specified procedure.

Any Ideas?

What can I do to be able to run wx with PSSE on top. How can i make this import work?

If you try to import wx within your PSSE, does it work? What if you try to import cmath? My PSSE gets error message respectively crashes!!

Any ideas on which DLL might be ... (more)

2015-09-29 08:41:44 -0500 asked a question Connection between Python and an already running PSSE-process

Hello.

Ok. So I opened up a PSSE-process manually in windows. Is there a way to connect to this PSSE-process from my python program so that I can collect its data thats in the working case?

Calling psspy.psseinit() is not the answer because it initializes a new PSSE-process which is run in the background and that I can't see graphically.

I want to be able to access the data from the manually started graphical PSSE-process from Python. If there is no way of doing that, is there then a way of initializing a new PSSE-process (psseinit()) and then making this PSSE-process run open, graphically, in Windows? I don't want to have it running in the background.

The idea of my program is to let PSSE modify the network graphically with split bus, switch off line and other commandos and what the python part is to do it so tell PSSE when to make Fault calculations and then collect the fault data and present it graphically in my own python program instead of as text it the PSSE Output Bar.

Kind regards

2015-09-17 05:42:54 -0500 asked a question Returning Angles and Impedances after calling SCMU

Hello!

Does it exist an easier way of returning angles for fault currents and impedances after calling SCMU?

As of now I'm retrieving angles and impedances doing calculations on Short circuit currents and bus voltages retrieved by using the SCBUS and SCBRN2 commandos, i.e.: degree( phase( returned current of SCBRN2 commando ) ) for getting the Angle and SCBUS(fromBus, 'VA') / SCBRN(fromBus, toBus, 'IA' ) for getting the impedance.

Is there another way of doing it? like a SCIMPEDANCE or SCANGLE retrieval commando?

I'm running into problem with getting values for the impedance that concur with the one PSSE presents after doing SCMU/SCOP graphically because sometimes it means me dividing 0 V / the retrieved 'IA'-SCBRN2-current when trying to get ZA because the fault is in phase A ( = 0 V)

Kind Regards

2015-09-13 22:19:51 -0500 received badge  Student (source)
2015-09-08 23:24:25 -0500 received badge  Famous Question (source)
2015-09-08 05:05:17 -0500 received badge  Notable Question (source)
2015-09-04 04:35:15 -0500 received badge  Popular Question (source)
2015-09-02 10:12:01 -0500 answered a question How to list which buses are connected to THIS bus?

Thank you very much nwilson! It helped a lot

2015-09-02 08:01:37 -0500 asked a question How to list which buses are connected to THIS bus?

Say I got 5 buses connected to one another in the order 111-222-333-444-555.

Is there a command to list the buses directly connected to bus 333 (that is 222 and 444)?

What I'm trying to do is to get hold of the short circuit currents (SCBRN2-method) going from bus 333 to bus 222 and from bus 444 to bus 333 after a Line-To-Ground Fault has been made in bus 111.

The problem is that I actually don't know how the buses are connected to one another. I just know the fault bus and the "solution output"-bus and the SCBRN2-method requires me to enter both from and to buses.