beautypg.com

Pid loop execution time, Pid loop execution time considerations, Pid loop execution time -17 – National Instruments FP-3000 User Manual

Page 69: Pid loop execution time considerations -17

background image

Chapter 4

Block Reference

© National Instruments Corporation

4-17

FieldPoint FP-3000 User Manual

PID Loop Execution Time

The FP-3000 can run approximately 50 PID loop iterations per second. For
loops with all three function blocks contained in the FP-3000, a single loop
iteration can run as quickly as 15–20 ms. You can choose how to distribute
these iterations—running 1 PID loop 50 times per second, or 50 PID loops
once per second (actually at most 49 PID loops can run on a single
FP-3000, see below). You can also choose a combination between these
two extremes.

When deciding how fast to run PID loops, keep in mind the A/D update rate
of the FieldPoint I/O modules. For example, the FP-AI-100 has an update
rate of 2.8 ms, but the FP-AI-110 has an update rate of 170 ms to 1500 ms.
It does not make sense to run a PID loop at a faster rate than the update rate.
The A/D converter cannot supply new information faster than its update
rate. For example, attempting to run a PID loop every 100 ms with an
FP-AI-110 will cause stale readings to be processed. The update rate of
each I/O module is documented in the operating instructions of each
module and in the National Instruments catalog.

PID Loop Execution Time Considerations

Up to 150 function blocks can be instantiated on an FP-3000. One of these
must be a resource block. This means that you can instantiate up to 149
other function blocks. Each PID loop requires 3 blocks (AI, PID, AO).
Thus, at most 49 PID loops can run on a single FP-3000.

Because function blocks must execute serially, there is a trade-off between
how many PID loops you run and how fast you can run them. To see this
relationship, calculate the total execution time for your desired function
blocks. Also note that in your schedule, you generally want to leave 30% of
your macrocycle for unscheduled communications (to allow alarm
information to be passed between devices, HMI communications, etc.).
The function blocks used in a PID loop have maximum execution times
(worst-case times) as shown below. (Note: You can find this information in
the block information tab for the desired function block. Under the View
menu, choose Preferences. Click on the Block View tab. Check the Show
Block Information
checkbox. Now when you double-click on a function
block, a new tab called Block Information will appear. Look at the
parameter

EXECUTION_TIME

on the Block Information tab for the

individual function block. If the number is a hexadecimal number, you can
change it to decimal by right-clicking and unchecking Hexadecimal Data.
This decimal value of this parameter is the execution time in 1/32 ms.
Dividing this number by 32 will give the maximum execution time in