Hide Certain Routines From List on IRC5

  • I have a module that contains routine procedures used for simple movements to/from a position. The job I am working on has several stations and I would like to know how to prevent these "teach mode only" procedures from appearing in the list when PP to Routine is pressed. Basically, I only want to be able to get to these procedures by calling my main "rTeach()" procedure and selecting the specific teach routine I want.


    I've tried removing and re-adding the LOCAL directive to the procedure definitions but I don't think I fully understand what this does. The RAPID Overview document says having the LOCAL directive classifies the procedure's scope as only within the module, which I think is what I want because I don't want the data in this module to be seen by my main programs. However even with the procedures declared as local I can still jump straight to them with PP to Routine.

    Edited once, last by gmumaugh ().

  • AD
  • You would not be able to hide the routines separately but you will be able to late bind them and load/unload when required.


    Have a look at the following code.


    When procedure rTeach is executed, it will request input of which routine to execute next. In basic only rTeach will be shown and rRoutine will only be active if it have been loaded already and not unloaded.

  • Lemster68 - He specifically wants to remove the routines from the available list when PPtoRoutine but when I try to add a parameter to the Routines, the Routines is still available in PPtoRoutine list but they will not do anything cause the parameter have not been set yet. This is why I have suggested the Load/Unload function because it removes the Routines completely and they are not available at all unless his rTeach Procedure has been executed.


    Have I missed something that the Routines is still showing in my testing procedures?

  • If you add a parameter to the routine declaration then they will not appear in the PPtoRoutine list. Then you would have to put the proccall in your rTeach routine with the correct parameter.

    This makes perfect sense, jumping straight to a routine with PP to Routine wouldn't provide the necessary arguments. Thanks!


    JMF - I like your suggestion as well because I don't have much experience with loading/unloading modules or binding. I'm always eager to see new examples of how to use them so I can understand better.

  • Ok then, let's try another. Did you know this one? | makes the argument exclusive. For example,


    Code
    PROC one(\num nON | num nOFF)
    ENDPROC

    I have never tried this way before but it seems to be something that I can use. :/


    It just shows that the overall usages of Rapid capabilities is almost never ending.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now