Repeating Routines based on sensor signal in ABB Rapid
Options
Neuling
✭
Hello everyone, I hope you can help me with a problem.
I have around 150 routines in a module that I want to execute in a specific order. Whenever a variable changes due to a sensor signal, I want the currently executing routine to repeat after completion. The routine should keep repeating until the sensor signal changes again.
Since I'm completely new to ABB Rapid, I don't know how to achieve this. Is it possible, for example, to use a for loop for routine calls, call the routine once, and then use a while loop to check the sensor signal? Is something like that possible?
PROC main()
CONST ?routines? RoutineList:=[...];
FOR i FROM 1 TO RoutineList DO
CallRoutine RoutineList[i];
WHILE SensorSignal DO
CallRoutine RoutineList[i];
ENDWHILE
ENDFOR
ENDPROC
I know that this Code won't work. I just want to give you an example of what i meant.
What would be the best way to do something like that?
0
Answers
-
What type of signal does this sensor give you? Just simple on or off or does it give a value of some sort?Lee Justice0
-
It's just a simple on/off signal.0
-
I think that your pseudo code will work. Just a couple things:
CONST string RoutineList ["routine1", "routine2", etc.,]:
You might need to have another variable to assign the name from the list array.
stRunJob:= RoutineList[i];
Then call by string variable looks like this:
%stRunJob%;Lee Justice0
Categories
- All Categories
- 5.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 406 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
- 736 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings