Converting serial data to signal values

Hi all,
I have a test device which outputs serial data which I'm trying to capture and convert into signals, I've been experiementing and have managed to get some progress, but I'm really struggling to deal with when the data length changes EG because a value goes into double digits. This is my current system:
At the moment the serial recieve block is set to match the data length shown in the display on the right, as soon as the data values start to increase I start to lose data. Any tips?
Thanks!

Respuestas (1)

Akash
Akash el 22 de Dic. de 2023

0 votos

Hi Kieran,
I understand that you are facing challenges with capturing and converting serial data into signals when the data length changes. To address this issue, you might consider implementing delimiters to mark the start and end of your signals and working with a fixed-size signal structure.
You can utilize the following discussion link, which addresses the generation of fixed length signals from serial data transmission:-
To gain more information on how to handle variable-size signals with the 'Serial Send block' in Simulink, you may find the below provided discussion helpful:-
I hope it helps,
Thanks and regards,
Akash.

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Etiquetas

Preguntada:

el 11 de Mayo de 2022

Respondida:

el 22 de Dic. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by