This example model shows how to use an External Element to call a DLL (compiled in Fortran) to perform calculations outside of GoldSim. The DLL, compiled using a Lahey Fortran compiler, contains three functions, Sum_ (calculates the sum of two input arguments), ProdSum_ (calculates the sum and the product of two input arguments) and Half_ (divides an input argument by 2).
The model file contains three External Elements, Sum, ProdSum and Half. Sum and ProdSum are linked to two data elements, A and B, which provide input arguments to the external functions. Model etime is the input argument to Half.
Download the Model File:
Comments
0 comments
Please sign in to leave a comment.