Reads from a file present in flash a set of data, which is stored in consecutive real registers or in a specified real array.
It is like f_read_table(), but is checked for overflow from the specified buffer buff.
An additional difference is that it is not possible to start at any index of an array of reals or structures, but only at the beginning.
The function should be used only by passing correct parameters. It is not recommended to use it normally.
NOTE: If less data is read, the function fills the remainder with the last read.
Syntax |
i32 f_read_table_s (string fileName, i32 nEntry, i32 nData, * buff [, i32 nRows=NULL]) |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fileName |
Name of the file to read data from. It must also contain the partition of the flash |
||||||||||||||||||||
nEntry |
It is the number of entries in the table |
||||||||||||||||||||
nData |
Number of data per entry (max 128), i.e., number of data for each line in the file. The line however can be a maximum of 256 characters long |
||||||||||||||||||||
buff |
Must be a variable of one of the following types: •array of variables of type stru_cam •real register rr or nvrr, from which the cam data read from the file must be stored •local array of real variables in which the cam data read from the file is to be stored •array of structures that contain only real variables |
||||||||||||||||||||
nRows |
Returns the number of valid lines read. (optional, default NULL) (from RTE 34.24.8) |
||||||||||||||||||||
Result |
Returns:
|
||||||||||||||||||||
Validity |
Task |
||||||||||||||||||||
Note |
If functions regarding compact flash management are used, it is recommended that bit 14 of the sys_cfg variable (0x00004000) be imposed to 1, to enable the use of safety routines for flash writing/reading |
The data obtained will then be used in the rules for executing the mv_table() and mv_cam() functions.
The data contained within the file must respect the following:
•maximum line size: 128 characters
•maximum single item size: 18
Example of use:
|