Ignition name query not working in remote tag provider (Tag changed script)

Hello Team,
I had set up a name query which is working on default tag provider tag but its not working on remote tag provider tag change script.
For troubleshooting i had added script to setup tags before 7 after name query call & found out its set defined values but name query not working.

system.tag.write("[CM_GA]Plant_Model/CM/KAEC/GA0/CL/010/STA_010/andonTime",5)
	
	Params={'ParamId':5,'EntityLevel':'CM/KAEC/GA0/CL/050','Status':1,'ShiftId':1}
	Status=system.db.runNamedQuery('ReportEngine/InsertStates',Params)
	
	system.db.runNamedQuery(path='ReportEngine/InsertStates',parameters=Params)
	
	system.tag.write("[CM_GA]Plant_Model/CM/KAEC/GA0/CL/010/STA_010/andonTime",9)

Even Im not getting any error in gateway status page.
Ignition Version: 8.1.15

Please let me know any configuration missing in case of remote tag provider

Regards,
Dhiraj Pawar

  1. Don't put queries in tag value change scripts. You can search the forum if you want to know why, it's been discussed countless times
  2. When you put a change script on a tag that's in a remote tag provider... Well, there's a gateway for which the provider is not remote. Go to THAT gateway, and check the logs THERE.
  3. Chances are the name query you're using doesn't exist for that gateway. And if it exists, then it's not in the gateway scripting project. You need to configure it through the gateway's settings. And, again, that's the gateway where the tag provider was created. The one where that tag provider is not remote.
  4. Don't put queries in tag value change scripts !
1 Like

Hello @pascal.fragnoud ,
Issue resolved I had set up tag change script on front end server & After move it backend server its works

I guess you need a third caution. Don't put queries (except for queries run with SF - store and forward system) within tag change events; tag change events should not execute for longer than ~10ms else you risk losing events. Move them into gateway tag change events instead.

However, it looks like you're not using the values coming back from the queries, so you can just send them to the SF queue to run with system.db.runSFPrepUpdate

2 Likes