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
  • graemepaulin
    Options
    When you say configured it as automatic loading, you have added the module to the controller config file under the Automatic loading of Modules type?
    Do you get any errors in the error log after the restart regarding the module?
  • mrva
    mrva
    Options
    Yes, I've added the module to the controller config file under the Automatic loading of Modules type.

    I've no errors upon restart.

    Maybe it works well and only the help is confusing. I just want to know, if I can use it for distributing changes in some module by sending the file to Home directory and wait for a warm restart to apply changes (basically the same way as you can change any other configuration).
  • graemepaulin
    Options
    Yes at the next warm start the revised module will be loaded overwriting the previous version.
  • mrva
    mrva
    Options
    Hmm, but not in my case. It is loaded only after Reset RAPID or restore backup, which I don't want to do. Warm restart is not enough and the module is not loaded from HOME.

    So, if it is supposed to work this way (but obviously doesn't work for me), what's wrong?