PSS/E-FORTRAN_sharing variables between modules
Hi,
Im trying to connect two modules in PSS/E by FORTRAN language (control module and generator module of an inverter). The 2 outputs of the control module(say VAR(L) and VAR(L+1)) are the 2 inputs of the generator module (which is encrypted)(WIPCMD and WIQCMD which are dynamic simulation arrays) but I am not be able to do this connection.
At the beggining of my control module I write USE [generatormodule] so as I have available all the variables of the generator module. With the .flx file I compile the [generatormodule].mod too.
My control model has from MODE 1 to 4 and at the end of MODE 3 (just before the 'return') I write:
WIPCMD(MC)=VAR(L)
WIQCMD(MC)=VAR(L+1)
Being MC the machine index where apply this plant-related control model.
I don't know if the previous logic is correct, any idea?
Regards
I think the logic in the control model should be OK. Just make sure that calling sequence of the models in the CONEC.
I'm new creating plant-related models. I thought that, in this case, the connection of the variables would only be done inside this model. So it is necessary to create also a CONEC model? If it's, should I write only the CALL statements + variable connections or something else? Thank you very much.