Portable subroutine for FES exchange

Does anyone work with FES fingers? How do you deal with switching back and forth between fingers?

We often switch back and forth multiple times per run. I’m trying to write a portable subroutine for fingers, allowing me to switch to the desired fingers regardless of what fingers are currently mounted.

I’m unable to export screenshots, but the logic is:

If [MountedFESfinger() = "Eccentric"]
	Drop fingers["Back to position", "FES Eccentric Nest[001]"]
Get Fingers["Centric[001]"]

This seems to run ok in isolation, but ContextCheck runs into issues in more complex scripts where we switch back and forth between fingers multiple times. It seems like ContextCheck calculates all if statements throughout the script based on the initial state of MountedFESfinger() rather than recognizing that this value will change each time we pick up new fingers. The error I encounter is: “the selected FES gripper differs from the mounted one”

Let me know if you have any ideas!

Are you writing one subroutine for all scenarios?

Also in my experience, my preference is to hard code the positions for returning things when I can. I’ve experienced confusion from FC from time to time when you select “Back to Position”.

I was planning on writing one subroutine for each type of finger.

What problems have you seen with “Back to Position”? That’s what I usually use because FC sometimes forgets the source location between runs for “Back to Source”

Do you reuse sites or do you have a docking station for every finger type?

I had this issue with the MCA head adapters. I had to change some scripts to explicitly tell it to drop at the EVA or COMBO site because otherwise it was producing context check errors. My guess is that when the MCA doesn’t know what’s mounted, it freaks out because it technically doesn’t know what’s a “back to position” for an unknown item. It’s also not gonna physically know what’s mounted until after it’s initialized but sometimes those context check errors prevent the system from initializing through methods. Anyway I would try to explicitly tell it which site to drop fingers at instead of back to position, see if that helps.

Also truthfully with complex scripts, I often find that I’m writing code also to work around context check errors. Nothing wrong with the code… but something is breaking somewhere in the way that FC is interpreting or compiling the methods.

That makes sense! That’s a great idea to just have a script to drop it off and allow it to initialize. Thanks for the help!

I agree, context check is definitely a double-edged sword