New program for a foil packing machine

Dear programmers ,

I wont to use an arduino uno to program a foil packing machine.
This machine has the follow actuators and sensors :
1-One digital photo sensor to detect the level of the material at the hopper .
2-One electrical motor to drive the belt witch feeds the hopper.
They have to work in manual mode and automatic mode witch is selected using two NO switches.
3-NO switch(Manual mode )
4-NO switch(Automatic mode)
5-NO switch (Start conveyor motor)
When the automatic switch is activated ==HIGH , when the photo sensor is not activated , turn the conveyor motor ON and keep it on 20 seconds after the photo sensor is turned ON .
When the switch Manual mode is activated the conveyor motor has to turn ON only when the Start conveyor Switch is turned ON
This program that i have described above has to work in an independent way from the other part of the program .

The second part of the machine and the most important is described below :
6-NO switch (automatic mode)
7-NO switch (manual mode)
8-Digital Photo sensor to detect the distance of the foil bags .
9-NO switch(Start packer)
10-NO switch (Stop packer)
11-Electric motor to move the foil
12-Solonoid Air valve to feed the bags
13-Solonoid Air valve to close and cut the bags
14-NO switch to activate the electric motor witch move the foil
15-NO switch to activate the aolonoid Air valve to close the and cut the bags
When the automatic mode Switch is turned ON == HIGH and when the start Switch is turned ON , the electric motor witch moves the foil should be turned ON and when the photo Sensor is turned ON , the electric motor witch move the foil should turn OFF and the solonoid Air Valve who feeds the bags should turned ON for 8 Sec and the solonoid Air valve who closes and cuts the bags should turned ON for 4 seconds and this program can be execute until the stop switch is turned ON.
When the manual switch is turned ON and when the NO switch is turned ON witch activates the electric motor it should stey ON until the STOP switch is activated , the same for the NO switch of the selenoid valve .

Please feel free to go ahead, or was there a question ?

My problem is that the code that i have uploaded to arduino , when executes delays is not getting information from the sensors .
So i decide to ask for help for an idea how to create a code for this case .

My problem is that the code that i have uploaded to arduino

...which I couldn't be bothered to post here.

when executes delays is not getting information from the sensors

So, don't use delays.

#include <DelayRun.h>
#include<softtimer.h>
// Final solution code
// don’t use on FioV3 when battery connected
// Pin 13 has an LED connected on most Arduino boards.
// if using Arduino IDE 1.5 or above you can use pre-defined
// LED_BUILTIN instead of ‘led’
//
unsigned long timeout;
// the setup routine runs once when you press reset:
const int hyrje1 = 2;
const int hyrje2 = 3;
const int hyrje3 = 4;
const int hyrje4 = 5;
const int dalje1 = 11;
const int dalje2 = 12;
const int dalje3 = 10;
const int dalje4 = 9;
int s1 =0;
int s2=0;
int s3=0;
int s4=0;

void setup ()
{
pinMode(hyrje1,INPUT);
pinMode(dalje1,OUTPUT);
pinMode(hyrje2,INPUT);
pinMode(dalje2,OUTPUT);
pinMode(dalje3,OUTPUT);
pinMode(hyrje3,INPUT);
pinMode(dalje4,OUTPUT);
pinMode (hyrje4,INPUT);

}
void loop()
{
s1= digitalRead(hyrje1);
s2= digitalRead (hyrje2);
s3=digitalRead (hyrje3);
s4=digitalRead (hyrje4);

if(digitalRead , s1 == HIGH)
{

digitalWrite(dalje1, HIGH );
}

else if(digitalRead ,s2 ==HIGH)
{
digitalWrite(dalje1,LOW);

}
if (digitalRead,s3 ==HIGH)
{
digitalWrite(dalje2, HIGH );
delay (4000);
digitalWrite (dalje3,HIGH );
delay(8000);

}
else{
digitalWrite( dalje2 , LOW);
digitalWrite (dalje3, LOW);
}

if (digitalRead,s4 ==HIGH)
{
digitalWrite(dalje4, HIGH);
delay (20000);
} else {
digitalWrite(dalje4, LOW); // turn the LED on (HIGH is the voltage level)
}
}

Quite apart from the use of delay() there are things wrong with your code such as
  if(digitalRead , s1 == HIGH)Check the syntax of digitalRead() and put all of those mistakes right first.

By the way, what does DelayRun.h do ?