Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 523
Special Instructions (FBC, DDT, DTR, PID)   Chapter 13
Relay Ladder
Structured Text
PID_timer.pre := 1000
TONR(PID_timer);
IF PID_timer.DN THEN
PID(TIC101,Local:0:I.Ch0Data,Local:0:I.Ch1Data,
Local:1:O.Ch0Data,0,Local:1:I.Ch0InHold,
Local:1:I.Ch0Data);
END_IF;
In this method, the loop update time of the PID instruction should be set 
equal to the timer preset. As in the case of using a periodic task, you should set 
the analog input module to produce the process variable at a significantly faster 
rate than the loop update time. You should only use the timer method of PID 
execution for loops with loop update times that are at least several times longer 
than the worst-case execution time for your continuous task.
The most accurate way to execute a PID instruction is to use the real time 
sampling (RTS) feature of the 1756 analog input modules. The analog input 
module samples its inputs at the real time sampling rate you configure when 
you set up the module. When the module’s real time sample period expires, it 
updates its inputs and updates a rolling timestamp (represented by the 
.RollingTimestamp member of the analog input data structure) produced by 
the module.