23
23
* See the file ./license.txt
25
25
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="WFILE_f" xml:lang="en_US">
27
<refname>WFILE_f</refname>
28
<refpurpose>Write to output file</refpurpose>
31
<title>Block Screenshot</title>
35
<imagedata align="center" fileref="../../../../images/palettes/WFILE_f.png" valign="middle"/>
40
<refsection id="Contents_WFILE_f">
41
<title>Contents</title>
45
<link linkend="WFILE_f">Write to output file</link>
52
<xref linkend="Palette_WFILE_f">Palette</xref>
57
<xref linkend="Description_WFILE_f">Description</xref>
62
<xref linkend="Datatype_WFILE_f">Data types</xref>
68
<xref linkend="Dialogbox_WFILE_f">Dialog box</xref>
74
<xref linkend="Defaultproperties_WFILE_f">Default properties</xref>
80
<xref linkend="Example_WFILE_f">Example</xref>
86
<xref linkend="Interfacingfunction_WFILE_f">Interfacing function</xref>
92
<xref linkend="Computationalfunction_WFILE_f">Computational function</xref>
98
<xref linkend="Seealso_WFILE_f">See also</xref>
106
<refsection id="Palette_WFILE_f">
107
<title>Palette</title>
111
<link linkend="Sinks_pal">Sinks palette</link>
116
<refsection id="Description_WFILE_f">
117
<title>Description</title>
119
This block allows user to save data in a file with the name defined with the <emphasis role="bold">Output File Name</emphasis> parameter, in text formatted mode or in binary mode.
122
The file is a sequence of records. Each record has a length <emphasis role="bold">Output Size</emphasis> <literal> + 1 </literal> and the structure shown below:
125
<mediaobject><imageobject>
126
<imagedata fileref="../../../images/sinks_pal/en_US/wfile_f_record_en_US.png" align="center" />
127
</imageobject></mediaobject>
129
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
130
bloc writes a record in the file.
133
The <emphasis role="bold">Output Format</emphasis> parameter gives the record format.
138
For a binary file, this parameter is an empty string.
143
For a text file, this parameter is a string of format (Fortran syntax) enclosed by parentheses.
149
<refsection id="Datatype_WFILE_f">
150
<title>Data types</title>
155
Input: a scalar or a column vector of length <emphasis role="bold">Input Size</emphasis>.
160
<refsection id="Dialogbox_WFILE_f">
161
<title>Dialog box</title>
165
<imagedata align="center" fileref="../../../gui/sinks_pal/en_US/WFILE_f_gui.png" valign="middle"/>
173
<emphasis role="bold">Input Size</emphasis>
175
<para>A scalar, the size of the input column vector.</para>
176
<para>Properties : Type 'vec' of size 1.</para>
180
<emphasis role="bold">Output File Name</emphasis>
183
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
184
like <emphasis>HOME</emphasis> in the path, by example <emphasis>"HOME/my_datas/foo.datas"</emphasis>. Without
185
file path, the file is writen in the directory defined by the <emphasis>PWD</emphasis> variable.
187
<para>The directory path must exist, otherwise you will be prompted by an error message.</para>
188
<para>Properties : Type 'str' of size 1.</para>
192
<emphasis role="bold">Output Format</emphasis>
195
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
196
end by a right parenthesis. Example: <emphasis>(10e3)</emphasis>
198
<para>Properties : Type 'str' of size 1.</para>
202
<emphasis role="bold">Buffer Size</emphasis>
205
To improve efficiency it is possible to buffer the input data. Data writing on the file is only done
206
after the filling of the buffer and at the end of simulation.
208
<para>Properties : Type 'vec' of size 1.</para>
212
<refsection id="Defaultproperties_WFILE_f">
213
<title>Default properties</title>
217
<emphasis role="bold">always active:</emphasis> no
222
<emphasis role="bold">direct-feedthrough:</emphasis> yes
227
<emphasis role="bold">zero-crossing:</emphasis> no
232
<emphasis role="bold">mode:</emphasis> no
237
<emphasis role="bold">regular inputs:</emphasis>
240
<emphasis role="bold">- port 1 : size [1,1] / type 1</emphasis>
245
<emphasis role="bold">number/sizes of activation
253
<emphasis role="bold">number/sizes of activation
261
<emphasis role="bold">continuous-time state:</emphasis>
267
<emphasis role="bold">discrete-time state:</emphasis> yes
272
<emphasis role="bold">object discrete-time state:</emphasis>
278
<emphasis role="bold">name of computational function:</emphasis>
279
<emphasis role="italic">writef</emphasis>
285
<refsection id="Example_WFILE_f">
286
<title>Example</title>
288
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
289
the file <emphasis>"TMPDIR/wfile_f.text"</emphasis>. Then you can read these data with the block
290
<link linkend="RFILE_f">RFILE_f</link>.
291
<link type="scilab" linkend="scilab.xcos/xcos/examples/sinks_pal/en_US/wfile_f_en_US.xcos">
292
Open this example in Xcos
296
<inlinemediaobject><imageobject>
297
<imagedata align="center" fileref="../../../examples/sinks_pal/en_US/wfile_f_diagram_en_US.png" />
298
</imageobject></inlinemediaobject>
300
<emphasis>After the simulation</emphasis> of this example, you can see the contents of the file with <emphasis>Scinotes</emphasis> with the following command:
303
<programlisting role="exec"><![CDATA[scinotes(TMPDIR + "/wfile_f.txt")]]></programlisting>
306
<refsection id="Interfacingfunction_WFILE_f">
307
<title>Interfacing function</title>
310
<para><link type="scilab" linkend="scilab.scinotes/scicos_blocks/macros/Sinks/WFILE_f.sci">SCI/modules/scicos_blocks/macros/Sinks/WFILE_f.sci</link></para>
314
<refsection id="Computationalfunction_WFILE_f">
315
<title>Computational function</title>
318
<para>SCI/modules/scicos_blocks/src/fortran/writef.f (Type 0)</para>
323
<refsection role="see also" id="Seealso_WFILE_f">
324
<title>See also</title>
327
<link linkend="RFILE_f">RFILE_f</link>
330
<link linkend="READC_f">READC_f</link>
333
<link linkend="WRITEC_f">WRITEC_f</link>
27
<refname>WFILE_f</refname>
28
<refpurpose>Write to output file. <emphasis role="bold">This function is obsolete.</emphasis></refpurpose>
31
<title>Block Screenshot</title>
35
<imagedata align="center" fileref="../../../../images/palettes/WFILE_f.png" valign="middle"/>
40
<refsection id="Contents_WFILE_f">
41
<title>Contents</title>
45
<link linkend="WFILE_f">Write to output file</link>
52
<xref linkend="Palette_WFILE_f">Palette</xref>
57
<xref linkend="Description_WFILE_f">Description</xref>
62
<xref linkend="Datatype_WFILE_f">Data types</xref>
68
<xref linkend="Dialogbox_WFILE_f">Dialog box</xref>
74
<xref linkend="Defaultproperties_WFILE_f">Default properties</xref>
80
<xref linkend="Example_WFILE_f">Example</xref>
86
<xref linkend="Interfacingfunction_WFILE_f">Interfacing function</xref>
92
<xref linkend="Computationalfunction_WFILE_f">Computational function</xref>
98
<xref linkend="Seealso_WFILE_f">See also</xref>
106
<refsection id="Palette_WFILE_f">
107
<title>Palette</title>
111
<link linkend="Sinks_pal">Sinks palette</link>
116
<refsection id="Description_WFILE_f">
117
<title>Description</title>
119
This block is <emphasis role="bold">obsolete</emphasis>. This block allows user to save data in a file with the name defined with the <emphasis role="bold">Output File Name</emphasis> parameter, in text formatted mode or in binary mode.
122
The file is a sequence of records. Each record has a length <emphasis role="bold">Output Size</emphasis> <literal> + 1 </literal> and the structure shown below:
125
<mediaobject><imageobject>
126
<imagedata fileref="../../../images/sinks_pal/en_US/wfile_f_record_en_US.png" align="center" />
130
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
131
bloc writes a record in the file.
134
The <emphasis role="bold">Output Format</emphasis> parameter gives the record format.
139
For a binary file, this parameter is an empty string.
144
For a text file, this parameter is a string of format (Fortran syntax) enclosed by parentheses.
150
<refsection id="Datatype_WFILE_f">
151
<title>Data types</title>
156
Input: a scalar or a column vector of length <emphasis role="bold">Input Size</emphasis>.
161
<refsection id="Dialogbox_WFILE_f">
162
<title>Dialog box</title>
166
<imagedata align="center" fileref="../../../gui/sinks_pal/en_US/WFILE_f_gui.png" valign="middle"/>
174
<emphasis role="bold">Input Size</emphasis>
176
<para>A scalar, the size of the input column vector.</para>
177
<para>Properties : Type 'vec' of size 1.</para>
181
<emphasis role="bold">Output File Name</emphasis>
184
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
185
like <emphasis>HOME</emphasis> in the path, by example <emphasis>"HOME/my_datas/foo.datas"</emphasis>. Without
186
file path, the file is writen in the directory defined by the <emphasis>PWD</emphasis> variable.
188
<para>The directory path must exist, otherwise you will be prompted by an error message.</para>
189
<para>Properties : Type 'str' of size 1.</para>
193
<emphasis role="bold">Output Format</emphasis>
196
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
197
end by a right parenthesis. Example: <emphasis>(10e3)</emphasis>
199
<para>Properties : Type 'str' of size 1.</para>
203
<emphasis role="bold">Buffer Size</emphasis>
206
To improve efficiency it is possible to buffer the input data. Data writing on the file is only done
207
after the filling of the buffer and at the end of simulation.
209
<para>Properties : Type 'vec' of size 1.</para>
213
<refsection id="Defaultproperties_WFILE_f">
214
<title>Default properties</title>
218
<emphasis role="bold">always active:</emphasis> no
223
<emphasis role="bold">direct-feedthrough:</emphasis> yes
228
<emphasis role="bold">zero-crossing:</emphasis> no
233
<emphasis role="bold">mode:</emphasis> no
238
<emphasis role="bold">regular inputs:</emphasis>
241
<emphasis role="bold">- port 1 : size [1,1] / type 1</emphasis>
246
<emphasis role="bold">number/sizes of activation
254
<emphasis role="bold">number/sizes of activation
262
<emphasis role="bold">continuous-time state:</emphasis>
268
<emphasis role="bold">discrete-time state:</emphasis> yes
273
<emphasis role="bold">object discrete-time state:</emphasis>
279
<emphasis role="bold">name of computational function:</emphasis>
280
<emphasis role="italic">writef</emphasis>
286
<refsection id="Example_WFILE_f">
287
<title>Example</title>
289
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
290
the file <emphasis>"TMPDIR/wfile_f.text"</emphasis>. Then you can read these data with the block
291
<link linkend="RFILE_f">RFILE_f</link>.
292
<link type="scilab" linkend="scilab.xcos/xcos/examples/sinks_pal/en_US/wfile_f_en_US.xcos">
293
Open this example in Xcos
298
<inlinemediaobject><imageobject>
299
<imagedata align="center" fileref="../../../examples/sinks_pal/en_US/wfile_f_diagram_en_US.png" />
303
<emphasis>After the simulation</emphasis> of this example, you can see the contents of the file with <emphasis>Scinotes</emphasis> with the following command:
306
<programlisting role="exec"><![CDATA[scinotes(TMPDIR + "/wfile_f.txt")]]></programlisting>
309
<refsection id="Interfacingfunction_WFILE_f">
310
<title>Interfacing function</title>
314
<link type="scilab" linkend="scilab.scinotes/scicos_blocks/macros/Sinks/WFILE_f.sci">SCI/modules/scicos_blocks/macros/Sinks/WFILE_f.sci</link>
319
<refsection id="Computationalfunction_WFILE_f">
320
<title>Computational function</title>
323
<para>SCI/modules/scicos_blocks/src/fortran/writef.f (Type 0)</para>
328
<refsection role="see also" id="Seealso_WFILE_f">
329
<title>See also</title>
332
<link linkend="RFILE_f">RFILE_f</link>
335
<link linkend="READC_f">READC_f</link>
338
<link linkend="WRITEC_f">WRITEC_f</link>
343
<title>History</title>
346
<revnumber>5.4.0</revnumber>
347
<revremark>WFILE_f block declared as obsolete.</revremark>