Pop up always appears

Hello,
I have a problem and this is just my second day on ignition so maybe the problem is not a real one.
So, I have this pop up which appears a lot of times in a day on my supervision, the problem seems to be that we desabeld on ignition gateway the database STATS cause it's not working for some reason. My question is where can I find this timer ? and how can I desabled this pop up only for this problem ?


2024-01-24 14_17_02-Capture POP UP (3).JPG ‎- Photos

Thank u

So you need to find that timer component and dig into the script for the propertyChange. The timer is going to be a component on the screen somewhere... or in a template that is being referenced.

It looks like you are trying to interact with a database 'ITM_STATS' that is faulted at the time that the script is running.

Once you find the timer and get into the script, use a python try/except logic to escape around the logic so if there is an error you can suppress it.

1 Like


I Found this in the script, I dont know if the OpenAideAlarme (Name) is the cause of the problem, but I dont find any timer on the screen.
I'll look better and update the topic.

Is this Ignition 7.X or 8.X?

If you open the Window, the left side of the designer you should be able to expand the window, then the Root Container, and then see all the different components in the window. Luckily it is called Timer so you should be able to find it in the list of components. If it isn't in the window, then you will have to look into the different templates that are embedded in that window.

This can occur from ANY open window, so you will need to investigate all the opened windows when this error is occurring.

Can you provide a screen shot of the window from Designer?

2 Likes

2024-01-24 14_40_52-VM_ITM_CASTETS - VMware Remote Console

I found this, I think it's the source of my issue. but I'm affraid to make any modification cause this ignition it's for a big client and It's running now. So I need some help please.
The thing is that we have 3 databases, Two are enabled and working perfectly, but the third one have a problem. How can I change the programme in order that he just try to connect only on the two databases and ignore the third one ? I don' see where to do it ?

and to answer ur question it's ignition 7.9

Do us all a favor and post that code using this guide:

That way we can see the entire script and try and help.

You might need to investigate why the Database is faulted rather than covering it up in the code.

1 Like
if event.propertyName  == "value":
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectCadencesInjection_100",event.source.parent.BDD_Statistique)
	# Ajout du paramètre
	#call.registerInParam('System', system.db.INTEGER, 1)
	
	# Excecution de la procédure
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
		event.source.parent.LigneDataset = result
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectTauxSaturationPlateaux_100",event.source.parent.BDD_Statistique)
	# Excecution de la procédure	  
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
		event.source.parent.SaturationDataset = result`Preformatted text`

We know why the databases is faulted, the problem is that some disks of the RAID 5 need to be replaced. but until than the client don't what to see this pop-up every time.

Take a look at this custom property and see what the value of this is. If it is the offending database then we know you have the right section of code.

1 Like

What @bschroeder suggested won't change any logic, it will just hide that popup for the times when your db is not accessible. So something like

import java.lang.Throwable # SQL errors come through as java
if event.propertyName  == "value":
    try:
		# Appel de la procédure stockée
		call = system.db.createSProcCall("Supervision_SelectCadencesInjection_100",event.source.parent.BDD_Statistique)
		# Ajout du paramètre
		#call.registerInParam('System', system.db.INTEGER, 1)
			
		# Excecution de la procédure
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.LigneDataset = result
			
		# Appel de la procédure stockée
		call = system.db.createSProcCall("Supervision_SelectTauxSaturationPlateaux_100",event.source.parent.BDD_Statistique)
		# Excecution de la procédure	  
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.SaturationDataset = result`Preformatted text`
    except java.lang.Throwable, e:
        # Now the popup won't appear, you probably want to log this somehwere though
        print e

You probably want to put the actual logic into a script module though, doing an import java.lang.Throwable on every single execution of the property change may hurt performance. Also just best practice to put logic into the scripting library as much as possible imo.

3 Likes

sorry but I think I don't know how we do this !
2024-01-24 15_33_57-VM_ITM_CASTETS - VMware Remote Console

