RobotStudio event

Automatic loaded modules - behavior after restart

Options
Hello, I'm wondering how the Automatic loading of modules is supposed to work.

I have a semistatic task and a program module in a Home directory. I configured it as automatic loaded.

Based on information from Help, the loaded version of the module in a task should be in this case updated with the file from Home directory upon a standard warm restart. But the only way (beside manual loading) to update the file is to use Reset RAPID.

Am I missing something? I just want to update the file in Home, and apply new changes upon restart. Now I need to stop the task manually and load modules manually.

Thanks
Jakub

Answers

  • DenisFR
    DenisFR ✭✭✭
    edited April 9
    Options
    Hello,
    You can have a standard module (unchanged), which load your modified module located in Home.
    PERS bool bReqNewModLoad;
    CONST string sFolderPath:="HOME:/T_PLC/";
    ...
      IF bReqNewModLoad THEN
        !IDelete Trap initialized in DynamicLoad.mod
        !This proc must exists in DynamicLoad.mod
        %"DynResetTrap"%;
        UnLoad sFolderPath+"DynamicLoad.mod";
        StartLoad\Dynamic,sFolderPath+"DynamicLoad.mod",lsDynLoad;
        WaitLoad lsDynLoad;
        ErrWrite\I,"Dynamic Loading OK","DynamicLoad.mod was loaded successfully.";
        bReqNewModLoad:=FALSE;
      ENDIF
    ...
    ERROR
      IF (ERRNO=ERR_UNKINO) OR (ERRNO=ERR_UNLOAD) THEN
        SkipWarn;
        TRYNEXT;
      ENDIF
    ...
    
  • mrva
    mrva
    edited April 10
    Options
    Thanks for your answer, though it doesn't answer my question (how the automatic loading modules is supposed to work).

    I use the Load Unload instructions for loading modules when production changes, but I was looking for kind of batch-update mechanism for distributing changes in other modules to several robots.

    Jakub