Multiple uiTimer.schedule running in background

The tool bar in polyscope:
image

When moving program nodes of a URCap I notice that all that is happening in java is it only calls:

openView()

Shouldn’t closeView() be called right before this?

Because there starts to be a glitch once you use a uiTimer.schedule in your openView() and a uiTimer.cancel() in your closeView() to repeat a update call in a program node. However, when you use the shift up and down from the tool bar it never closes one of the uiTimer and there tends to be multiple schedule updates running at once.

A good example is the mydaemonswing, which uses this, and when shifting the node up/down the preview text begins to cycle between different texts if another program node is open.

image

Is there a work around for this?

1 Like

Also, another question:

In the mydaemonswing or any daemon running URCap. These looping uiTimer are just used for checking if the daemon is still running, correct? I know in the mydaemonswing they also set a label in the ProgramView and that is what makes it noticeable of the glitch, but that can always be done without a constant loop.

If I do it this way, I can make it so that there are no glitches on the GUI side. However, in the background on the robot, there will be a bunch of uiTimer schedule loops (depending on how many times they shift up/down). And I am pretty sure that is not a good thing for the robot, because the only way to stop those loops (that the user will never notice If i do this way) is to turn off the robot.

Whooops, I may have solved it.

I was running sdk/1.4.4 + URsim/5.1.2 and I guess that version does not call on closeView() during moves up/down from toolbar

I just downloaded sdk 1.7.0 (latest) and ran it on the URsim 5.4, and it seems to be working fine.

(We also have a UR10e running version 5.1.2 , exactly how can I update the software to 5.4? Also, If I update it will it mess up previous URCap that were made in older versions?)

Thanks again

1 Like

Glad to hear you solved your problem. If you want to update your UR, you can download the update files here. Just remember that when updating your robot to go up in MINOR versions, i.e. go from 5.1.x to 5.2.x and NOT from 5.1.x to 5.3.x. If any URCaps don’t work following the updates, then I would check with the suppliers of them to see if there is an updated version.

2 Likes

Hey @sam.verity-hilton,

I am still a bit paranoid about updating. Just by reading on how to update, it seems like even certain programs/installations currently saved in the robot may also change a bit with certain functionalities working differently.

Also, I made a URCap in version SDK 1.4.4 and Software 5.1.2. That’s why I asked about older URCaps ran in newer version , so I do not have any newer versions of my URCap(So I assume if it does end up failing, I will need to update my URCap).

When updating am I able to just do:

5.3.0 → 5.4.2 (Skipping 5.3.1 and 5.4.0)

Or do I need to do it like so:

5.3.0 → 5.3.1 → 5.4.0 → 5.4.2

I believe you will be fine going from 5…3.0 to 5.4.0, skipping 5.3.1. I believe you only need to include the really minor versions if downgrading software versions.
With regards to URCap changes since then, the only change as far as I’m aware since then is that you can no longer make any changes to either the program tree or the DataModel in either isDefined() or getTitle() as of SDK 1.6/Polyscope 5.3. Other than that your URCap should be safe. test it to be sure, but since its your URCap at least if there are any fixes that need implementing, you can fix them yourself.
If your’re worried about loosing data, than I would suggest taking a backup of any important files.

What do you mean by “You cant make changes to either program tree or DataModel”?

Apologies, I forgot the second half of that sentance, I’ve changed it now. You can no longer make those changes from within either the isDefined() or ther getTitle() methods of a URCaps contribution node, as doing so will throw an error.

@sam.verity-hilton
Ahh, I see.

I assume the SDK and PolyScope versions need to match?
So,
SDK 1.6 - Polyscope 5.3
SDK 1.5 - PolyScope 5.2

So if somewhere were to compile a .urcap file on a ursim using mvn install -P ursim with SDK 1.6 and downloaded that .urcap file onto a robot with version PolysSope 5.1. Then there would most likely be some sort of error/crash.

URCaps are forward compatible, but not backward compatible, i.e. I could run a URCap compiled in SDK 1.5 on polyscope 5.4, but I couldn’t run a URCap compiled by SDK 1.7 in polyscope 5.2.

1 Like

Alright.

Thanks a bunch!

1 Like

Hello nguyena.
When updating the software on the robot, we do recommend to update to the major releases and to do it in a sequential order.
So from 5.2.x > 5.3.y > 5.4.z. It is important to power on the robot after every update. So installing 5.3.1 > finished installing > the robot restarted > power on the robot (initialize the robot) > power of the robot > install 5.4.0… :slight_smile:

1 Like