RobotStudio event

Use of wildcards

I'm new to logic programming of all types. I am adopting a developed system. I am working with a system mod that calls the correct part mod using the "load \dynamic" instruction. I would like to be able to call a mod with a revision string at the end of the file name, which would be changing over time. Are wildcards (*,?) allowed in rapid programming?

Comments

  • Hi,

    As far as wildcards.. not that I know of.. But, if you want to call a routine on-the-run you can do it with this syntax: %<name of routine>%

    The name of the routine should be a variable of data type string.

    Sample:

    ...
    PROC executeRoutine(string routineName)
        %routineName%;
    ENDPROC
  • You could read through the directory, use the character/string functions to match the main part of the file name, then load the highest revision (presumably being a number).

    See ReadDir function in the RAPID instructions, Functions, and Data Types manual.

    Also RAPID overview manual -> String Functions.