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

Ask Your Question
0

How to get Machine Control Mode information for each generator?

asked Apr 14 '1

Automation Guy gravatar image

I would like to know how to retrieve the Machine Control Mode for each generator in PSSE automation. I cam across the function 'amachint' with string 'WMOD' in API documentation but was not successful. Is there any other better way to retrieve this data.

Thanks in advance!!

1 answer

Sort by » oldest newest most voted
0

answered Apr 14 '1

perolofl gravatar image

First define a function to return the wanted information:

# Function to return ibus, id and wmod in three lists
def get_wmod(sid=-1, flag=4):
    ierr, iarray = psspy.amachint(sid,flag, ['NUMBER','WMOD'])
    ierr2, idarray = psspy.amachchar(sid,flag, ['ID'])
    return iarray[0],idarray[0],iarray[1]

Call get_wmod to get three lists with ibus, id and wmod for all generators and loop through the lists.

ibusl,idl,wmodl = get_wmod()
# Loop through the lists and perform action
for ibus,id,wmod in zip(ibusl,idl,wmodl):
    # do some stuff
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

1 follower

Stats

Asked: Apr 14 '1

Seen: 1,265 times

Last updated: Apr 14 '21