IN THIS CHAPTER
Silverjack maintains its high-quality winter experience with a supplemental snow-making operation. Lift operation monitoring and snow-making equipment control are Project Trailblazer requirements. Lift access point displays inform guests about the current operational status of all mountain lifts. The Silverjack Operations Department will also compile lift uptime statistics for the Marketing Department. Project Trailblazer will allow the Operations Department to centralize and automate the snow-making process. Using mountaintop temperatures, Operations will develop a simple snow-making control algorithm that opens and closes water valves and controls equipment heaters.
The Project Trailblazer engineers discussed lift monitoring and snow-making control with Operations. Together, they determined input and output requirements. Monitoring a single lift requires six inputs, connected to the following alternating current (AC) sources:
Controlling a single snow-making branch requires at least four control outputs for this AC equipment:
Some snow-making branches have six water valves and two heaters. The engineers began to explore options for process control that supported six inputs and four outputs (with the capacity for eight outputs). Numerous input/output (I/O) boards exist, from companies such as Computer Boards (www.computerboards.com), all of which exceed Project Trailblazer requirements for I/O as well as size. The engineers decided that because Project Trailblazer has such modest I/O requirements, the on-board PC parallel port is ideally suited for lift monitoring and snow-making control.
You should use solid-state relay modules to connect external devices to target boards. Four types exist: input AC (IAC), output AC (OAC), input direct current (IDC), and output direct current (ODC). Both input and output modules provide electrical isolation that protects a target board's sensitive circuitry. Mounting racks have module sockets, fuses, light emitting diodes (LEDs) showing operation, and barrier strips for field connections.
This chapter discusses PC parallel ports, hardware interfacing, and three approaches to parallel port software development for data acquisition and control. The first approach, port I/O, is simple, functional, and clearly demonstrates the low-level hardware control that is necessary for device driver development. The second approach, ppdev, uses Linux's parallel port device driver to control the parallel port. This approach is similar to serial port control through the use of device files and the input/output control (ioctl) system call. The Project Trailblazer engineers could have implemented a solution for lift monitoring and snow-making control using port I/O or ppdev, but they didn't. They decided to take the third approach; they created their own custom device driver that uses the /proc directory. This eloquent solution will simplify their future bash scripting. At first, the engineers were totally intimidated at the thought of device driver development. They're great C programmers, but none knew anything about device drivers, kernel modules, or the process directory. After successfully developing a device driver, they had a new understanding of Linux.