how to convert numeric to string in Simulink?

5 Ansichten (letzte 30 Tage)
inhyung Song
inhyung Song am 2 Nov. 2015
Kommentiert: Stefan Raab am 2 Nov. 2015
hello,
I have a problem with converting nemeric to string in simulink.
I want to send a message 'M+' through RS232(depace).
so I know the M is 77, + is 43 in ascii code.
using constant,convert block and display block,i want to check the result.
but it's not easy to work in simulink... (I've change the block condition , unit 16)
please advice to me.
  1 Kommentar
Stefan Raab
Stefan Raab am 2 Nov. 2015
According to my search, strings are not a valid datatype for Simulink. You could log the uint-signal which represents your ASCII code and work with it in MATLAB (there you can simply use i.e. char(77) to get 'M').
Best regards, Stefan

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by