In some cases, you may wish an external program to directly read, manipulate, and/or generate a Time Series Definition. A Time Series Definition output produced by such an external function can be used to dynamically define a Time Series element.
To facilitate this, GoldSim allows you to input and/or output a Time Series Definition using an External element.
In order to specify that an input argument of the External element is a Time Series Definition, you must select a Time Series Definition output when you select the output to link to. After doing so, the input argument dialog will look like this:
Note that in addition to listing the Definition and External Units, it is also necessary to specify what the time series Data Represents. The External Units and Data Represents field must be consistent with the actual Time Series Definition that is referenced (and automatically default to the correct values when the link is created).
In order to specify that an output argument of the External element is a Time Series Definition, you must indicate that the Data Type of the output is a Time Series Definition (when you define the Type… for an output argument):
As seen above, in addition to defining an output of an External element as a Value, Condition or Table, you can also define an output whose data type is a Time Series Definition. Time History Definition outputs are complex outputs that represent all the information necessary to define a time series.
If you select Time Series Definition, the following dialog is displayed for specifying the attributes of the output:
Note that in addition to defining the External Units, you must also specify what the time series Data Represents.
You link a Time Series Definition produced by an External element to a Time Series element by selecting "Linked to external Time Series Definition" from the Data Source field in the Data Definition section of the Time Series element dialog:
When you do so, a new tab (Linked) is added to the dialog. You use this tab to specify the name of the External element output that defines the time series.
Note: If using an External element to output a Time Series Definition, the DLL can only be called at etime = 0. Because a Time Series must be defined at the beginning of the simulation, if you try to redefine the time series in the middle of the simulation, GoldSim will issue a Fatal Error.
The specific format in which an external function reads and outputs Time Series Definitions is discussed in Appendix C of the GoldSim User’s Guide.
Learn more about: