Referencing a Time Series Definition Output

Time series elements provide an advanced option in which you can read a "Time Series Definition" output from another Time Series element or from an external function (a DLL).

To access this capability, the Data Source should be set to "Linked to external Time Series Definition". When you select this option, a new tab appears (Linked) from which you specify the link from the other element:

The Linked to field only accepts Time Series Definition outputs.

This is a complex output that can only be produced by another Time Series element, by an external function, or by a SubModel.

   Note: This field will not accept a Time Series Definition output directly from another Time Series.  It will only accept Time Series Definition outputs from the output interface of a SubModel, or Time Series Definition outputs produced directly by an external function (a DLL).

The primary application of this Time Series feature is to transfer time history data between SubModels. In this case, it is used in conjunction with a Time History Definition output on the output interface of a SubModel.

Occasionally, rather than reading the time history directly into a Time Series outside of the SubModel, you may wish to first process that data in some way.  This is facilitated by allowing external functions (DLLs) to read and write Time Series Definitions.

   Note: If using an External element to output a Time Series Definition, the DLL can only be called at etime = 0.  That is, 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.

To use the Time Series in this way, you would need to do the following:

1.  Insert one or more Time Series elements into your SubModel, set their Data Source to "Recording output history", and specify the outputs that you wish to transfer outside of the SubModel.

2.  Add the Time Series Definition Output of each Time Series that you wish to transfer to the output interface of the SubModel.

3.  For each Time Series that you wish to transfer from the SubModel, you must define a corresponding Time Series element outside of the SubModel.  For these Time Series, set their Data Source to "Linked to external Time Series Definition", and on the Linked tab, enter the Time Series Definition output from the SubModel interface.

   Note: If you wanted to process the data in some way, after exporting it from the SubModel, you could read the Time Series Definition into a DLL that subsequently passed an updated Time Series Definition to another Time Series element.

4.  The output of these Time Series elements will reflect the time histories generated by the Time Series elements inside the SubModel.

The example file RecordingLinkingTimeSeries.gsm in the TimeSeries subfolder of the General Examples folder of your GoldSim directory (accessed by selecting File | Open Example... from the main menu) includes an examples of a Time Series element reading in a Time Series definition input from a SubModel.

Related Topics…

Learn more about: