Call By String ???

Hello everybody!
I have a S4C controller and because of the small amount of memory left in the system i would like to load and unload modules from a floppy disc in automatic mode. The problem is that offcourse the system dont accept that i have "procalls" to routines that is not yet loaded in the system. I want to have specific names on my routines and therefore i cant use the CallByVar instruction. Is there any way to like "call a routine by a stringarray"?
Thanks in advance!
// Lars-?ke Fredholm, Sweden
Comments
-
Hi
Here is a way to call a routine by a string.%"Palle"+NumToStr(nCurrentPalle,0)%;
If nCurrentPalle is for example 5 the routine
Palle5 will be called.Per Svensson
Company Specialist
ABB Automation Technology Products0 -
Thanks for the reply Per!
Here is how i solved the problem.
MODULE LARSA
! nArtikel f?r olika v?rden beroende p? val i en meny
PERS num nArtikel_1:=2;
! stMod inneh?ller namnen p? mina moduler p? disketten
CONST string stMod{2}:=["RF.MOD","RF_Z.MOD"];! stProc inneh?ller namnen p? rutinerna som finns i modulen jag just laddat
CONST string stProc_1{2}:=["RamfKpl_1","RamfKplZ_1"];PROC main()
! Laddar vald modul fr?n diskett
Load flp1File:=stMod{nArtikel_1};
! K?r vald rutin
%stProc_1{nArtikel_1}%;
ENDPROC
ENDMODULE0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 339 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings