Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function
WRITEC_f
Write binary data
Block Screenshot
Contents
Palette
Description
This block allows user to write data in a C binary file.
Dialog box
Input size
a scalar, the size of the input.
Properties : Type 'vec' of size 1
Output file name
a character string defining the output file name.
Properties : Type 'str' of size 1
Output Format
a character string defining the format to use.
Properties : Type 'str' of size 1
Buffer size
To improve efficiency it is possible to buffer the input data. read on the file is only done after eachBuffer size call to the block.
Properties : Type 'vec' of size 1
Swap mode 0/1
WithSwap mode=1 the file is supposed to be coded in ``little endian IEEE format'' and data are swaped if necessary to match the IEEE format of the processor. IfSwap mode=0 then automatic bytes swap is disabled.
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: writec
Interfacing function
SCI/modules/scicos_blocks/macros/Sinks/WRITEC_f.sci
Computational function
SCI/modules/scicos_blocks/src/c/writec.c (Type 2)
Authors
Ramine Nikoukhah - INRIA
Comments
I'm searching for help with the Wfilec_f block. I would just like to use the output of my xcos-file in Excel. But the file generated by the Writec_f-block can't be read by excel or Windows-Editor (binary isn't read).
Would be very nice if someone can help me/give me a link with explanations.
Have a nice day,
Marthe
You need to write a short Scilab Script like this:
fdT=mopen('binary_file', 'rb');
binary_data=mget(1000, 'f', fdT); //change the number with the size of your data (2columns of 500 data-->1000)
fdT2=mopen('text_file.txt', 'wt');
for i=1:500,
mfprintf(fdT2,'%f %f\n',binary_data(2*i-1),binary_data(2*i));
end
mclose('all');
You will have the "text_file.txt" in your PWD-Folder and can use it with Excel.
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "scicosim" function.
Save your data and restart Scilab.
Even changing the path, I sure I'm in a writable location and it creates the file but empty.
Any clue about what is the problem?
Add a comment:
Please login to comment this page.