In what format does Simulink export signals?

2 次查看(过去 30 天)
Hello everyone! I have a simple question. What format are Simulink signals in and specifically what format are they exported in? For example, say I connect a constant of 2 in the format Double to a UDP-Send block. Then at the other end of the network I receive UDP packets with an arbitrary device and program which just lists all data received, what would show up? Would I get the number 2, or would I get the binary equivalent or perhaps the Hex value?
Thanks a lot for your info!

回答(1 个)

Mark McBroom
Mark McBroom 2016-4-6
Since the data type of the signal is double, Simulink would send 8 bytes (64 bits) representing the number in IEEE 754 format.
  1 个评论
Walter Roberson
Walter Roberson 2016-4-6
Note that unless you specifically arranged otherwise, the byte order would be the byte order of the sending system, which would be "little endian" on all currently supported platforms. However, the networking standards are that if not otherwise specified, numbers should be sent in "big endian".

请先登录,再进行评论。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by