Button sometimes doesn´t work

Hi, i’m having a problem with a button. Occasionally in some client the button doesn´t do anything when it is pressed while all others components of the window does work. If I open another client with the same window the button works.
The button is used to go from one step to another in the process so it is going from visible to not visible and viceversa all the time, but it is always enabled.

I’m using Ignition v7.5.4, and Java 6.

Are you using the actionPerformed event on the button or something else like the mouseClicked event?

I’m using actionPerformed event.

The actionPerformed event should always work (there is a case when mouseClicked wouldn’t), what makes you think that it isn’t working? Is there an error when you press it? In the client, you can see errors by going to the menu bar -> help -> console.

Thanks for your answer Robert.

Unfortunately, this problem is very occasional and had been reported from plant operators, so I didn’t have the chance to check if there are errors in the console. They go throught this situacion by opening a new client and pressing the button from there. I’m tring to get more information about the problem, like if the button looks like pressed when it is pressed or if the problem persist after some time.

I’ will let you know if i get more information.

Sounds good.

I have experienced the very same problem. I have a button locked up and with a seperate client on the same computer it works. i don’t see anything in the console with the current time. When the button does lock up it does not work until a different screen is called up then previous screen is re entered.
I am using 7.6.3 and Java 7

Thanks

It would be nice to have a print statement on the first line. How about creating a memory tag and just writing the current time to it on the first line of the script, just so we have a simple test to see if any of the script is executing.

I experienced a similar problem once in Designer but I was unable to track down the root cause. I haven’t seen it since, I wonder if this is related. In my case all events stopped firing. Restarting the Designer ‘fixed’ it.

Is it just one button? Do other events seem to be firing off like normal? Is it always the same button?

I haven’t noticed it to be any one button in particular. The buttons will work fine most of the time, but occasionally not.

I just found an instance of this and quickly went to the console and found this. Not sure what it means if anything.

Thanks

That error is unrelated. It’s reporting that one of your modbus devices closed/reset the TCP connection between Ignition’s driver and itself. I’m guessing that device is probably powered off or otherwise unavailable.

If you still have the client open (in the “broken” state), navigate to it’s output console by going to Help > Diagnostics > Console. The project needs to have the “Hide Menu Bar” option turned off in order to access the console in runtime. We might get lucky and have some informative messages there.

We resolved the issue over a support call. For posterity’s sake - the button’s script was actually running but it was calling system.nav.swapTo() on a window that was improperly left open/maximized. When swapping windows, there must be exactly one maximized window open at a time. If you have multiple maximized windows opened then system.nav.swapTo() won’t work properly.

1 Like