# Call module routines regardless of loaded program file (.PRG)

**URL:** <https://tech-community.robotics.abb.com/t/call-module-routines-regardless-of-loaded-program-file-prg/6434>\
**Category:** Robot Controller\
**Created:** [December 18, 2014, 9:32pm UTC](https://tech-community.robotics.abb.com/t/call-module-routines-regardless-of-loaded-program-file-prg/6434 "2014-12-18T21:32:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TylerRobertson](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@TylerRobertson](https://tech-community.robotics.abb.com/u/TylerRobertson)\
**Post date:** [December 18, 2014, 9:32pm UTC](https://tech-community.robotics.abb.com/t/call-module-routines-regardless-of-loaded-program-file-prg/6434/1 "2014-12-18T21:32:35Z")

</div>

Hello,

I have 50+ .PRG files which are loaded and run for different part configurations. I wanted to add a common program call to a separate module, lets call it “NewModule” - is there a way to load a module into memory without having it reside in the PRG file? So that if I load a different PRG it can call routines from NewModule without needing to load it into that PRG? This would save me from making large edits to all PRG files - thanks!

---

<div class="post-metadata">

**Author:** ![sedahal1](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/sedahal1/32/1311_2.png) [@sedahal1](https://tech-community.robotics.abb.com/u/sedahal1)\
**Post date:** [December 22, 2014, 7:51am UTC](https://tech-community.robotics.abb.com/t/call-module-routines-regardless-of-loaded-program-file-prg/6434/2 "2014-12-22T07:51:14Z")

</div>

System modules are used to (pre)define system specific data objects (tools, weld data, move data ..), interfaces (printer, logfile ..) etc.  
Normally, system modules are automatically loaded to the task buffer during system start.

System modules are not affected when loading/deleting programs.

Example:

NewModule.sys

MODULE NewModule(SYSMODULE)  
PROC NewProc()

ENDPROC  
ENDMODULE

---

<div class="post-metadata">

**Author:** ![TylerRobertson](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@TylerRobertson](https://tech-community.robotics.abb.com/u/TylerRobertson)\
**Post date:** [January 6, 2015, 4:29pm UTC](https://tech-community.robotics.abb.com/t/call-module-routines-regardless-of-loaded-program-file-prg/6434/3 "2015-01-06T16:29:07Z")

</div>

ah! Wonderful, I am looking to make a logfile thank you  
I did not know about the loading - we have some sys modules here that contain reduntant / duplicate tool information etc. but they didn’t seem to be loaded because when I do load them I get tooldata errors because of multiple tool0 etc. unless they’re loaded into the task buffer and if you try to load them manually you get duplicates… hrm, I’ll have to check that out

in any case, thanks!
