Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

make-instance makes an instance of a registered plugin. Plugin registration is performed by having the plugin name placed in the application's PLUGINS file.

Parameter Description
store Data store name
instance Name of the plugin instance. Used to differentiate multiple instances of the same plugin, such as for WAVEOUTPUT plugins
plugin Name of the plugin
config List of configuration options for the plugin. Multiple lists can be used if needed.

Example

Example 1: Initialize a trendoutput plugin to save the store values of variables "HR" "SP" and "SQI" into the Trends file. This example assumes that the trendoutput plugin is included in the application's PLUGINS file.

(set! store (make-store "store"))
(scheduler-startcase store (time->timestamp (current-time)))
(make-instance store "TRENDOUT" "trendoutput" '("Trends" ("HR" "SP" "SQI")))
(scheduler-init)

Example 2: Create an instance of a trendhistory plugin with two configuration parameters

(make-instance store "TRENDhr" "trendhistory" '("Source" "hr") '("Length" 15))
Clone this wiki locally