Skip to content
English
  • There are no suggestions because the search field is empty.

Ignition Module - Querying Data From Igntion

Once your tags are historized to Timebase, you can view and query that history from within Ignition — in trend charts, Easy Charts, and scripts — exactly as you would with any other historian.

Overview

Once your tags are historized to Timebase, you can view and query that history from within Ignition — in trend charts, Easy Charts, and scripts — exactly as you would with any other historian. This article covers browsing the Timebase tag tree in Ignition and constructing the correct path format for scripting queries.

Browsing Tags in Ignition

  1. In Ignition Designer, open a component that supports historical data (Easy Chart, Power Chart, etc.).
  2. Click the History binding or open the tag browser with history mode active.
  3. Expand your Timebase historian provider in the tree.
  4. Timebase datasets appear as top-level folders.
  5. Within each dataset, tags are presented in their original folder hierarchy using / separators as folder boundaries.
  6. Click a tag to select it. Leaf tags have data; folder nodes do not.

Tag data is loaded lazily — folders fetch their children only when expanded, not all at once.

Historical Queries in Scripts

When querying Timebase tag history from Ignition scripts (e.g. system.historian.getRawHistory), you must use the full histprov: path format. Both path styles are supported:

Path Formats

SQL Historian / legacy format (drv):

histprov:<HistorianName>:/drv:<GatewayName>:<DatasetName>:/tag:<TagPath>

Core Historian format (sys/prov):

histprov:<HistorianName>:/sys:<GatewayName>:/prov:<DatasetName>:/tag:<TagPath>

Where:

  • <HistorianName> — the name of your Timebase historian instance in Ignition
  • <GatewayName> — the Ignition Gateway's system name (not the hostname)
  • <DatasetName> — the full dataset name in Timebase, including the prefix
  • <TagPath> — the tag path within the dataset, using / as a separator

Example

For a historian named Timebase, gateway Ignition-FLSN03, dataset prefix Ignition-, and the [default] Tag Provider:

# drv format
paths = ['histprov:Timebase:/drv:Ignition-FLSN03:Ignition-default:/tag:Folder/TagName']

# sys/prov format
paths = ['histprov:Timebase:/sys:Ignition-FLSN03:/prov:Ignition-default:/tag:Folder/TagName']

data = system.historian.getRawHistory(
paths=paths,
startDate=system.date.addHours(system.date.now(), -1),
endDate=system.date.now()
)

Finding the Gateway Name

The gateway name is not the same as the hostname. To find it:

  • In the Gateway web interface: Config > Gateway Settings > System Name
  • In a script: system.tag.readBlocking(['[System]Gateway/Name'])[0].value

Quality Code Mapping

Timebase Quality Ignition Quality
192 Good
28 Bad_Shutdown
8 Bad_NotConnected
Null / missing value Bad
Other integers Passed through directly

Troubleshooting

Symptom Likely cause What to do
Tag browser shows the Timebase provider but no datasets Timebase has no datasets, or the REST call failed Verify data is being written to Timebase. Check gateway logs for browse errors.
Tags appear as folders instead of leaf nodes The tag name contains / separators creating nested folders This is correct behavior — expand the folders to reach the leaf tags.
Historical query script returns no data Incorrect histprov: path format Verify the historian name, gateway name, and dataset name. Remember the dataset name includes the configured prefix. The gateway name is case-sensitive.
Query returns data but values seem offset in time Time zone difference between Ignition and Timebase Timebase stores timestamps in UTC. Confirm your Ignition Gateway is configured for the correct time zone.
Scripting query throws a path-not-found error Wrong gateway name in the path Read [System]Gateway/Name from Ignition tags to get the exact gateway name.