Thanks for the information. I must have read this document several times already. It summarizes the method for defining pins well.
I think I'll use the CS5 pin to ground for my application. The hiccup I've had in the literature is finding out what the supplies voltages are. Based on the referenced document, there is no PWM and I believe the output is 3.3V when triggered for CS5 pin.
There is a possibility that actualValue does not achieve the requestedValue which is why I chose that logic.
However @dc42 may have to confirm the details.
(job.file.fileName!=null) will be true if a print job is loaded.
This stops the code from executing if the machine isn't printing.
As I said, without that there is a possibility (depending on your code) that you could send the system into an endless loop after a print finished and the fans shut down thermostatically.
This is also why I tested temperature.