Important
The retrieved value can be converted to the BitrateXL type. Example (C#): BitrateXL bitrate = stringBuffer;
This parameter is used to obtain information about the bit rate of a Channel, that was initialized to work with CAN XL communication.
It is available since PCAN-Basic version 5.0.0.
This parameter can only be read. It cannot be modified.
Possible values are strings representing the nominal, flexible data rate and extended data field length bit rate used by a CAN XL capable hardware.
Does not apply.
Get: It can be read on initialized or uninitialized PCAN-Channels.
The following code shows how to retrieve CAN XL bit rate information from a USB Channel:
PcanChannel channelUsed = PcanChannel.Usb01;
string buffer;
if (Api.GetValue(channelUsed, PcanParameter.BitrateXlInformation, out buffer) == PcanStatus.OK)
{
BitrateXL bitrateXL = (BitrateXL)buffer;
Console.WriteLine($"The channel {channelUsed} uses following bit rate:");
Console.WriteLine($" Frequency: {bitrateXL.Frequency}");
Console.WriteLine($" Nominal: {bitrateXL.Nominal}");
Console.WriteLine($" FD: {bitrateXL.FlexibleData}");
Console.WriteLine($" XL: {bitrateXL.ExtendedDataLength}");
Console.WriteLine($" Error Signaling: {bitrateXL.ErrorSignaling}");
Console.WriteLine($" Transceiver Mode Switch: {bitrateXL.TransceiverModeSwitch}");
}Dim channelUsed As PcanChannel = PcanChannel.Usb01
Dim buffer As String = Nothing
If Api.GetValue(channelUsed, PcanParameter.BitrateXlInformation, buffer) = PcanStatus.OK Then
Dim bitrateXL As BitrateXL = CType(buffer, BitrateXL)
Console.WriteLine($"The channel {channelUsed} uses following bit rate:")
Console.WriteLine($" Frequency: {bitrateXL.Frequency}")
Console.WriteLine($" Nominal: {bitrateXL.Nominal}")
Console.WriteLine($" FD: {bitrateXL.FlexibleData}")
Console.WriteLine($" XL: {bitrateXL.ExtendedDataLength}")
Console.WriteLine($" Error Signaling: {bitrateXL.ErrorSignaling}")
Console.WriteLine($" Transceiver Mode Switch: {bitrateXL.TransceiverModeSwitch}")
End IfPcanChannel channelUsed = PcanChannel::Usb01;
String^ buffer;
if (Api::GetValue(channelUsed, PcanParameter::BitrateXlInformation, buffer) == PcanStatus::OK)
{
BitrateXL^ bitrateXL = (BitrateXL^)buffer;
Console::WriteLine("The channel {0} uses following bit rate:", channelUsed);
Console::WriteLine(" Frequency: {0}", bitrateXL->Frequency);
Console::WriteLine(" Nominal: {0}", bitrateXL->Nominal);
Console::WriteLine(" FD: {0}", bitrateXL->FlexibleData);
Console::WriteLine(" XL: {0}", bitrateXL->ExtendedDataLength);
Console::WriteLine(" Error Signaling: {0}", bitrateXL->ErrorSignaling);
Console::WriteLine(" Transceiver Mode Switch: {0}", bitrateXL->TransceiverModeSwitch);
}