Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

Routine in anouther module

Hi, 

I have a slight problem.

I have a robot program with my code (call it code.prg) and anouther module with some patterns (call it pattern.mod)

And i want from my code.prg call a pattern i my pattern.mod.

 

anyone plz help  me! 

 

Comments

  • the routine pattern.mod is it already loaded ?
    if not  we do it like this:

     

    %"pattern"%

     

    it procalls a routine what is not yet loaded at the begining from the programm so you don't get an error saying that the routine is not there.

    some where in the programm you load your pattern.mod and than you can procall you routine in your mod file

     

    proc main()

      programm_1;

      Load "/hd0a/ROBOTPROGRAM/pattern.mod";

      %"pattern1"%;
      %"pattern2"%;
      %"pattern3"%;
      %"pattern4"%;

    endproc
     

    to unload your pattern.mod simply use unload instead of load

    you can load more than 1 mod file at the same time or just when you need another one load the one you need at the moment.

     

    see if it works  Tongue
    pibi2010-02-24 09:06:02