FM_WRITE

Writes message variables to a binary file. For use with F_WOPEN and F_CLOSE. A message is written in the file as a null terminated string. This procedure makes a sequential access to the file, from the previous position. The first call after F_WOPEN writes the first string to the file, each call pushes the writing pointer.
IMPORTANT: Avoid using this function. This function is intended to be obsolete.
lrsf_fmw1
Arguments
ID
DINT
File number: returned by F_WOPEN
IN
MESSAGE
Message value to be written in the file
OK
BOOL
Execution status: TRUE if successful
Example
(* FBD program using file management blocks *)
lrsf_fmw2
(* ST Equivalence: *)
file_id := F_WOPEN('trace.txt'); ok := FM_WRITE(file_id,'First message'); ok := FM_WRITE(file_id,'Last message'); ok := F_CLOSE(file_id);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal