First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

DIgSILENT Powerfactory and Python scripts

asked Oct 24 '12

JervisW gravatar image

updated Oct 24 '12

I've heard of some people using Python with DIgSILENT's PowerFactory product (A competitor for PSS/E).

So my question is have you ever used Python and PowerFactory, or would you want to?

If you can, post some example code that you might run.

(edit) I have seen that PowerFactory has their own language that is used for scripting, what does that look like?

4 answers

Sort by » oldest newest most voted
2

answered Feb 9 '14

mgb158 gravatar image

updated Feb 10 '14

JervisW gravatar image

I have used Python with PowerFactory, but only since the recently released Version 15.1.

You can run python scripts from within and outside PowerFactory. Outside you first get Python to start PowerFactory.

From within PowerFactory the scripts are quite straight forward. For example:

import powerfactory
app = powerfactory.GetApplication()
app.PrintPlain('Hello World')

Will write "Hello World' to the output box in PowerFactory. Running Python from the outside to run PowerFactory is a little more complicated, but not too bad.

PowerFactory's own language is called DLP. It is like C, but not quite. It can be a little restrictive. You are limited to its inbuilt data types which aren't particularly comprehensive.

Theoretically it can be interfaced with to outside PowerFactory, but this is limited - you cannot run DLLs that open dialog boxes.

link
1

answered Nov 8 '14

cmoman gravatar image

I've just started playing with the python module in Digsilent Powerfactory

You'll have to figure out the following link. My karma is too low apparently.

github.com/cmoman/thrreadingdigsilent/blob/master/threadingex1.py

The script above is written in PyQt and is used to drive PowerFactory from an external script. I was tinkering with threading so that my GUI would remain responsive while PowerFactory was solving a load flow etc. It is more complicated that it needs to be.

It's helpful to keep the DigSilent object alive (instantiate it the main loop) since the logging in and setting up the model takes quite a bit of time. If you read my code you'll see I instantiated in the main loop and then pass it to the MainWindow and all the way to the thread.

Cheers Chris

link
0

answered Feb 8 '14

I want to use phyton and PowerFactory

link
0

answered Aug 22 '15

majid saeedi gravatar image

Dear friend

Can you help me on the topic monitoring, any information you can help me solve my problem. The raises the question, whether the software has the ability to connect directly to a smart grid and all the network information that exists in every moment to be online display and can automatically analyze the network at any moment. Whether it has the ability to get the information To be online ? In my opinion this is a powerful software should have the ability !! Please do not hesitate to help me.

Majid Saeedi Curious researcher

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

3 followers

Stats

Asked: Oct 24 '12

Seen: 8,185 times

Last updated: Aug 22 '15