Counting Procedure
in RobotStudio
Hi Everyone,
I'm new to RAPID programming and in need of some advice which i hope you would be able to help.
I have a sensor which counts a number of box by incrementing a variable when the input is triggered, and when a certain count is reached, an output would stop the conveyor and send a signal to the robot to pickup the case. (And how do I count input triggers, interrupt?)
Is there any way to perform the counting while the TCP is moving, like running the count in the background?
I've read about multitasking option but is there any other way?
Any help on this would be highly appreciated.
Jayson
Manila
I'm new to RAPID programming and in need of some advice which i hope you would be able to help.
I have a sensor which counts a number of box by incrementing a variable when the input is triggered, and when a certain count is reached, an output would stop the conveyor and send a signal to the robot to pickup the case. (And how do I count input triggers, interrupt?)
Is there any way to perform the counting while the TCP is moving, like running the count in the background?
I've read about multitasking option but is there any other way?
Any help on this would be highly appreciated.
Jayson
Manila
0
Comments
-
Hello jayson,
it should work to do it as such:MODULE Module1PERS num CountSignals;VAR intnum sig1int;PROC main()IDelete sig1int;CONNECT sig1int WITH iroutine1;ISignalDI diInput,1,sig1int;WHILE TRUE DOENDWHILEENDPROCTRAP iroutine1CountSignals:=CountSignals+1;IF CountSignals=10 THEN!stop conveyor!pickCountSignals:=0;ENDIFreset diInput;ENDTRAPENDMODULE0 -
Thank you so much Pavel!
Such a great help. Cheers man!
0 -
Unless I'm reading it wrong, the above counter would need to stop when the robot is in motion doing the pick and the place. Only after the place could the conveyor turn back on and start counting again. Probably not a big deal with low speed pick and place. Higher speed pick and place, when you want the cases to come in as soon as the infeed is clear, a separate task for counting would probably work better.
0
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