Simulator Path Syntax
The built-in "Tags" provided by the simulator are a great example of the simulator can do, but it is worth knowing that the data returned by the simulator can be customized. Doing so involves modifying the Tag path in the Tag history query.
As a refresher, history providers require a path that contains multiple components. Together, the components identify where the data came from. For example, a historical path could have a histprov
component that represents the history provider associated with the data, and a Tag
component that represents the Tag path of the Tag. A hypothetical historical path would look like the following:
histprov:my_provider:/tag:my_tag_path
With that understanding, retrieving records from the simulator involves providing the name of the simulator configuration on the gateway (the histprov
) and a Tag path. Again, the simulator doesn't store any records. Rather, it looks at the Tag path provided, parses it, and returns a result set based off of contents in the path.
The simulator expects Tag paths to use the following notation, with each "parameter" delimited by an underscore:
function_periodTime_amplitude_resolutionTime
Each parameter is described below:
parameter | description |
---|
function | The function to use when generating the raw data. The following functions are available: - Ramp - Start at zero, and increment up to Amplitude over a the periodTime. Once Amplitude has been reached, start over at zero and repeat.
- Sine - Generates a Sine wave over the period of time, with Amplitude representing the peak deviations from zero.
- Cos - Generate a Cosine wave over a period of time, with Amplitude representing the peak deviations from zero.
- Square - Half the time is spend at zero, the other half is spent at amplitude, across periodTime.
- Realistic - Generates 400 random but somewhat realistic data points that repeat each period. Note that this function ignores both the amplitude and resolutionTime parameters.
|
periodTime | How often the data sequence starts over. Values for periodTime need a time unit. |
amplitude | Used as a peak value by most of the functions. |
resolutionTime | How often raw data points are generated. Like periodTime, this parameter requires a time unit. |
For those functions utilizing a time unit represented by certain notation. A description of each notation can be found below:
Notation | Time Unit |
---|
ms | Milliseconds |
s | Seconds |
m | Minutes |
h | Hours |
d | Days |
Editing the Paths
With the knowledge of how the paths work, you can easily use the existing Tag history interfaces to request datasets with custom paths, usually by simply typing in the desired parameters.
For example, the image below shows Vision's Tag History Binding interface, but we modified the Selected Historical Tag path to use the realistic function over a period of 30 minutes, instead of the default one day.

Function Examples
For example, the Tag in the path below utilizes a sine function, over a period of 10 seconds, with an amplitude of 20, and a raw point will be generated every 500 milliseconds.
The following would generate a square wave, with an amplitude of 10, repeating every day, while generating a raw value for every 5 minutes.
The realistic function is unique in that it only utilizes the periodTime parameter, therefore: