$GYDQW
&RQWUROOHU8VHU¶V*XLGH
6HFWLRQ &38RSWLPL]DWLRQ/RDG&DOFXODWLRQ
3BSE 002 415R701 Rev A 3-41
&38/RDG&DOFXODWLRQ
With certain heavy load situations in an Advant Controller 450, or if you want to determine if
one controller is sufficient for a particular application/load, it may be valuable to perform a CPU
load calculation.
In the development of standard solutions, including type circuits of different scales, other
working methods are strongly recommended. The best result is obtained by load measurement
in an actual target system. For CPU load measurement, see the use of the ANPER command in
the manual $03/&RQILJXUDWLRQ$GYDQW&RQWUROOHU 6HULHV.
Load calculation is not intended to give absolute values, but rather to indicate the magnitude of
the load generated by the different parts. The calculation also provides an excellent basis for
determination of where optimization would be most effective if it is necessary to lower the CPU
load.
Two calculation methods are presented below. The main differences between the methods are
the accuracy obtained and the work required. Approximations, of course, provide less accuracy
but rapid results.
The equation for calculating the total CPU load for several similar functions is:
where NF =number of functions (for example feedback control loops)
T =execution time for the function (ms)
TS =cycle time for the function in PC (ms)
The equation is generalized for load calculation in Advant Controller 450.
When the load is to be calculated or estimated, concentrate on those circuits which are frequent.
You can disregard some quite advanced single circuits from a PC program load viewpoint.
Just include the relevant I/O in the calculation/estimation. Sometimes complexity necessitates a
detailed study of a certain part of an application. Then it is practical to combine an “accurate
method” with a “shortcut method.”
The structures of the two calculation methods are illustrated in Figure 3-8.
When calculating, include only relevant items.
CPU
load
NF T× 100 (TS)⁄× [%]=