RobotStudio event

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?

Comments

  • lemster68
    lemster68 ✭✭✭
    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 Justice
  • 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.
  • 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
  • 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
    Hi sbrown, no, I've not and I wasn't aware of these until now.

    I'll look into these Event Routines further, thanks for the tip!