This parameter is used to get the part number (IPEH-number) associated with a PCAN device. This is a text that allows the recognition and differentiation of device models using the same interface, for example USB. A PCAN-USB FD adapter would return "IPEH-004022" while a classic PCAN-USB would return "IPEH-002021/002022”.
This parameter can be used when it is wanted to differentiate between several hardware models using the same interface.
It is available since PCAN-Basic version 4.6.0.
This parameter can only be read. It cannot be modified.
The part number is represented as a string of the form "IPEH-xxxxxx”, where xxxxxx represents a six-digit number. If a device has several revisions so, that it is represented by more than one IPEH number, then all numbers are contained in the same text, separated by a "/" character. For example, a classic PCAN-USB reports the value IPEH-002021/002022. The returned value is a null-terminated string with a length of minimum 12 bytes.
Does not apply.
Get: It can be read on initialized or uninitialized PCAN Channels.
The following code shows how to retrieve the part number of a USB Channel:
PcanChannel channelUsed = PcanChannel.Usb01;
string partNumber;
if (Api.GetValue(channelUsed, PcanParameter.DevicePartNumber, out partNumber) == PcanStatus.OK)
Console.WriteLine($"Part number of {channelUsed}: {partNumber}");
else
Console.WriteLine("Error! Could not retrieve the part number of the device.");Dim channelUsed As PcanChannel = PcanChannel.Usb01
Dim partNumber As String = Nothing
If Api.GetValue(channelUsed, PcanParameter.DevicePartNumber, partNumber) = PcanStatus.OK Then
Console.WriteLine($"Part number of {channelUsed}: {partNumber}")
Else
Console.WriteLine("Error! Could not retrieve the part number of the device.")
End IfPcanChannel channelUsed = PcanChannel::Usb01;
String^ partNumber;
if (Api::GetValue(channelUsed, PcanParameter::DevicePartNumber, partNumber) == PcanStatus::OK)
Console::WriteLine("Part number of {0}: {1}", channelUsed, partNumber);
else
Console::WriteLine("Error! Could not retrieve the part number of the device.");