
The Function Block BYTES2H formats a file size into a human-readable format.
The input defines the file size in bytes that is to be formatted.
Defines which format should be used for calculation. If the input is true, calculation will be done using the IEC format and units will be displayed accordingly.
The IEC Format calculates binary with 1024 steps. Otherwise, the SI standard with 1000 steps is used.
The input defines the number of decimal places as an integer to which it will be rounded.
The input defines the decimal point as a string. If no input is defined or the value equals NULL, then the string "." (dot) will be used.
The input defines the thousands separator as a string. If no input is defined or the value equals NULL, then the string "," (comma) will be used.
Defines the maximum number of levels with which to calculate. If no input is defined or the value equals NULL, then all units are used.
| Value | Units |
|---|---|
| NULL | All |
| 0 | Byte / Bytes |
| 1 | Kb / KiB |
| 2 | MB / MiB |
| 3 | GB / GiB |
| 4 | TB / TiB |
| 5 | EB / EiB |
| 6 | ZB / ZiB |
| 7 | YB / YiB |
Returns the formatted byte number as a string.