Answer Question
Is it possible to create your own fortran functions to be used in custom components?
I am doing my own components using Fortran script. Sometimes there are functions and subroutines I need to use multiple times within my component. There are many predefined functions in PSCAD such as SIN(X), ABS(X), ROUND(X) etc, that you can call from within fortran script, but is it also possible to create and use your own functions? If so, how? I tried standard fortran syntax, but didnt seem to work.
example, how do I achieve this in PSCAD?
example, how do I achieve this in PSCAD?
FUNCTION REAL myfunction(a, b)
myfunction = a+b
RETURN
END FUNCTION
$out1 = myfunction($in1, $in2)