Skip to main content
Open topic with navigation

SetPWMStartDelay

CAPL Functions » VT System » SetPWMStartDelay

Tool Availability

Valid for: CANoe DE • CANoe:lite DE

Note

The function can only be called on system variable namespaces of appropriate channels of VT System modules.

Method Syntax

Long SysVarNamespace.SetPWMStartDelay (double StartDelay);

Description

Sets the delay of the start for the output of PWM signals and curves. This function is supported by the modules VT2004 and VT2848.

Parameters

  • StartDelay: Time for that the start of PWM or curve output is delayed. This function can be used e.g. to put out several signals with a defined phase shift. The StartDelay is denoted in seconds. Allowed values are from 0.0…4.0 (4s). This parameter is transferred to the VT System with nanosecond resolution.

Return Values

  • 0: Successful call
  • -1: Call error
  • -2: The namespace on which the command was called does not exist, is not a valid VT System namespace or does not support this command.
  • -3: The specified StartDelay is not valid
  • -6: The function is not supported by the used variant of the module.

Example

In the following example the PWM output of two VT2004 channels is simulating two sensors with PWM output. The SetPWMStartDelay command ensures that the PWM output on channel Sensor2 is starting 2ms later to produce the corresponding phase shift.

CAPL

vtsSetPWMStartDelay