Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Ajuda do Scilab >> Xcos > palettes > Sinks palette > WFILE_f

WFILE_f

Write to output file. This function is obsolete.

Block Screenshot

Description

This block is obsolete, use WRITEC_f instead.

This block allows user to save data in a file with the name defined with the Output File Name parameter, in text formatted mode or in binary mode.

The file is a sequence of records. Each record has a length Output Size + 1 and the structure shown below:

where the first field is the date of the event received on the activation input of the block during the simulation and other fields the regular input data. Each call to the bloc writes a record in the file.

The Output Format parameter gives the record format.

  • For a binary file, this parameter is an empty string.

  • For a text file, this parameter is a string of format (Fortran syntax) enclosed by parentheses.

Data types

  • Input: a scalar or a column vector of length Input Size.

Dialog box

  • Input Size

    A scalar, the size of the input column vector.

    Properties : Type 'vec' of size 1.

  • Output File Name

    A character string defining the path and the file name of the file to be written. The block support file name expansion and you can use environment variables like HOME in the path, by example "HOME/my_datas/foo.datas". Without file path, the file is writen in the directory defined by the PWD variable.

    The directory path must exist, otherwise you will be prompted by an error message.

    Properties : Type 'str' of size 1.

  • Output Format

    A character string defining the Fortran format to use or nothing for an unformatted (binary) write. If given, the format must began by a left parenthesis and end by a right parenthesis. Example: (10e3)

    Properties : Type 'str' of size 1.

  • Buffer Size

    To improve efficiency it is possible to buffer the input data. Data writing on the file is only done after the filling of the buffer and at the end of simulation.

    Properties : Type 'vec' of size 1.

Default properties

  • always active: no

  • direct-feedthrough: yes

  • zero-crossing: no

  • mode: no

  • regular inputs:

    - port 1 : size [1,1] / type 1

  • number/sizes of activation inputs: 1

  • number/sizes of activation outputs: 0

  • continuous-time state: no

  • discrete-time state: yes

  • object discrete-time state: no

  • name of computational function: writef

Example

In this example the block is used to record the output and its inverse of the sine wave generator. A multiplexer form the input vector of the WFILE_f block which record the data in the file "TMPDIR/wfile_f.text". Then you can read these data with the block RFILE_f. Open this example in Xcos .

After the simulation of this example, you can see the contents of the file with Scinotes with the following command:

scinotes(TMPDIR + "/wfile_f.txt")

Interfacing function

  • SCI/modules/scicos_blocks/macros/Sinks/WFILE_f.sci

Computational function

  • SCI/modules/scicos_blocks/src/fortran/writef.f (Type 0)

See also

History

VersãoDescrição
5.4.0 WFILE_f block declared as obsolete.
Report an issue
<< TRASH_f Sinks palette WRITEAU_f >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:57:50 CEST 2014