CAPL Functions » VT System » vtsSetRefVoltageMode
vtsSetRefVoltageMode
Valid for: CANoe DE • CANoe:lite DEFunction Syntax
long vtsSetRefVoltageMode (char Target[], eVTSRefVoltageMode Mode); // form 1long vtsSetRefVoltageMode (char Target[], eVTSRefVoltageMode Mode, double Factor); // form 2
Description
Sets the mode for the reference voltage output to control the power supply’s output voltage.Parameters
- Target: Name of the system variable/namespace that will be affected by this function call.
- Mode: Values see eVTSRefVoltageMode
- Factor: Factor (Ref voltage factor) to determine the control voltage from the defined power supply output voltage. Notice! The factor is given by the external power supply. This factor is the ratio of the control voltage to the output voltage. For example, if a power supply outputs 50 V at a control voltage of 5 V, its factor is 0.1 (5/50). Use form 1 for the internal power supply - the factor is always 1. Use form 2 with explicitly given factor for the external power supplies. The default factor is 1.0.
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 mode is not valid
- -4: The function wasn’t called in the context of the main method of a test module. So it is not possible to wait until the setting will be taken over from the VT System. Otherwise, the call was successful but it is not sure if the settings have been taken over already when the call returns.
Example
In order to output a control voltage (V<sub>Control</sub>) which leads to the desired output voltage V<sub>Out</sub>, the VT7001 must know the power supply factor.
In the following example, the factor of the external power supply is 0.1 and the desired output voltage V<sub>Out</sub> is 15 V.
To achieve the desired output voltage (V<sub>Out</sub>), the VT7001 calculates and sets the control voltage (V<sub>Control</sub>) automatically (1.5 V =15 * 0.1), which results in an output voltage of 15 V.
CAPL
.NET (C#)
VT System Control
VT System Control Select PowerSupply Set Sidebar | Interconnection Settings | Mode to sup1 Select ExtSupply Set Sidebar | Output | Ref Voltage Mode to ConstantSet Sidebar | Output | Ref Voltage Factor to 0.1
Set Sidebar | Output | RefVoltage to 15.0 Select Clamp30 Set Schematic | Active to active SetRefVoltageMode