Power5Volts

This parameter is used for switching the external 5V on the D-Sub connector of a device. This is useful when connecting external bus converter modules to a card (AU5790 / TJA1054)), so that it is also supplied with power.

Availability

Available since PCAN-Basic version 1.0.0.

It can be read without initialization since PCAN-Basic version 4.4.0.

Supported By

  • PCAN-USB: Channels Usb01 to Usb16.

      Caution

    Not all USB devices support this parameter.

Access Mode

This parameter is read/write. It can be configured and retrieved.

Possible Values

This parameter represents an extra voltage that can be activated or deactivated. Accepts values of type ParameterValueActivation.

Default Value

The default state of this extra voltage is Off. After switching it On, the extra 5V stays on the D-Sub until it is expressly deactivated, or the device is reinitialized (unplugged and plugged in again, or PC reboot).

Initialization Status

Get: It can be read on initialized or uninitialized PCAN Channels.

Set: It can be set on initialized PCAN Channels only.

Example

The following code shows how to activate the extra 5V power of a USB Channel:

C#
PcanChannel channelUsed = PcanChannel.Usb01;

if (Api.Initialize(channelUsed, Bitrate.Pcan500) == PcanStatus.OK)
{
    if (Api.SetValue(channelUsed, PcanParameter.Power5Volts, ParameterValue.Activation.On) == PcanStatus.OK)
        Console.WriteLine($"5V power of {channelUsed} successfully activated.");
    else
        Console.WriteLine($"Error configuring 5V power on channel {channelUsed}.");
    Api.Uninitialize(channelUsed);
}

See Also