User manual
IEC61131 User and Reference Manual 
April 22, 2008     
328 
pidd 
Discrete Output PID Function Block 
Description 
The pidd function block performs a PID algorithm and controls two discrete outputs. The 
output is a duty cycle of a Boolean value. The duty cycle depends on the value of the output. 
The increase output, iOut, is cycled when the outputPercent is greater than zero. The 
decrease output, dOut, is cycled when the outputPercent is less than zero. 
In automatic mode, the output is calculated using the PID algorithm. A new calculation is 
done at the rate specified by cycleTime.  
In manual mode (auto = FALSE), the outPercent is set to the value of the outManualPercent 
input. The output is limited to the range set by fullPercent and zeroPercent. 
If the cycleTime parameter is less than the cycle time of the ISaGRAF application program, 
the sampling period is the period of the application. 
The analog output function block pidd appears as follows. 
pv
sp
gain
reset
rate
deadband
fullPercent
zeroPercent
cycleTime
auto
outManualPercent
dOut
pidd
motorOutput
iOut
outPercent
Arguments 
Inputs 
Type 
Description 
pv 
Real 
The process value is used to calculate the process 
error in the PID algorithm. error = pv – sp 
sp 
Real 
The setpoint value is used to calculate the process 
error in the PID algorithm. error = pv – sp 
gain 
Real 
The proportional gain. A positive value of gain 
configures a forward-acting PID controller and a 
negative value of gain configures a reverse acting 
controller. 










