History settings GAN for the remote tag prov and easychart

(Ignition 7.9.0-RC2)

We use a Remote Tag Provider (provRemoteA) from a gateway B (GWB) to acces tag’s from a gateway A (GWA) realtime tag provider (provA)

History Tags from the gateway A are stored thru a tag history splitter “histo_split” to 2 Mysql DB.

From a project hosted by gateway B, we want to display historical values of remote tag.

For these purpose we chose history settings : “GatewayNetwork” for the remote tag provider.

In this case, what is the tag path we have to use for the pen in easy chart ???
Something like [histo_split/GWB:provRemoteA]path/to/tag ???
But when we use a tag browse in easy chart, only local gateway history source seems to be listed ???

[attachment=0]remoteTag.png[/attachment]

Hi,

There are a variety of options, but I think there are a few things I should clarify first:

  1. In 7.9, you can now query tag history through realtime providers, which means you no longer need to know or care about which historical provider a tag is writing to. In 7.9.0-rc3 we’ve changed the behavior of dragging tags onto an easy chart to default to this.
    To directly answer your question, I think in this case you want your path to be simply:
[provRemoteA]path/to/tag

With what you’ve described, that will go like this: [provRemoteA] --> gw network --> [provA]–>[histo_split]–>[db conn].

  1. The fact that you only see “historical providers” when you browse is a bug, or really just behavior that hasn’t been updated yet. We need to add the realtime providers in there as well. If you go and create a Remote Tag History provider, it would show up there, but the behavior is essentially the same as querying through the Realtime Remote Provider, so I don’t suggest that.

  2. Just as a side note, if Gateway B has access to one of the databases, you could switch the history from “gateway network” to “database”. You would still query through “[provRemoteA]Tag”, but now, instead of going through the gateway network, it would go straight to the database. I’m not suggesting this, just pointing out what that option is for.

We are trying to get all of our tag addressing in order a bit more, but currently there are the following options:

  1. [~]Tag : Go through the default realtime tag provider
  2. [realtimeProvider]Tag : Go to the realtime provider, look up the history settings, query the historical provider
  3. [historyProvider/system.provider]Tag : Go directly to the historical provider, and query the data for Tag, stored from the specified system/provider.

Hope this helps,

2 Likes

Thanks a lot for these clarifications.

For the case 3) [historyProvider/system.provider]Tag …

when we use a tag path for a pen in easychart like [historyProvider/system.provider]Tag, historyProvider is a local historyProvider of the gateway or can we use an historyProvider name from the remote gateway ???

by system.provider, you mean system = the gateway system name, provider = the realtimeProvider for tag ?

If we choose to query history thru GAN, can we sometime query directly to database with this kind of tag pen settings [historyProvider/system.provider]Tag in easychart without change the history access mode to database ?

In my case, I search to query remote tag history thru GAN(and histo_split), but sometime to be able to force the query to one or another dbconn of the history splitter.

gw B [provRemoteA] --> gw network --> gw A [provA]–>[histo_split]–>[hist1] or [hist2]
Is [hist1 or hist2/system.provider]Tag a correct path for a pen in easychart hosted by a project from gw B ???

The "historyprovider" is always local to the machine you're on. No name is automatically located through the gateway network, or anything like that. However, you have 3 options at your disposal that can help:

  1. Realtime remote provider, which does what we've already discussed... goes through the gateway network to the realtime provider on the other side, which then goes to the correct historical provider on that system.

  2. Remote Historical Provider, which you can create from Config>Tags>History. This is much like a remote realtime provider, in that it's a history provider that maps to a history provider on a different machine. If you set this up, you would be able to point to the splitter directly, or either db... although I doubt you would actually want to do this (the communication would be through the gateway network, to the db... when you probably want to go directly to the db). This type of object is good when the gateway that you are connecting do doesn't actually have the tags, but has access to history that you might not... for example, on A when you have:
    A --> B[DB] <--> C[Tags]

  3. Creating a database connection will create a database history provider, which you can then use directly. With your example, if B had a connection to the "hist1" db, a path might look like: "[DBConnection/gwA.provA]Tag"

