Repeating Routines based on sensor signal in ABB Rapid
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.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 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