can database - Message Cyclic & Trigger

조회 수: 48 (최근 30일)
Mingqi Shi
Mingqi Shi 2018년 9월 14일
답변: Carlos Orduno 2019년 12월 11일
I have a questions about canDatabase in MATLAB. From vector tool CANdb, whether/how a CAN message is transmitted can be shown inside Tx Method & Cycle Time, as shown in figure 'CANdb'; However, If I type script 'h = canDatabase('database.dbc')', The most similar information inside 'h' I could find is from 'h.MessageInfo(i).AtrributeInfo', as show in figure 'MessageInfo' . How could I find/match the related information to CANdb? I need to obtain the string(whether 'FixedPeriodic', 'Event Periodic' or 'Event') for some further purpose.
  댓글 수: 1
Carlos Orduno
Carlos Orduno 2019년 12월 10일
I have the same question, were you able to figure this out?

댓글을 달려면 로그인하십시오.

답변 (1개)

Carlos Orduno
Carlos Orduno 2019년 12월 11일
I finally found it.
View Message Attribute Information
View message attribute information from CAN database.
db = canDatabase('J1939DB.dbc');
db.Messages
'A1'
'A1DEFI'
'A1DEFSI'
db.MessageInfo(1).Attributes
a = db.MessageInfo(1).Attributes
a =
'GenMsgCycleTime'
'GenMsgCycleTimeFast'
'GenMsgDelayTime'
'VFrameFormat'
info = attributeInfo(db,'Message','GenMsgCycleTime','A1')
Name: 'GenMsgCycleTime'
ObjectType: 'Message'
DataType: 'Undefined'
DefaultValue: 0
Value: 500

태그

제품


릴리스

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by