Convert/Assign

Convert/Assign

 

This function block is used to convert signals of one data type to signals of another data type.

It can also be used to assign values of a single data type (if the input and the output have the same data type).

Parameters

The parameter dialog can be used to select the data type and the number of elements for the source and destination.

Signals

NameI/OType(s)Function
XIBIT, BYTE, WORD, FLOAT, LONGInput signal
YOBIT, BYTE, WORD, FLOAT, LONGOutput signal

Visualization

The color of the selected data types and the number of elements (if greater than one) will be depicted in the symbol.

Comments

The data type of the input can be assigned by creating a new connection.

If the data type is changed by the parameter dialog, all invalid connections will be deleted.

Example

The following example shows how to convert a BIT vector into a single WORD value and back into a BIT vector.