FM_READ

Reads message variables from a binary file. For use with F_ROPEN and F_CLOSE. This procedure makes a sequential access to the file, from the previous position. The first call after F_ROPEN reads the first string of the file, each call pushes the reading pointer. A string is a terminated by null (0), end of line ('\n') or return ('\r'); To check if the end of file is reached, use F_EOF.
IMPORTANT: Avoid using this function. This function is intended to be obsolete.
lrsf_fmr1
Arguments
ID
DINT
file number: returned by F_ROPEN
Q
MESSAGE
message value read from file
Example
(* FBD program using file management blocks *)
lrsf_fmr2
(* ST Equivalence: *)
file_id := F_ROPEN('voltramp.bin'); status1 := FM_READ(file_id); status2 := FM_READ(file_id); IF (F_EOF(file_id)) THEN error := err_file; unused_eof_mes := FM_READ(file_id); END_IF; ok := F_CLOSE(file_id);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal