First cycle only in continuous cycle running
I'm looking to achieve a way to have instructions execute only on first cycle, things like moving to a first start position, having operators input some data, etc.
These things only need to happen at the beginning so don't want them happening every cycle.
Currently, I have a counter for parts_processed and using IF statements to check if parts_processed=0 but I'm sure there's a better way to do this?
These things only need to happen at the beginning so don't want them happening every cycle.
Currently, I have a counter for parts_processed and using IF statements to check if parts_processed=0 but I'm sure there's a better way to do this?
Tagged:
0
Comments
-
Put what you want to do only on first cycle at the top of the main, followed by WHILE TRUE DO loop which contains all the things that you want to repeat. This will be an infinite loop where the Main will not end and repeat those things at the top of main.Lee Justice0
-
Thanks Lemster,
That's kinda what I've done anyway using IF statements instead and checking number of parts produced (operator inputs how many parts are on the pallet) I just thought there would be something specifically built into the programming structure for the initial cycle.0 -
Have you thought about using Event Routines? It looks like the "Start" event only fires the first time you press start after moving the program pointer to Main. This could be a good place to attach a routine that executes once per cycle0
-
sbrown1 said:Have you thought about using Event Routines? It looks like the "Start" event only fires the first time you press start after moving the program pointer to Main. This could be a good place to attach a routine that executes once per cycle
I'll look into these Event Routines further, thanks for the tip!0
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