Global variable sometimes does not update

Hello,

We’ve been had an error occur 4 or 5 times now where an installation variable does not update during between program runs.

We use a global variable called “stack_cells” that keeps track of the number of items left in a stack that the robot can pick from. Stack_cells is used to calculate how far down the TCP needs to move to pick up the next item in the stack. We want it to preserve the value between program starts and stops. Once stack_cells is empty, the operator puts more in and the robot continues running. Every time it picks a new item it decrements stack_cells.

As of the past month, something is causing stack_cells to hold its value from the previous program start. This happens maybe once a week (robot runs around 45 hours a week, and is stopped and started multiple times a week). After stopping the program stack_cells will show its value from the program start even though the offsets it calculates are correct when determining the next pick location.

When this error occurs it causes the TCP to be placed way above the stack causing a pick error, or, if the operator had put on a new stack the previous cycle, it will cause the TCP to be within the stack which causes a collision. We then have to manually edit the number of items in the stack for the program to run again.

This only happens on one of two of our machines. The machine this is happening on is Polyscope version 5.11.11, and I believe the other is 5.11.6.

This sounds like the same problem we were having a while back - installation variables wouldn’t update reliably, and we would sometimes also lose the variables display – see my previous thread:

For a while, every time the operators started the program, they had to run a script which showed them a random number, then they had to stop and re-run the program to generate a new random number. If the number changed, it was ok. If the number came back the same, they had to reboot the control.

The issue seems to be solved with 5.12- haven’t had any such issue since we updated. We have 5.13 on one system, which offers some extra features that are nice to have, also.

Edit to add -
At the time, we had 7 systems running similar applications - we saw this happen periodically on at least 4 of them. A couple were doing it quite frequently for a while.

On these “Random” things, I always go to a reace condition with tight timing.
Adding a SYNC() poly script command after setting the Var and just before testing it.

Good luck