Simple IR Sensor Program

First I have had this Arduino UNO board for years. I had originally bought it to control my brewing system and my still. But never got around to it. So I found it in some of my electronic stuff and figured I would give it a go. Last time I looked at any code was around 1990. And that was just in code reviews when I was working. Yada yada yada. So lets just say newbie.
I am trying to use the board to monitor my reloading press operation. Its pretty simple but after trying several different strategies I am stumped. I get it to work kinda on the test bed but not on the machine. And I managed to save 21 sketches that none work completely. And they are messy with commented out trys.
So here I go.
There are
3 IR Sensors - RAM TOP, RAM BOTTOM and POWDER SENSE (Output normally HIGH)
1 LED Output
1 Reset Button

The operation is as follows.
The RAM is at rest at the bottom.
Manually the RAM is raised to the TOP and if the POWDER SENSOR is TRUE the program does nothing. And you continue with the next stroke.
If the RAM is raised to the TOP and the POWDER SENSOR is FALSE the the LED goes HIGH.
Then the RESET BUTTON is used to set the LED to LOW.
I have tried IF's, nested IF's, ELSE IF's.
I can never get the sequence to work properly.
If the POWDER SENSE doesn't come in simultaneously with the RAM at the TOP its doesn't work.
The 3 sensors need to be read in sequence. Once the BOTTOM sensor goes LOW the the next one has to be the TOP then the POWDER.
Even if I get it to partially work I can never get the LED to go LOW with the BUTTON press.
Eventually I am going to put a counter in to pull another pin high and a solenoid to stop the ram from operating.
At this point I am not looking for the complete operational code, just some examples and ideas how to do it.
Thanks

Before asking questions:

  • Questioners know what their hardware and software looks like but the volunteers here do not; you need to fully explain what’s not working, and how it is supposed to work.
  • Please read all the posting guidelines before asking your questions; follow these guidelines in your post.

  • As always, show us a good schematic of your proposed circuit.
  • Show us good images of your ‘actual’ wiring.
  • Give WEB links to major components.

  • In the Arduino IDE, use Ctrl T or CMD T to format your code, then copy the complete sketch.
  • Use the < CODE / > icon from the ‘posting menu’ to attach your copied sketch.

When you follow the posting guidelines, volunteers can be more effective.

Please post your best effort at the code. Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Tell us what the code actually does and how that differs from what you want.

Please post a schematic or wiring diagram. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

Just off the top of my head I might suggest a couple of things that may help.

  1. When you monitor digital inputs it is often more important to detect changes in state instead of levels. With state change detection you can react to a switch that goes from off to on and ignore when it goes off or is off or is on. My state change tutorial may be of interest.

  2. Code using a state machine.

Thanks I will start over. I found the tools to provide the necessary info.