struggling with loop

when the start button is pushed my cilinder goes out and arduino1 sends a signal to arduino 2 (SIGUIT) and then arduino 2 does it's thing(works correctly) and gives a signal back (SIGIN) and then i can press start again to restart everything. i want to make this complete cycle(the 2 loops) 5 times and then be able to hit start again.

int LEDGR = 3;
int LEDRED = 4;
int CIL1 = 5;
int CIL2 = 6;
int START = 7;
int STOP = 8;
int SIGUIT = 9;
int SIGIN = 10;
int i;

void setup()
{
pinMode(CIL1, OUTPUT);
pinMode(CIL2, OUTPUT);
pinMode(START, INPUT);
pinMode(STOP, INPUT);
pinMode(LEDGR, OUTPUT);
pinMode(LEDRED, OUTPUT);
pinMode(SIGUIT, OUTPUT);
pinMode(SIGIN, INPUT);

}
void loop()
{

if (digitalRead(START) == HIGH)

{
delay(500);
digitalWrite(LEDGR, HIGH);
delay (500);
digitalWrite(CIL1, HIGH);
delay (2000);
digitalWrite(SIGUIT, HIGH);
delay (2000);
digitalWrite(CIL1, LOW);
}

if (digitalRead(SIGIN) == HIGH)
{
digitalWrite(SIGUIT, LOW);
delay (1000);
digitalWrite(CIL2, HIGH);
delay (2000);
digitalWrite(CIL2, LOW);
digitalWrite(LEDGR, LOW);

}
}

You could just copy-paste the sequence of delays 4 more times or you could learn a bit more about state machines and do it properly.

http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html

Please use the code button </> when posting code so it looks like this

int LEDGR = 3;
int LEDRED = 4;
int CIL1 = 5;
int CIL2 = 6;
int START = 7;
int STOP = 8;
int SIGUIT = 9;
int SIGIN = 10;
int i;


void setup()
{
  pinMode(CIL1, OUTPUT);
  pinMode(CIL2, OUTPUT);
  pinMode(START, INPUT);
  pinMode(STOP, INPUT);
  pinMode(LEDGR, OUTPUT);
  pinMode(LEDRED, OUTPUT);
  pinMode(SIGUIT, OUTPUT);
  pinMode(SIGIN, INPUT);
}


void loop()
{

  if (digitalRead(START) == HIGH)

  {
    delay(500);
    digitalWrite(LEDGR, HIGH);
    delay (500);
    digitalWrite(CIL1, HIGH);
    delay (2000);
    digitalWrite(SIGUIT, HIGH);
    delay (2000);
    digitalWrite(CIL1, LOW);
  }

  if (digitalRead(SIGIN) == HIGH)
  {
    digitalWrite(SIGUIT, LOW);
    delay (1000);
    digitalWrite(CIL2, HIGH);
    delay (2000);
    digitalWrite(CIL2, LOW);
    digitalWrite(LEDGR, LOW);

  }
}

...R

sten2:
i want to make this complete cycle(the 2 loops) 5 times and then be able to hit start again.

Either you need to provide more details or you need to think more carefully about automatic sequence.

If you don't press the start button to make it start, what will cause it to start for the 2nd to 5th times?

For example should it start immediately after it finishes? If so you need a variable to keep track of which part of the sequence it is in, and another variable to count the repeats.

A system with a variable to keep track of the sequence is referred to as a State Machine - which might provide some useful reading.

...R