FA_WRITE
Writes integer variables to a binary file. This procedure makes a sequential access to the file, from the previous position. The first call after F_WOPEN writes the first four bytes of the file, each call pushes the writing pointer.
IMPORTANT:
Avoid using this function. This function is
intended to be obsolete.

Arguments | ||
---|---|---|
ID | DINT | File number: returned by F_WOPEN |
IN | DINT | Integer value to be written in the file |
OK | BOOL | Execution status: TRUE if ok |
Example
(* FBD program using file management blocks *)

(* ST Equivalence: *)
file_id := F_WOPEN('voltramp.bin'); nb_written := 0; nb_written := nb_written + dint(FA_WRITE(file_id,vstart)); nb_written := nb_written + dint(FA_WRITE(file_id,vend)); nb_written := nb_written + dint(FA_WRITE(file_id,vinc)); nb_written := nb_written + dint(FA_WRITE(file_id,dint(delta_tim))); ok := F_CLOSE(file_id); IF ( nb_written <> 4) THEN ERROR := ERR_FILE; END_IF;
Provide Feedback