> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionOnValueUpdate

# on value\_update (obsolete)

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE

## Function Syntax

```
on value_update <value>;
```

## Description

The event procedure is called whenever the specified value is updated, regardless of whether the value has changed. You can use the event procedure for all values of communication objects, including e.g. signal and event values, **LatestCall** or **LatestReturn** of methods, service states, etc.

**Notes**

A value which has a struct or array data type is always updated automatically. The event procedures for all its members are called even if just one member has changed. Instead of using several event procedures for different members it is often easier to use a single event procedure for the complex value itself.

## Parameters

* **`<value>`**: Designates the value on which the procedure shall be called.

## Selectors

* **ChangeTimeNS**: Last time the value was changed, in nanoseconds since measurement start.\
  Type: `int64`\
  Access Limitation: Read only

* **UpdateTimeNS**: Last time the value was updated, in nanoseconds since measurement start.\
  Type: `int64`\
  Access Limitation: Read only

## Example

```plaintext theme={null}
on value_update MirrorAdjustment.consumerSide[CANoe,LeftMirror].CurrentPosition
{
  write("New position received: (%d,%d)", $this.x.phys, $this.y.phys);
}
```

[Programming with the Communication Concept (C#, Python and CAPL)](../../../CANoeCANalyzer/CommunicationConcept/Programming/CCP.md) • [on value\_change](CAPLfunctionOnValueChange.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.