How to group same buses together over a MUX ?
2 次查看(过去 30 天)
显示 更早的评论
This is my Bus file :
%my_bus.m
cellarray = { ...
{ ...
'Status_Queue', ... % Bus Name
'status_queue.h', ... % Header File
'Queued Data', ... % Description
'Imported', {... % DataScope
{ 'Data_ID',1,'uint32',-1,'real','Sample','Fixed'} ; ...
{ 'Copy_ID',1,'uint8',-1,'real','Sample','Fixed'} ; ...
{ 'Data_X',1,'uint32',-1,'real','Sample','Fixed'} ; ...
{ 'Data_Y',1,'uint32',-1,'real','Sample','Fixed'} ; ...
} ...
}
{ ...
'Bus_Status_Queue', ... % Bus Name
'status_queue.h', ... % Header File
'Queued Data', ... % Description
'Imported', ... % DataScope
{...
{'Count', 1, 'uint8', -1, 'real', 'Sample', 'Fixed', [], [], sprintf(''), sprintf('Valid Messages.')}; ...
{'Data',5,'Bus: Status_Queue',-1,'real','Sample','Fixed'}; ...
} ...
}
};
Simulink.Bus.cellToObject(cellarray);
evalin('base','Status_unpackPtr = Simulink.Signal;');
evalin('base','Status_unpackPtr.RTWInfo.StorageClass = ''ImportedExternPointer'';');
The problem is, when I'm using MUX to group 5 different Status_Queue (which is a bus) for element 'Data' in Bus_Status_Queue, simulink throws an error stating it cannot group such signals. What is best way to group 5 Status_Queue and pass it to 'Data', using simulink blocks (not api/m-scripting) ?
Also will it be possible to resolve bus names to 5 different xyz_unpackPtr and then group them together ?
Any suggestion/help would be greatly appreciated. Thanks
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!