SetWFParams
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.SetWFParams (double timeIncrement, double pause, dword numOfRepeats)// form 1long SysVarNamespace.SetWFParams (double timeIncrement, double pause, dword numOfRepeats, double startDelay, dword startPoint)// form 2
Description
The function configures the parameters for the output of a voltage or resistance curve or bitstream.Parameters
-
timeIncrement: Specifies how long the value of a specified interpolation point is to be stimulated before transitioning to the next interpolation point. Depending on the module and the waveform, different ranges for
timeIncrementare valid:- Voltage curves on a VT7001 module:
timeIncrementcan be 0.000001(1 µs)…0.065 (65 ms). - Voltage curves on a VT2816 or VT2004 module:
timeIncrementcan be -0.065 (-65 ms)…0.065 (65 ms). - Resistance curves: 0.0005 (500 µs)…0.065 (65 ms) in R> mode and 0.001 (1 ms)…0.065 (65 ms) in R< mode.
- BitStreams on a VT2516 module:
timeIncrementcan be 0.000002 (2 µs)…0.065 (65 ms). - BitStreams on a VT2848 module:
timeIncrementcan be -0.065 (-65 ms)…0.065 (65 ms).
- Voltage curves on a VT7001 module:
- pause: Specifies how long the stimulation is interrupted between two repetitions of the waveform. Valid values: 0.0…4294.0 (4294 s).
- numOfRepeats: Specifies how many times in a row the curve is to be stimulated. Valid values: 0…65535 (0 means unlimited repetition of the curve).
- startDelay: Specifies a delay for the start of the stimulation in seconds. This parameter is only supported by the VT2004, VT2816, and VT2848 modules. Valid values: 0.0..4.0 (4 s).
- startPoint: Specifies the point of the stimulated curve the stimulation should begin with. This parameter is only supported by the VT2004, VT2816, and VT2848 modules. Valid values: 0..4096
Return Values
- 0: Successful call
- -1: 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: One of the specified parameters is not valid.
Example
The following example demonstrates how to use the waveform resistance output of a VT2004 channel to simulate a sensor. In the example, a waveform called WaveForm.TXT is loaded and replayed on channel Temp_Sensor.Example WaveForm.TXT
CAPL
.NET (C#)
VT System Control
Select Temp_SensorSet Sidebar | General | Stim Mode to R
Set Sidebar | General | Curve Type to Constant
Set Sidebar | Waveform Output | WF Resistance to WaveForm.txt
Set Sidebar | Waveform Output | Parameters | Time Increment to 0.065
Set Sidebar | Waveform Output | Parameters | Pause to 2.0
Set Sidebar | Waveform Output | Parameters | Repeats to 3
Click Sidebar | General | Start Stimulation vtsSetWFParams