Error when trying to palletize

New to UR, trying to program a repeated movement at multiple points. I set up a palletized pattern, with movements but I keep getting errors when the program loads, saying “expected type ‘int’ but found ‘pose’ ”

When I “Go to problem” it goes to an unused “Case 22”, that is just a copy, paste, of others before it for a template.

The program ran with the first 2 cases I made, but failed when I made the 3rd.

What am I missing for the pallet program, or doing wrong? Or is there a better way to do what I need?

I have seen about maybe using a “shift plane” would work also, but I’m still learning scripts and don’t quite understand those yet.

This is the pallet program

This is the unused Case it says the error is at.

This is the script for the error

“Turntable” is a feature, but it is unused for this program as far as i know

Do you define the variable “Var_1” somewhere else in the program or installation? It sounds like maybe you’ve defined it to be an integer somewhere, and are attempting to reassign it again. UR does implicit variable typing, where the first time it’s assigned, it types it as that thing. So if Var_1 was assigned as an int somewhere else, but when is tried to be use as the result of a function that produces a Pose, it will fail at runtime. This is different than strongly-typed languages that require you to first declare the TYPE of variable. Those issues would fail at compile time.

Find everywhere you use Var_1 and either delete it where it isn’t used, or else choose a different variable.

As far as i know, I didnt define “Var_1” anywhere, and theres nothing in the “Variables” tab

There’s a search bar at the top of the program you can use to verify this. Otherwise you could optionally try to create Var_1 as a Pose in the installation. Just assign it a value of p[0,0,0,0,0,0]. It looks like the error is in that “Path” node which comes from the Robotiq_Copilot CAP. Maybe you could try seeing if there’s an update to that, otherwise just remove that line from the program. You said yourself it’s an unused case statement.

I never noticed the search bar before.

I found where var_1 is defined, there is a thread at the very end, from the company who set everything up for us. I believe “Turntable” was just a plane feature, that we dont really use, so i shouldnt need this thread at all

*Edit- Was told it is to send the info back to the HMI so the screen displays current positions

Just change the variable name in that thread. I don’t know what the Robotiq node is doing, but it’s re-using Var_1 on its own for whatever reason.