Prior to RW5.09 I was able to create ? VARIABLE Robtarget in the User Module and by doing so, it was impossible to ModPos this robtarget in the program. Back then you could ModPos ? Pers or a Const but not a Var.
The reason I am doing this is because I create my HOME Robtarget in the User module so every new program already has access to this predefine Home Robtarget. BUT, prior to 5.09 no one was able to ModPos the Robtarget in the program but now they can. And when they do so it changes the User Module.
It is not important as to why it changed but does anyone has a trick to be able to have a Robtarget that is not ModPosable? I do not want my students playing with that HOME Robtarget, I want it Read Only.
What I know so is it no difference in RW 5.09 and 5.10 when it comes to ModPos a VAR robtarget. I tested both in RW 5.09 and 5.10, and it was possible to ModPos a VAR robtarget. But maybe you can do something like this to go around the problem:
MODULE Module1
CONST robtarget pHome:=…; !pHome can be declared in a “VIEWONLY” module
I have tried too with RW5.09 and it was like 5.10. I assume it must have been prior to 5.09, probablly 5.08.
What you suggest would work but my student would have to add those lines you made when they start a new program.
I want the Robtarget Home to be avalaible in their new programs without any inputs from them.
Module Moddule 1
Proc Main()
MoveJ Home, V500, Z10, Tool0; !Home in declared in User module.
ENDPROC
EndModule
But unfortunatly, they can MODPOS home and change the user module and that, I don’t want.
But you mentionned something I didn’t know. How do you make a Read Only Module? I’ve been playing with the teach trying to find an option that make a Module Read only but I didn’t find anything.