In an image forming device, a method of stapling using a stack height measurement cycle performed by a stack height sensor assembly mounted adjacent a media staging area for holding a job, the stack height sensor assembly having a reversible motor assembly for driving an insertion assembly in an extension and a retraction direction with respect to the media staging area, the insertion assembly including a translateable plunger having a single sensor mounted adjacent a top thereof and a probe translateably mounted thereto, the sensor having an output signal that changes to a first state and to a second state when the sensor is actuated and deactuated, respectively, and a stapler mounted adjacent to the media staging area, the method of stapling comprising:
- receiving a request for stapling a job including a media stack;
- calibrating the stack height sensor assembly by performing a stack height measurement cycle when the media staging area is empty to determine a travel range TR;
- determining whether or not the job is ready for stapling in the media staging area, and when it is determined that the job is ready for stapling, performing the stack height measurement cycle to determine a distance D to a top of the media stack;
- calculating a stack height H by subtracting the distance D from the travel range TR;
- determining whether or not the stack height H is less than or equal to a maximum stack height, and, when it is determined that the stack height H is less than or equal to a maximum stack height, actuating the stapler to staple the job;
- wherein the respective stack height measurement cycles to measure the distance D and travel range TR each comprise:
- initializing the output signal of the sensor to the first state and initializing one of a count and a time to zero;
- extending the insertion assembly from a home position toward a top of the media stack and starting one of the count and the time when the output signal of the sensor changes to the second state and determining whether or not the output signal of the sensor changes from the first state to the second state, and, when it is determined that the output signal has not changed to the second state, declaring a fault, and, when it is determined that the output signal has changed to the second state, starting one of the count and the time and continuing to extend the insertion assembly;
- determining, during extending of the insertion assembly, whether or not the output signal of the sensor changes from the second state to the first state, and, when it is determined that the output signal has not changed to the first state, continuing extending the insertion assembly, and, when it is determined that the output signal has changed to the first state, stopping extending of the insertion assembly and stopping one of the count and the time and storing one of the count and the time;
- retracting the insertion assembly and determining whether or not the output signal of the sensor changes from the first state to the second state, and, when it is determined that the output signal has not changed to the second state, declaring a fault, and, when it is determined that the output signal has changed to the second state, continuing retracting the insertion assembly;
- determining, during retracting of the insertion assembly, whether or not the output signal of the sensor changes from the second state to the first state, and, when it is determined that the output signal has not changed to the first state, continuing retracting the insertion assembly, and, when it is determined that the output signal has changed to the first state, stopping retracting of the insertion assembly;
- and
- converting a respective one of the respective stored count and time into the respective distance D and travel range TR.