 PID control is a common closed loop system used to maintain physical properties such as pressure and temperature in automated processes. The PID instruction controls the closed loop by comparing the input or process variable from an analog input module to the system set point. The difference between the set point and the process variable is referred to as error. The error is analyzed by the PID loop calculation and provides an output or control variable to an analog output module to meet the set point defined by the system requirements. In the following program example, the PID instruction is used to control pressure of a vessel. Using a pressure transmitter as the process variable and a flow valve as the control variable, the set point is maintained at 50 psi. The pressure transmitter identified as the process variable converts 0 to 100 psi to a 4 to 20 milliamp signal. With a linear relationship, 0 psi measured at the transmitter produces a 4 milliamp signal and at 100 psi a 20 milliamp signal is produced. The analog input module converts the 4 to 20 milliamp signal to a digital value ranging from 3,277 to 16,384. A 4 milliamp signal results in a value of 3,277 and a 20 milliamp signal results in a value of 16,384. The input value is scaled to a range of 0 to 16,383 compatible with the PID instruction using the Scale with Parameters Instruction or SCP. The input parameter of the SCP instruction contains the memory address of the analog input module. The input minimum and input maximum are programmed as the smallest and largest values produced by the analog input module. The input values are then scaled between the ranges programmed in scaled minimum and scaled maximum parameters. Scaled minimum value is programmed as 0, representing the low end of the output range. Scaled maximum value is programmed as 16,383, representing the high end of the output range. The SCP output parameter is the integer file address where the scaled output is stored and then used by the PID instruction as the process variable. For example, when the minimum pressure of 0 psi is measured, a scaled value of 0 is transferred to the SCP output and when 100 psi is measured, a scaled value of 16,383 is transferred to the SCP output. In the PID instruction, the process variable parameter is programmed as an integer file which is the scaled value from the SCP instruction. The control variable parameter is programmed as an integer which is the memory address for the output value. Next, the control variable range of 0 to 16,383 is scaled to an analog output module using the second scale with parameters instruction. The input parameter of the SCP contains the memory address of the PID output values that will be scaled. The input minimum and input maximum are programmed as the smallest and largest values of the input range. The input value is then scaled between the ranges programmed in scaled minimum and scaled maximum parameters. Scaled minimum value is programmed as 6,242, representing the low end of the analog output module range. Scaled maximum value is programmed as 31,208, representing the high end of the analog output module range. The SCP output parameter is the file address of the analog output module. The analog output module converts the digital value in the range of 6,242 to 31,208 to an analog signal of 4 to 20 milliamps. The analog signal is then sent to the flow valve where the operating range is adjusted between 0 and 100%. With the data scaled using the SCP instruction, the process of controlling the pressure of the vessel to 50 psi continues by entering the set point of 50 in the PID setup menu. As the PID instruction is executed, a scaled error is generated by subtracting the process variable from the set point. By increasing the control output, the error is reduced to attain the set point as the PSI is raised in the system. In other words, the valve position is gradually closed to reduce the pressure loss. Upon reaching the set point in the system, the control output and scaled error is reduced to zero.