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.4K RobotStudio
- 383 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 734 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings