canChannel
Construct CAN channel connected to specified device
Syntax
Description
returns a CAN channel connected to a device from a specified vendor.canch
= canChannel(vendor
,device
,devicechannelindex
)
For Vector products, device
is a character vector that
combines 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'
.
Use
for National Instruments™ and PEAK-System devices.canch
= canChannel(vendor
,device
)
For National Instruments, vendor
is the character vector
'NI'
, and the devicenumber
is interface
number defined in the NI Measurement & Automation Explorer.
For PEAK-System devices vendor
is the character vector
'PEAK-System'
, and the devicenumber
is
device number defined for the channel.
Examples
Input Arguments
Output Arguments
Tips
Use
canChannelList
to obtain a list of available devices.You cannot have more than one
canChannel
configured on the same NI-XNET or PEAK-System device channel.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.
Version History
Introduced in R2009a