12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LoadRobotWare-OSFilePathData type: stringInstructionThe file path and the file name to the file that will be loaded into the programmemory. The file name shall be excluded when the argument \File is used.[\File]Data type: stringWhen the file name is excluded in the argument FilePath then it must be definedwith this argument.Program executionProgram execution waits for the program module to finish loading before proceedingwith the next instruction.To obtain a good program structure, that is easy to understand and maintain, all loadingand unloading of program modules should be done from the main module which isalways present in the program memory during execution.After the program module is loaded it will be linked and initialised. The initialisationof the loaded module sets all variables at module level to their init values. Unresolved<strong>reference</strong>s will be accepted if the system parameter for Tasks is set (BindRef = NO).However, when the program is started or the FlexPendant function Program/File/Checkis used, no check for unresolved <strong>reference</strong>s will be done if the parameter BindRef =NO. There will be a run time error on execution of an unresolved <strong>reference</strong>.Another way to use <strong>reference</strong>s to procedures that are not in the task from the beginning,is to use Late Binding. This makes it possible to specify the procedure to call with astring expression, quoted between two % (se example). In this case the BindRef parametercould be set to YES (default behaviour). The Late Binding way is preferable.For loading of program that contains a main procedure to a main program (with anothermain procedure), see example below.ExamplesMore general examplesLoad \Dynamic, "HOME:/DOORDIR/DOOR1.MOD";Loads the program module DOOR1.MOD from HOME: at the directoryDOORDIR into the program memory. The program module is loaded in thedynamic mode.Load "HOME:" \File:="DOORDIR/DOOR1.MOD";Same as above but another syntax, and the module is loaded in the static mode.Load\Dynamic, "HOME:/DOORDIR/DOOR1.MOD";226 <strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!