Documentation

xPCFSScSetWriteMode

Specify when file allocation table entry is updated

Prototype

void xPCFSScSetWriteMode(int port, int scNum, int writeMode);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

scNum

Enter the scope number.

writeMode

Enter an integer for the write mode:

 

0

Enables lazy write mode

 

1

Enables commit write mode

Description

The xPCFSScSetWriteMode function specifies when a file allocation table (FAT) entry is updated. Both modes write the signal data to the file, as follows:

0

Lazy mode. The FAT entry is updated only when the file is closed and not during each file write operation. This mode is faster than commit mode. However, if the system crashes before the file is closed, the file system does not have the actual file size. (The file contents, however, are intact.)

1

Commit mode. Each file write operation simultaneously updates the FAT entry for the file. This mode is slower than lazy mode, but the file system maintains the actual file size.

Introduced before R2006a

Was this topic helpful?