VNT empty timetable as result of receive J1939 Channel
8 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to use Vehicle Network Tools with J1939 communication.
As a first step I've tried code from example with some modifications (changed path to .dbc file, changed bus speed to 250k)
db = canDatabase('sourcedatabasefile.dbc')
chan = j1939Channel(db,'Vector','VN1610 1',1)
chan.configBusSpeed(250000)
start(chan)
pgrp = receive(chan,Inf)
stop(chan)
Unfortunately as a result I'm receiving empty timetable pgrp.
I've tried the same, but with configuring canChannel:
chan = canChannel('Vector','VN1610 1',1)
chan.configBusSpeed(250000)
start(chan)
rx = receive(chan,Inf)
stop(chan)
and rx is a timetable with raw CAN data.
Can anyone help if I'm missing something in my code or reason of receiving empty output is somewhere else?
0 个评论
回答(1 个)
Ayush
2025-7-16
编辑:Ayush
2025-7-16
Hi Greg,
I understand that you are encountering an empty timetable because your "J1939" channel isn't decoding any parameter groups and it's only receiving raw CAN frames. The "J1939" channel wrapper expects valid, decodable "J1939" frames defined in your DBC. If none match, "receive(chan, Inf)" function returns empty output.
The "canChannel" works because it returns raw CAN frames regardless of content, so I hope you understand the cause of the issue mentioned above.
You can read more about "j1939" channel parameters in the official documentation: https://www.mathworks.com/help/vnt/ug/j1939parametergrouptimetable.html
Hope it helps!
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!