Syntax

set_param_dbc(b,dbcfilename,bo,dir,ioboardtype,boardno,netno,canidformat,importcompatname,splitlongsignals)

Description

set_param_dbc configures the specified instance of the DBC CAN block.

Assumptions:

Arguments

b
Block name, specified as a string as returned by the gcb command.
dbcfilename
Full path and file name of the .dbc file.
bo
Message information, specified as one of the following:
dir
RTDB variable direction, specified as one of the following:
ioboardtype
I/O board type, specified as one of the following:
boardno
Board number, specified as an integer in the [1,4] range.
netno
Net number, specified as an integer in the [0,3] range.
canidformat
Flag indicating the CAN ID format, specified as one of the following:
importcompatname
Flag indicating whether the RTDB variable name should follow the pattern used by the DBC Import I/O device in the Control Center. Specified as one of the following:
splitlongsignals
Flag indicating whether signals that are longer than 32-bits must be split into 1-byte sub-signals, specified as one of the following:

Example:

load_system('simwbCustomBlocklib');
% m is the name of the model 
open_system(m)
b = sprintf('%s/my_blk',m);
add_block('simwbCustomBlocklib/DBC_CAN',b)
dbcfilename = fullfile(pwd,'my_dbc.dbc');
bo_id = 42;
dir = 1;
ioboardtype = 1;
boardno = 1;
netno = 2;
canidformat = 2;
importcompatname = 0;
splitlongsignals = 0;
set_param_dbc(b,dbcfilename,bo_id,dir,ioboardtype,boardno,netno,canidformat,importcompatname,splitlongsignals);

See also: