vtsSetMaxCurrentMode
Valid for: CANoe DE • CANoe:lite DEFunction Syntax
long vtsSetMaxCurrentMode (char Target[], dword Mode, double Factor); // form 1long vtsSetMaxCurrentMode (char Target[], dword Mode); // form 2
Description
Sets the mode for the control voltage output to control the power supply’s maximal output current.Parameters
- Target: Name of the system variable/namespace that will be affected by this function call.
- Mode:
- 0: Max current control voltage output not active
- 1: Constant value, determined by the corresponding output system variable
- Factor: Factor to determine the control voltage from the defined power supply max current value.
Power Supply Max Current * Factor = Control Voltage
The factor has a default value of 1.0 at the start of measurement. If the function is called without factor parameter the currently set factor is kept.
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 the following example the maximum current mode is activated on the power supply channel ExtSupply of a VT7001 module. The max. current output is set to 10 A. Finally the output Clamp30 of the VT7001 is activated. To set a max current of 10 A, e.g. a control voltage of 5.0 V has to be given to the power supply. Therefore a factor of 0.5 has to be used.CAPL
.NET (C#)
VT System Control
- Select PowerSupply
- Set Sidebar | Interconnection Settings | Mode to sup1
- Select ExtSupply
- Set Sidebar | Output | Max Current Mode to Constant
Set Sidebar | Output | Max Current Factor to 0.5
Set Sidebar | Output | Max Current to 10.0 - Select Clamp30
- Set Schematic | Active to active