Using multiple inputs to start a cycle

I am trying to utilize multiple inputs to start a cycle on a project. I want a pushbutton, interlock switch and a PID output to all signal respective High/Low before activating the pushbutton. The push button is what will ultimately trigger the cycle start. The PID output and the interlock are just redundancies to not allow the machine to cycle if not activated. How can I accomplish this?


Could it be as simple as an if statement? You can compare many things in one line of code, so:

if (something==x && somethingElse ==y && yetSomethingElse==z) {
//do something here

All of the items listed have to be true before whats inside braces runs

Keep in mind you can cluster things to get more complex relationships:

if ( (something==x && somethingElse==Y) || (something==w && somethingElse==V)) {
//do something here

In this example either the first cluster inside the parenthesis has to be true or (||) the the second cluster has to be true for the code inside the braces to run. If none are true it won't run.
Check the reference for all the symbols you can use - not equal to, greater than, less than or equal to, etc.