Due to the nature of PCI/PCIe some systems will discard the order in which PCI/PCIe devices are recognized at the previous boot,
which can be problematic in case you use fixed hardware channels for multiple hardware of the same type, for example in PCANBasic.
To set a fixed hardware-handle to your CAN-Channels on a PCI/PCIe based PCAN Interface device, please follow these steps:
Make sure your device has an unique device ID, which you can for example set with PCAN-View via the Hardware view.
Open up the Registry-Editor:
Look for the following registry path:
Add a new registry-key of type "string" with the following syntax :
Code: Select all
The registry entry name represents the hardware-handle
Hardware1 = HardwareHandle1,
Hardware2 = HardwareHandle2
Here a list of the device-type values for the PCAN PCI/PCIe devices:
PCI and PCIexpress based cards:
- 0x103 = PCAN-PCI Express (current version)
- 0x113 = PCAN-PCI Express FD
- 0x107 = PCAN-PC/104-Express (current version)
- 0x117 = PCAN-PC/104-Express FD
- 0x108 = PCAN-miniPCIe
- 0x118 = PCAN-miniPCIe FD
- 0x10A = PCAN-ExpressCard 34
- 0x109 = PCAN-Chip PCIe
- 0x119 = PCAN-Chip PCIe FD
- 0x11A = PCAN-M.2
- Controller-Number (Channel)
Channel number in ascending order, starting at 0, so physical channel 1 is channel-number 0, physical channel 2 is channel-number 1, etc.
User defined device id, 0x01 - 0xFFFFFFFF
Note: 0x00 cannot be used as an device-number when using this method.
Below an example:
Note: The hardware handle for plug-´n-play devices starts with 16 and decrements by 1 with every CAN channel. PCAN-Basic takes this into account, meaning that PCAN_USBBUS1 = hardware16
Reboot your PC after setting the entries in the registry.
Your hardware should now be accessible via the fixed hardware-handle.
Note: With PCI based device the procedure is different, please see the following forum post regarding this: