Skip to end of metadata
Go to start of metadata


This feature is new in Ignition version 8.1.0
Click here to check out the other new features


The Historian Simulator is a provider that will generate simulated historical records, without the need for an external database or data source. The Simulator doesn't actually store any records. Rather, subsystems in Ignition can make requests to the simulator, and it will generate a result set based on the Tag path(s) provided.

The simulator is great for testing, as the data generated is reliably aligned to the specified period. Each generation of data for a given set of parameters and given time range will be repeatable. In addition, the "resolution" of the raw data, or the frequency of the generated datapoints, is configurable allowing for as dense or sparse raw values. 

On this page ...

IULocgo


Historian Simulator


Configuring a Historian Simulator Provider

  1. On the Gateway Webpage, navigate to the Config section.
  2. Under the TAGS heading in the sidebar, click on History.
  3. On the History Provider listing, click Create new Historical Tag Provider.
  4. From the listing of available types, select Simulator, and click Next.



  5. The simulator requires a unique name from other historical providers on the same Gateway, but otherwise does not require any other configuration settings. The bulk of configuration occurs when attempting to request records from the simulator. For now just provide a name, and click the Create New Historical Tag Provider button to finish configuring the provider. 



  6. You'll be redirected back to the History Provider listing. You're now ready to use the simulator. 


Retrieving Simulated Data

Once a Simulator Provider has been configured, you need a Tag Historian Query to start retrieving records from it. Lots of different interfaces can request Tag Historian Queries, but for the sake of simplicity we'll only focus on Tag history bindings in Vision. Browsing for available historical Tags using a Vision Tag History binding reveals the following Tags:

To get started quickly, you can use the default Tags in the list above. The one exception would be the "function_period_amplitude_resolution " Tag, as that's simply there for syntax reference. The rest of the Tags utilizes the simulator's pathing syntax. 


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:

parameterdescription
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. 
periodTimeHow often the data sequence starts over. Values for periodTime need a time unit.
amplitudeUsed as a peak value by most of the functions. 
resolutionTimeHow 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:

NotationTime Unit
msMilliseconds
sSeconds
mMinutes
hHours
dDays

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. 

tag:sine_10s_20_500ms

The following would generate a square wave, with an amplitude of 10, repeating every day, while generating a raw value for every 5 minutes.

tag:square_1d_10_5m

The realistic function is unique in that it only utilizes the periodTime parameter, therefore: 

tag:realistic_30m



  • No labels