Put actual routine name in a variable
Hi ! I want to have the actual routine name in a string variable. Does it is possible, if yes how ?
Thanks
Thanks
0
Comments
-
What do you need the actual routine name for? Is it for some sort of logging purposes?0
-
If the purpose is to call a routine by a string here is an exampleMODULE module1VAR string routine:="Hello";PROC main()CallByVar routine,1;CallByVar routine,2;ENDPROCPROC Hello1()TPWrite "Hello 1";ENDPROCPROC Hello2()TPWrite "Hello 2";ENDPROCENDMODULEPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
I was for logging. I wanted an universal routine for dataloging. I did'nt find how to retreive the actual routine name but I used a Pers variable with my routine name for the CallByVar and I call a Datalog routine with the same variable as a parameter. It work well except if i manually launch a routine, in need to pass by the main routine to be sure that the call is do.
Thanks
0 -
Call by variable with a string looks like: %Hello1%; You might be able to concatenate that: %Hello% + NumtoStr(1,0);Lee Justice0
-
This might be more correct for the second option: %Hello + NumToStr(1,0)%;Lee Justice0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 300 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 828 RAPID Programming
- 12 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings