matlab/matlab-agentic-toolkit / skills-catalog/test-and-measurement/matlab-use-vehicle-network
matlab-use-vehicle-network
UnverifiedUse when setting up vehicle network communication in MATLAB using Vehicle Network Toolbox. Covers CAN/CAN FD (fully implemented), with architecture for J1939, XCP, and future protocols. Handles hardware discovery, channel creation, bus configuration, message exchange, signal encoding/decoding, and analysis across all supported vendors. (Vector, Kvaser, PEAK-System, NI, SocketCAN, MathWorks Virtual).
references/can/channel-creation.md
View on GitHub# Channel Creation
## canChannel
```matlab
% CAN Classic
ch = canChannel(vendor, device, chIndex);
% CAN FD via ProtocolMode
ch = canChannel(vendor, device, chIndex, 'ProtocolMode', 'CAN FD');
```
## canFDChannel
```matlab
% Dedicated CAN FD constructor
ch = canFDChannel(vendor, device, chIndex);
ch = canFDChannel(vendor, device); % for vendors without channel index
```
## Vendor-Specific Syntax
```matlab
% Vector (3-arg: vendor, device, channel index)
ch = canChannel("Vector", "VN1610 1", 1);
ch = canChannel("Vector", "Virtual 1", 2);
% Kvaser (3-arg: vendor, device, channel index)
ch = canChannel("Kvaser", "USBcan Pro 1", 1);
% NI (2-arg: no channel index)
ch = canChannel("NI", "CAN1");
% PEAK-System (2-arg: no channel index)
ch = canChannel("PEAK-System", "PCAN_USBBUS1");
% SocketCAN (2-arg: interface name)
ch = canChannel("SocketCAN", "can0");
% MathWorks Virtual (3-arg)
ch = canChannel("MathWorks", "Virtual 1", 2);
```
## Constraints
- Device string must match `canChannelList` output exactly
- Only one object can hold **InitializationAccess** per physical channel
- **NI-XNET and PEAK-System:** cannot have more than one `canChannel` on the same device channel
- Cannot reuse the same variable — must `clear` before creating a new channel in that variable
- Cannot create arrays of CAN channel objects — each must be its own variable
- Failing to `clear`/`stop` old channel objects locks the hardware
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |