The goal of creating a long profiler is to include at least two (2x) calls of the slowest configured and used task class, as shorter profilers may not accurately reflect the CPU usage of the PLC. For example, if the slowest task class with programs is TC#5 at 200ms, then the profiler should extend at least 400ms. In general, the longer the profiler the better diagnostic information that can be obtained, but this should be balanced with PLC resources used by the profiler. The profiler configuration sets the buffer for the number of events, so the amount of time recorded will depend on the project. The profiler defaults are set to use a small amount of resources, as to not overwhelm older and more budget friendly PLCs.
The profiler can be made more verbose by including the logging of specific libraries (see Library Logging section).
Connect with Automation Studio to the PLC and open the Profiler (Open > Profiler).
Uninstall the current profiler.
Click the Configuration button to open the configuration dialog
Make the following changes under the General tab:
Transfer profiler configuration object to => USRROM
Generate profiler data object in => USRRAM (or DRAM if no/not enough USRRAM is available, see below)
- Make the following changes under the Buffer tab:
Number of recording entries => 15000 (The PLC may not have enough SRAM for the number of configured entries. DRAM can be used as a potential substitute depending on the error)
Buffer for created tasks => 50
Buffer for created user tasks => 30
If a more verbose profiler is necessary, follow the instructions under the Library Logging section below.
Click OK to accept and close the Configuration dialog.
Click the Install button to install the profiler onto the PLC.
The next step is to test the profiler configuration to determine if the buffer amount is sufficient, and increase the number of entries if necessary.
Ensure the PLC is in RUN mode and wait 10+ seconds.
Click the Stop button within the profiler window. This will stop the current profiler and make the data available for upload.
Click the Upload Data Object button within the profiler window.
If there are archived error profilers on the PLC, then you will be asked to select the profiler data object to upload. Choose “prfmod$f” and click OK.
- Change to the Table view (orange arrow), then note the Profiler Run Time in us. If the time does not cover at least twice (2x) the longest used cycle time, increase the “Number of recording entries” in the Profiler configuration (see Step 5).
In the above example, the profiler ran for 1,029,341.038 us, which is a little more than 1s.
- Click the Start button to restart the profiler.
Since the configuration is saved into the USERROM, the profiler will remain through power cycles and online transfers. Offline installation or initial installation transfers will clear the profiler configuration.