Read PnP channel id
Read PnP channel id
I am trying to understand the API and can initialise my CAN USB successfully when I use 0x51 and a baud rate. But how can I read the available PnP channels assuming I plug in several CAN USB devices?
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Read PnP channel id
Simply iterate from PCAN_USBBUS1 to PCAN_USBBUS16 and try to Init the CAN Channel.
Whenever you get a CAN_ERR_OK this Channel is available.
Or, if you do not want to init the CAN Node (fir secure reasons) you use the CAN_GetValue() function with the PCAN_CHANNEL_CONDITION Parameter. When you get a PCAN_CHANNEL_AVAILABLE the unit is pluged in.
All Info about the functions are inside the Online Help (CHM-File) - maybe take a look at tit to find more info.
Whenever you get a CAN_ERR_OK this Channel is available.
Or, if you do not want to init the CAN Node (fir secure reasons) you use the CAN_GetValue() function with the PCAN_CHANNEL_CONDITION Parameter. When you get a PCAN_CHANNEL_AVAILABLE the unit is pluged in.
All Info about the functions are inside the Online Help (CHM-File) - maybe take a look at tit to find more info.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------