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.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings