Can someone help. I need to do, that when sensor is covered for 350ms (Sensor 1)is LOW and if sensor
less covered than 350ms ( Sensor 1) HIGH, and when (Sensor 2) HIGH active pin 5 output.
Becouse when Sensor 2 stuck something and covered for 350ms, then mashine stops, and Sensor 1 see whats coming and active Blow function to blow everything that not damaging mashine more.
I try somthing, but didint work. I need that then sensor 2 covered 350ms it will be LOW and when mashine stops, and when mashine stops sensor 1 what see everything blow.
int S1=3; // sensor 2
int S4=4; // Sensor 1
int p=5; // Blow
Please give a good description of the requirements. E.g. at the moment this is my interpretation of your text
1)
sensor 1 must be low for 350ms
2)
next sensor 1 must be high for 350ms
3)
other sensor must be high during (1) and (2)
Note:
Never modify posts that people commented on; add a new post with additional information and/or updated code.
I need that if sensor 2 is covered 350ms or more should be LOW. Otherwise HIGH.( Becouse sensor is always active 24V, when covered 0v)
When sensor 2 LOW and Sensor 1 High, active Output. Otherwise do not active.
Becouse this two sensors on conveyor and always fast go products, when stuck product on sensor 2 for 350ms this stop mashine, but not conveyor, thats why i need active output, only if stuck something to long.
One sensor see product and count, other sensor also see product and stop line if stuck more then 350ms. But not working anymore timer, and blow.
Thats why i need that one sensor then is low more then 350ms (this stop line), and when other sensor then see coming product active output blow. 2 inputs, and one output. When one input low and one high, active output.
Its work if sensors 1 low and sensor 2 high, but i dont known how to do timer
Ramunas10:
is it possible to program input, that if sensor covered more then 350ms active output?
Unfortunately you're not making much sense. We don't understand what you're asking for and just saying the same thing over and over again isn't helping.
You have 2 sensors, S1 and S4. What are these sensors? Which sensor has to be "covered" and what does "covered" mean in terms of HIGH or LOW?
When whichever sensor it is has been in that state for 350ms what is the output that has to be "active" and what does "active" mean in terms of HIGH or LOW?
What does the other sensor have to be doing while all this is happening?
Try to describe EXACTLY what should happen slowly and one step at a time.