Write To File

<< Click to Display Table of Contents >>

Navigation:  Waijung Blockset > Block References > Misc > File Stream >

Write To File

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?

filestream_writetofile_block

What can be configured?

filestream_writetofile_mask

Configuration item

Selectable option/ Value

Description

Data type

double | single | int8 | uint8 | int16 | uint16 | int32 | uint32

Specific data type to write to file.

Sample time (sec)

(Sample time)

Specify block sample time

Input port

1. File path

This input port specify file name to open for Write. It can be:

1.1 String pointer, which from "Volatile Data Storage Read" block of variable type "String".

1.2 Vector data of uint8. Note: the data vector must contain 0 to indicate NULL terminate string, example: uint8(['file1.txt' 0])

2. Append

0 : Data write position start at 0 after open file.

non-zero :  Data append to last file position.

3. Data

Vector data to write to file.

4 Close

0 : Do not close file after write.

non-zero : Close file after write.

Output port

1. Status

0: Success, otherwise fail.

Demos

Device Boot Loader (SD Card)