Although I have used the pull—up/down many times in the past, I never understood what it does and I would like to know what happens when I set a switch to pull-up/down.
Can you please explain in plain language what happens when you set a switch to pull-up/down?
This is a very good article to explain how pull-ups/down work.
One must also consider the beginning state of a circuit to determine if the signal should be pulled up or down. Look at a spindle controller as an example. There is usually a signal for spindle direction and one for run/stop. Now think about what happens when you first turn the system on. The electronics power up, then the controller initializes, then you start the CAM software, then you setup the job. Between the power up and initialization of the CAM software, you want the spindle to remain in the off state. If the run/stop signal is active high and you have a pull-up on the signal then the spindle will start up and be spinning until the CAM software can turn it back off.
What you would want to do in this case, is to use a pull-down resistor so the the spindle stays in the off state. Of course you would also have to make sure that the circuitry supports this.