| Contents | Index |
canch = canChannel('vendor', 'device', devicechannelindex)
canch
= canChannel('vendor', 'devicenumber')
canch = canChannel('vendor', 'device', devicechannelindex) returns a CAN channel connected to a device from a specified vendor.
For Vector products, device is a combination of the device type and a device index, such as 'CANCaseXL 1'. For example, if there are two CANcardXL devices, device can be 'CANcardXL 1' or 'CANcardXL 2'.
For National Instruments CAN devices, use canch = canChannel('vendor', 'devicenumber'), where the vendor is the literal string 'NI', and the devicenumber is the interface number defined for the channel in NI Measurement & Automation Explorer.
You cannot have more than one active connection to the same NI device channel.
Use canHWInfo to obtain a list of available devices.
| BusLoad | Display load on CAN bus |
| Database | Store CAN database information |
| MessageReceivedFcn | Specify function to run |
| MessageReceivedFcnCount | Specify number of messages available before function is triggered |
| Running | Determine status of CAN channel |
| SilentMode | Specify if channel is active or silent |
| TransceiverName | Display name of CAN transceiver |
| TransceiverState | Display state or mode of CAN transceiver |
| UserData | Enter custom data |
| Device | Display CAN channel device type |
| Device(NI) | Display NI CAN channel device type |
| DeviceChannelIndex | Display CAN device channel index |
| DeviceSerialNumber | Display CAN device serial number |
| DeviceVendor | Display device vendor name |
| InitializationAccess | Determine control of device channel |
| BusSpeed | Display speed of CAN bus |
| NumOfSamples | Display number of samples available to channel |
| SJW | Display synchronization jump width (SJW) of bit time segment |
| TSEG1 | Display amount that channel can lengthen sample time |
| TSEG2 | Display amount that channel can shorten sample time |
canch = canChannel('Vector','CANCaseXL 1',1)
canch = canChannel('Vector','Virtual 1',2)
canch = canChannel('NI', 'CAN1')Notes You cannot use the same variable to create multiple channels sequentially. Clear any channel in use before using the same variable to construct a new CAN channel. You cannot create arrays of CAN channel objects. Each object you create must exist as its own individual variable. |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |