How to group same buses together over a MUX ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!