# PV\_lkaddr() – Maximum cycle time violation

**URL:** <https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466>\
**Category:** Programming\
**Tags:** automation-runtime, plc\
**Created:** [March 12, 2026, 6:55am UTC](https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466 "2026-03-12T06:55:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.buschor](https://avatars.discourse-cdn.com/v4/letter/s/FF8800/32.png) [@simon.buschor](https://community.br-automation.com/u/simon.buschor)\
**Post date:** [March 12, 2026, 6:55am UTC](https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466/1 "2026-03-12T06:55:11Z")

</div>

We use the **PV\_lkaddr()** function from the **SYS\_Lib** library.  
In our function blocks, we have an initialization section that is executed only once. However, the function block itself is not called in **PROGRAM \_INIT** , but only in the cyclic part of the program.

The problem is that calling this function sometimes leads to a cycle time violation.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/3/35151a4da0c0130314a7af27481f97652043f0a9.png)

In the documentation, there is no mention that this function may only be used in the INIT-UP, as is the case, for example, with the **ST\_ident()** function.

Has anyone had similar experiences?

---

<div class="post-metadata">

**Author:** ![michael.bertsch](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/michael.bertsch/32/239_2.png) [@michael.bertsch](https://community.br-automation.com/u/michael.bertsch)\
**Post date:** [March 12, 2026, 8:05am UTC](https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466/2 "2026-03-12T08:05:57Z")

</div>

Hello,

This function **PV\_lkaddr()** is quering through a database, i don’t know the exact technical details, but I would assume that this will take some time.

In which cycletime does the Task run in which the issue does occure?

I could immagine that the time needed by the function is also depending on the ammount of variables in the PLC.  
I think B&R is not stating that this can only be used in Init becuase it is also a usecase to use a cyclic Task with enought cycletime or tolerance.

Greetings  
Michael

---

<div class="post-metadata">

**Author:** ![simon.buschor](https://avatars.discourse-cdn.com/v4/letter/s/FF8800/32.png) [@simon.buschor](https://community.br-automation.com/u/simon.buschor)\
**Post date:** [March 12, 2026, 8:31am UTC](https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466/3 "2026-03-12T08:31:04Z")

</div>

Duration is 12ms an tolerance is 0:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/0/04728c92fdffc5d5efcbe6f627af401a686c3c6c.png)

---

<div class="post-metadata">

**Author:** ![marcusbnr](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/marcusbnr/32/256_2.png) [@marcusbnr](https://community.br-automation.com/u/marcusbnr)\
**Post date:** [March 12, 2026, 12:37pm UTC](https://community.br-automation.com/t/pv-lkaddr-maximum-cycle-time-violation/10466/4 "2026-03-12T12:37:18Z")

</div>

A cycle time violation happens when the tasks in a cyclic task class overrun the cycle time plus tolerance. This function may be the cause, but it may also be the case that the function is taking a reasonable amount of time but doesn’t have enough time left to complete once it starts. In other words, a cycle time violation is often caused by a combination of factors even though the log entry indicates a specific line.

It’s generally a good practice to spread your programs across multiple task classes as opposed to having them all in one. This lets you set priorities and run tasks that take longer in a slower task class. At the very least, you could try spreading your tasks out across 2 different 12ms task classes and see if that changes the result.

If you want more information about how long each of your tasks takes to execute, you can use the [Profiler](https://help.br-automation.com/#/en/4/diagnostics_support%2Fdiagnosis%2Fprofile%2Fdiagnosis_profile.html) via Open→Profiler in Automation Studio.
