Engee documentation

Modbus Single to bytes

Create a vector consisting of two 16-bit integers (data type UInt16) from a single-precision floating-point number (data type Float32).

blockType: CFunction

Path in the library:

/RITM/RITM Modbus/Modbus Single to bytes

Description

The Modbus Single to bytes block is used to create a vector consisting of two 16-bit integers (data type UInt16) from a single-precision floating-point number (data type Float32). During conversion it is possible to set byte order in the final vector.

Ports

Input

# Single — floating point number
scalar

Details
Data types

Float32.

Complex numbers support

No

Output

# Bytes — the result of the conversion as two integers in the given byte order
scalar

Details
Data types

UInt16.

Complex numbers support

No

Parameters

Параметры:

# Порядок байтов: — byte order
ABCD | BADC | CDAB | DCBA

Details
Values

ABCD | BADC | CDAB | DCBA

Default value

ABCD

Program usage name

m_ByteOrder

Tunable

No

Evaluatable

Yes