How to configure byte unpack?
Afficher commentaires plus anciens
Hi, I have a client-server aplication and I am sending udp packets to the server. The server takes this packets and return it to matlab. When I send packets the total size is 16 bytes (2 doubles) so I am sure that the size of returning packet is 16 byte. Then I have to unpack and for that I have the next configuration:

I think I am doing well but simulink has another opinion. The error it gives is the next:

Thanks
Réponses (1)
Dimitri MANKOV
le 7 Juil 2022
0 votes
Hi Ander,
I'm not sure whether the Byte Unpack block is capable of outputting matrix signals... But most importantly, the dimensions don't seem to match what you're trying to achieve: if you know that you get a vector of 16 bytes as an input and want to have 2x double signals as the output, you should use the following parameters:
- Output data type: {'double', 'double'}
- Output dimension: {[1],[1]}
... if you want two output ports, or:
- Output data type: {'double'}
- Output dimension: {[2]}
... if you'd prefer one output port with a vector signal.
I hope this is helpful!
Dimitri
Catégories
En savoir plus sur Vehicle Network Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!