Strange behaviour of program


A little backstory first for better understanding:
I have been building a program for UR10e for finishing application with URSim, and i built succesfully working program base using Switch-case function with plenty of variables. We have many different models of workpieces that needs finishing, and i wanted to incorporate all of them in one program. Main program handles the locations and subprogram handles the finishing, so it is user friendly to not so experienced end-user.

There is 4 big pieces, and then 12 smaller pieces and the program is designed to use one model finishing program at a time, currently the program is made just for one model and rest to be added later.

The problem:
I went to the robot and modified the code little more and added some stuff into it, it worked very fine until i saved it (and i think it gave some error there, but i skipped it too fast to read what it said). And after that it suddenly just stopped working. Doesn’t give any error messages or anything, there is plenty of variable assignments in the BeforeStart section and few of them are operator applied. It lets me apply the assignments but then just stops and doesn’t go to into Switch-Case at all. Original base program still works just fine, but the program modified in Teach Pendant does not.

And i have tried to run the code in URSim too, but it behaves exactly the same. Have also tried to compare the scripts between the original base program and the modified one, but there is lot’s of differences to the base and atleast i can’t catch the fault there.

Monihionta1.urp (2.8 KB)
Monihionta1.script (18.2 KB)

Monihionta2.urp (8.8 KB)
Monihionta2.script (25.0 KB)

Monihionta1 is the base, and 2 is the modified code

Hionta.urp (3.7 KB)

Hionta is the subprogram for the finishing.

Thanks already

You should upload the Installation file, as well. You have your inputs and installation variables set there. :slight_smile:

“Program Loops Forever” is disabled in your program. This means it will only run through the main program once and not be able to switch cases, if it is not done in the BeforeStart. :slight_smile:
This could be your issue.

EDIT: “Program Loops Forever” is enabled in the first version of your program. So I’m confident this is your issue.


Oh! It definitely works now! I had a feeling that it must not be nothing huge, but just couldn’t catch it.

I must have accidentally disabled that. Thanks thousand times!!

And yeah i would have uploaded the installation, but the forum denied that!