Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

canHWInfo

(To be removed) Information on available CAN devices

canHWInfo will be removed in a future release. Use canChannelList instead.

Syntax

hw = canHWInfo

Description

example

hw = canHWInfo returns information about CAN devices, and displays the information organized by vendors and channels.

Examples

collapse all

Detect the available CAN devices and investigate a device channel.

hw = canHWInfo
hw = 

CAN Devices Detected

   Vendor    |          Device            | Channel | Serial Number | Constructor...
 ------------|----------------------------|---------|---------------|---------------
 MathWorks   | Virtual 1                  | 1       | 0             |canChannel(...
 MathWorks   | Virtual 1                  | 2       | 0             |canChannel(...
 Kvaser      | Virtual 1                  | 1       | 0             |canChannel(...
 Kvaser      | Virtual 1                  | 2       | 0             |canChannel(...
 NI          | Virtual (CAN256)           | 1       | 0             |canChannel(...
 NI          | Virtual (CAN257)           | 2       | 0             |canChannel(...
 NI          | Series 847X Sync USB (CAN0)| 1       | 12345C        |canChannel(...
 NI          | 9862 CAN/HS (CAN1)         | 1       | 12345A        |canChannel(...
 Vector      | Virtual 1                  | 1       | 0             |canChannel(...
 Vector      | Virtual 1                  | 2       | 0             |canChannel(...
 PEAK-System | PCAN-USB Pro (PCAN_USBBUS1)| 1       | 0             |canChannel(...
 PEAK-System | PCAN-USB Pro (PCAN_USBBUS2)| 2       | 0             |canChannel(...


View the Vector properties to see its VendorDriverVersion.

v = hw.VendorInfo(4)
v = 

  VendorInfo with properties:

                 VendorName: 'Vector'
    VendorDriverDescription: 'XL Driver Library'
        VendorDriverVersion: '9000022'
                ChannelInfo: [1×2 can.vector.ChannelInfo]

View the first Vector channel information.

c1 = hw.VendorInfo(4).ChannelInfo(1)
c1 = 

  ChannelInfo with properties:

                Device: 'Virtual 1'
    DeviceChannelIndex: 1
    DeviceSerialNumber: 0
     ObjectConstructor: 'canChannel('Vector','Virtual 1',1)'

Output Arguments

collapse all

CAN devices detected, returned as a can.HardwareInfo object. You can programmatically access vendor and channel information by indexing into the output object VendorInfo property.

See Also

Functions

Introduced in R2009a

Was this topic helpful?