====== TO_BCD_BYTE ====== {{:en:mervis-ide:35-help:to_bcd_byte.png}} ===== Function name ===== TO_BCD_BYTE ===== ST call ===== PROGRAM TO_BCD_BYTE_DEMO VAR B: BYTE; U: UDINT; END_VAR B:= TO_BCD_BYTE(IN1:=U); END_PROGRAM ===== Description ===== The function converts any integer number (ANY_INT) to a binary-coded decimal bit array (BYTE). For example, 36 is converted to 2#0011_0110 (54 decimal). ===== Inputs ===== |Input|Type |Description| |IN1 |ANY_INT|Input value| ===== Outputs ===== |Output|Type|Description | |=> |BYTE|Output value| ===== Application example ===== {{:en:mervis-ide:35-help:to_bcd_byte_example.png}}