I’m having issues with this popup displaying on every client, not just the desired client.
So here is what I have.
My client event tag change script looks at the Sequence tag value and runs the following script
tagVal = system.tag.read('Valiant Midcon/Sequence/Start_SEQ').value
if tagVal in [15, 70, 80]:
log = system.util.getLogger("StartupConfirmationPU-DisplayScript")
clientIP = system.tag.read("[System]Client/Network/IPAddress").value
clientHost = system.tag.read("[System]Client/Network/Hostname").value
log.info("Startup Confirmation Popup Script running on " + clientHost + "/" + clientIP)
print "Startup Competlete Confirm PU, Client " + clientHost + "/" + clientIP
project.navigation.showStartUpConfirmPU(clientIP, clientHost, tagVal)
If the value of the tag is one of the step values that need confirmation, parameters are gathered and the showStartupConfirmPU project script is called.
That script contains the following.
def showStartUpConfirmPU(clientIP, clientHost, tagVal):
log = system.util.getLogger("showStartUpConfirmPU")
log.info("Client - IP: " + clientIP + ", Host Name: " + clientHost + ", Step: " + str(tagVal))
print "Client - IP: " + clientIP + ", Host Name: " + clientHost + ", Step: " + str(tagVal)
if clientIP == "192.168.10.10" and clientHost == "PumpBench":
if tagVal == 70:
log.info("Startup Seq Step: " + str(tagVal) + " - Clean Pump")
window = system.nav.openWindow('Popups/Startup Step Complete Confirmation', {'stepNum' : 70, 'stepDesc' : 'Clean Pump', 'confirmTagPath' : 'HMI_Prompt_Pump_Used_Clean'})
system.nav.centerWindow(window)
elif tagVal == 80:
log.info("Startup Seq Step: " + str(tagVal) + " - Air Purge")
window = system.nav.openWindow('Popups/Startup Step Complete Confirmation', {'stepNum' : 80, 'stepDesc' : 'Air Purge', 'confirmTagPath' : 'HMI_Prompt_Air_Purge_Complete'})
system.nav.centerWindow(window)
elif tagVal == 15:
log.info("Startup Seq Step: " + str(tagVal) + " - Choke Pot Check")
window = system.nav.openWindow('Popups/Startup Step Complete Confirmation', {'stepNum' : 15, 'stepDesc' : 'Choke Pot Check', 'confirmTagPath' : HMI_Choke_Pot_Check'})
system.nav.centerWindow(window)
The clientIP address and the clientHost values are those for the desired client.
Unfortunately this popup displays on my client and by IP address and Host Name are no where near the values in the if statement. Here is the value of my Host IP and Name from my client diagnostic viewer: "showStartUpConfirmPU - Client - IP: 10.212.134.200, Host Name: D1MEM-AM1, Step: 15
"
I originally had this all in the client event tag change script, but after rereading Phil’s comments I split it out to use the project script. I didn’t think it would make a difference, but chose to try it anyway. In the end it still acts the same as it did when it was all contained in the client event tag change script.
Anyone have any ideas as to why this is misbehaving?
Thanks!