Skip to main content
Open topic with navigation

vtsSetTransferCycle

CAPL Functions » VT System » vtsSetTransferCycle Valid for: CANoe DE • CANoe:lite DE

Function Syntax

Description

Sets the cycle time for retrieving the measured value of a system variable from the VT System and writing it to the corresponding system variable.

Parameters

  • Target: Name of the system variable/namespace that will be affected by this function call.
  • CycleTime: Defines the cycle time in seconds. The only available cycle times are 1 ms (= 0.001), 2 ms, 5 ms, 10 ms, 20 ms, 50 ms, 100 ms, 200 ms, 500 ms, 1 s, 2 s, 5 s, and 10 s. Please note that not all cycle times are available for all measurement values. See possible settings in the VT System configuration dialog. If an invalid cycle time is specified, the call will fail with a feedback value of -1.

Return Values

  • 0: Successful call
  • -1: Call error, i.e. system variable does not belong to a valid VT System read value or cycle time is invalid.
  • -4: Invalid system variable

Example

The following example demonstrates how to change the transfer cycle of a VT System system variable during the measurement. Here the transfer cycle is reduced to 1 ms while the function waits for the input signal to change. This allows for a fast reaction. After the event has occurred the transfer cycle is set back to 100 ms.

CAPL

.NET (C#)

VT System Control

SetTransferCycle