I mean how can I ckek what is the value of event.source.parent.BDD_Statistique`

It's looks like a custom property on the parent container.

1 Like

No, there is nothing here ! except if I'm looking for it in the wrong place ???

Look at the root container for the window and see if there are any custom properties defined.

You may want to start going through Inductive University and the Ignition 7.9 Manuals.

2 Likes

Looking at this closer:
image

image

image

BDD_Statistique is a variable that stores the name of the database your script is supposed to use for its calls during the value change event. It's possible that this is not a static value -- meaning at any given time, it could be any of your three databases.

Bkarabinchak.psi's try / except solution is, in reality, a perfectly valid approach to quietly handling some potentially problematic code, but it's difficult for me to recommend it because, due to personal preference, I usually do everything I can to avoid having to use it:

try:
	# your existing code
except:
	# If your existing code threw an exception, do something else instead
	# Usually, this area is used to quietly log the error information
finally: # [optional]
	# Do this thing no matter what the try / except outcome was

As an alternative, here is an approach that would eliminate the exception from ever occurring in the first place:

if event.propertyName  == "value":
	# Get the connection info for the given database name
	dbConnectionInfo = system.db.getConnectionInfo(event.source.parent.BDD_Statistique)

	# If the database name returns any information, get the status value from the status column, else flag the result as invalid
	dbStatus = dbConnectionInfo.getValueAt(0, 'Status') if dbConnectionInfo.rowCount else 'inValid'

	# If the database connection status is valid (not faulted) continue with the code, else abort and quietly log the problem
	if dbStatus == 'Valid':
	
		# Appel de la procédure stockée
		call = system.db.createSProcCall("Supervision_SelectCadencesInjection_100",event.source.parent.BDD_Statistique)
		# Ajout du paramètre
		#call.registerInParam('System', system.db.INTEGER, 1)
		
		# Excecution de la procédure
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.LigneDataset = result
		
		# Appel de la procédure stockée
		call = system.db.createSProcCall("Supervision_SelectTauxSaturationPlateaux_100",event.source.parent.BDD_Statistique)
		# Excecution de la procédure	  
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.SaturationDataset = result
	else:
		# Area that needs further development
		# Figure out what to do with this failure info if it occurs
		print event.source.parent.BDD_Statistique, 'Status =', dbStatus
1 Like

Hello,
I found that there is only two databases not three, so one is working and the other one is desabled on the gateway. the working one is "_Castets"

this is all the code on the timer

if event.propertyName  == "value":
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectCadencesInjection_100",event.source.parent.BDD_Statistique)
	# Ajout du paramètre
	#call.registerInParam('System', system.db.INTEGER, 1)
	
	# Excecution de la procédure
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
		event.source.parent.LigneDataset = result
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectTauxSaturationPlateaux_100",event.source.parent.BDD_Statistique)
	# Excecution de la procédure	  
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
		event.source.parent.SaturationDataset = result
	
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectTopCinqSaturation_100",event.source.parent.BDD_Statistique)
	# Excecution de la procédure	  
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
	 	event.source.parent.OperateurDataset = result
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectRebuts_100",event.source.parent.BDD_Statistique)
	# Excecution de la procédure	  
	system.db.execSProcCall(call)
	# Copie des résultats dans un dataset
	result = call.getResultSet()
	if result.rowCount > 0:
		event.source.parent.RebutDataset = result

And I wanna do one of the two following things :
First : If I can change the root container and DELETE a database connection and ADD it once it'sw working again.
2024-01-25 09_58_30-VM_ITM_CASTETS - VMware Remote Console

or the seconde thing : is to change the code and Add an if condition is it is reeading the working database like this :

if event.propertyName  == "value":
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectCadencesInjection_100",event.source.parent.BDD_Statistique)
	if event.source.parent.BDD_Statistique == "_Castets"
		# Ajout du paramètre
		#call.registerInParam('System', system.db.INTEGER, 1)
	
		# Excecution de la procédure
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.LigneDataset = result
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectTauxSaturationPlateaux_100",event.source.parent.BDD_Statistique)
	if event.source.parent.BDD_Statistique == "_Castets"
		# Excecution de la procédure	  
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.SaturationDataset = result
	
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectTopCinqSaturation_100",event.source.parent.BDD_Statistique)
	if event.source.parent.BDD_Statistique == "_Castets"
		# Excecution de la procédure	  
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
	 		event.source.parent.OperateurDataset = result
	
	# Appel de la procédure stockée
	call = system.db.createSProcCall("Supervision_SelectRebuts_100",event.source.parent.BDD_Statistique)
	if event.source.parent.BDD_Statistique == "_Castets"
		# Excecution de la procédure	  
		system.db.execSProcCall(call)
		# Copie des résultats dans un dataset
		result = call.getResultSet()
		if result.rowCount > 0:
			event.source.parent.RebutDataset = result

so here is my two questions : How can I delet the database connection STATS ?
the seconde what do you thingk about my modification of the code ? dose it seems coorect to do something like this ?
thank you

in DB Browse, is there an option to temporarily ignore a


database?