177
ifm
Programming Manual BasicDisplay CR0452 v03.02
05 / 2018
ifm function elements
ifm function elements for the device CR0452
GET_TEXT_FROM_FLASH
3196
Unit type = function block (FB)
Unit is contained in the library
ifm_PDMsmart_UTIL_Vxxyyzz.Lib
Symbol in CODESYS:
>
Description
11651
GET_TEXT_FROM_FLASH controls
FLASH_READ
(
) to directly read text of type STRING.
As opposed to PDM360 and PDM360compact, PDM360smart has no file system. Therefore flash
memories or FLASH memories are recommended to store text messages. To read these memory
areas FLASH_READ is needed.
To ensure reading of one or several texts, the start address of the text in the memory must be
calculated. This calculation and setting/resetting of the ENABLE input are made in
GET_TEXT_FROM_FLASH.
The texts in the memory must be organised according to the rules below:
Text length
The text length should be the same for all texts and is limited to max. 30 characters because of the
display size of the device.
Text creation
The texts should be created using a spreadsheet program (e.g. Excel) and then saved in CSV format.
This CSV file can be directly loaded to the requested memory area using the
ifm
maintenance tool.
Download
A STRING is automatically terminated with a NULL byte by the programming system. Therefore a text
of 30 characters uses 31 bytes in the memory. The FB takes this into account for the calculation.
From the indicated flash memory of the device (
→ chapter
Available memory
(
)) subtract 128
bytes for the header. Thus with text length of 30 characters 65 408 / 31 = 2 109 texts can be saved in
the flash memory.