Hope this helps,

@Colby.Clegg,

Since we upgrade to Ignition 7.9.2, we have a strange behavior on tag history.
Our Ignition System settings are the following :

[L2_NORD] realtime local tag provider

histo_court : Datasource History Provider
histo_long : Datasource History Provider
histo_court_backup : Datasource History Provider (Datasource Unavailable for our test case)

histo_split (tag history splitter) --> histo_court
					               --> histo_split2

histo_split2 (tag history splitter) --> histo_court_backup
						            --> histo_long

History data are supposed to be stoed into 3 mysql db.

With the easy chart, we have this :

TMA/VEN/ANE00/10008/TMf/MES_INST_TEM : Tag History provider : histo_split

tagHistoryPen=[L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM => **NOK** : no data !
tagHistoryPen=[histo_long/.L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM => **OK**
tagHistoryPen=[histo_court/.L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM => **OK**
tagHistoryPen=[histo_court_backup/.L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM => **OK** no data, but it is normal because this DB link is down

tagHistoryPen=[histo_split/.L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM => **OK** !!!

As side note: system.tag.queryTagHistory(paths=…
paths=[L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM return => NOK : no data !
paths=[histo_split/.L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM return => OK

Is it normal to have a different behavior if we use an explicit provider that is the same as the Tag History provider settings of the tag ???

When I open the easy chart, I have the following error when I add the tag path :[L2_NORD]TMA/VEN/ANE00/10008/TMf/MES_INST_TEM

[L2_NORD] is a local realtime provider

Hi,

I’ll have to look into this. I know we changed various aspects of the addressing to try to make things more flexible, but something must be still wrong.

The root of the problem is that we have unfortunately ended up with two ways to get to historical data: through history providers, and through realtime providers. A single name in the path is ambiguous, so it looks for realtime first, and then for historical. If it finds the realtime provider, it then looks up the history provider for each tag, and then queries those.

For some reason it appears that it just doesn’t think it can query through L2_NORD for some reason. Internal tag providers should support that, so I’ll have to try to figure out why it might report that.

Regards,

Colby

Hi @Colby.Clegg,

Thanks a lot for taking into account this issue as quick as possible.

Regards,
Lionel MAZEYRAT

@Colby.Clegg,
I just upgraded my system with ignition 7.9.3-beta3.

Tag history with easychart for the local provider are OK.

But tag history with easychart and the remote provider are very long…especially when I increase the time slider with "Zoom - ". Often the vision client freeze.

Seems that the remote query for calculate the tag density is very long.

In the vision client, I have the followings error

12:32:54.857 [QueryExecuter 6] WARN com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Connection to Gateway lost, due to exception.
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:332)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:491)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:268)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:263)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.runTagDensityQuery(GatewayInterface.java:761)
	at com.inductiveautomation.factorypmi.application.gateway.TagDensityQuery.execute(TagDensityQuery.java:29)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:690)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.access$500(QueryManager.java:663)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:314)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.BufferedInputStream.fill(Unknown Source)
	at java.io.BufferedInputStream.read1(Unknown Source)
	at java.io.BufferedInputStream.read(Unknown Source)
	at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
	at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.net.HttpURLConnection.getResponseCode(Unknown Source)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:411)
	... 8 common frames omitted
12:32:54.859 [QueryExecuter 6] INFO Scripting.ScriptManager.PyComponentWrapper - Pausing scripts...
12:32:54.860 [QueryExecuter 6] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Starting reconnect thread.
12:32:54.871 [TagManager-1] WARN ignition.TagManager.Gateway - Gateway traffic is set to READ-ONLY. All tags will be Stale.
12:32:55.864 [GatewayConnection-1] INFO Scripting.ScriptManager.PyComponentWrapper - Resuming scripts...
12:32:55.866 [GatewayConnection-1] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Stopping reconnect thread.