Download Print this page

Omron NS Reference Manual page 57

Hide thumbs Also See for NS:

Advertisement

Section2 Functions
NS series Macro Reference
WRITECF
Saves the contents of a PT memory in a memory card (CF)
Applicable versions
Format
Function
Return Value
Example
System version 3 or higher
WRITECF (Mem, Size, File, Dev)
Saves the contents of PT memory in the specified file of Memory Card. The
contents of the specified address will be written to the file in binary format.
Mem: Top address of source data. ($W, $HW or $SW) Index can be used.
Setting range for $W is between 0 and 32767, and for $HW is between 0
and 8191. $B, $HB or $SB can not be specified.
Size: Data size to be saved in a Memory Card. (unit; word)
Data size can be specified using long word directly, $W or $HW (uses 2
words)
indirectly. Setting range for $W is between 0 and 32767 and for $HW is
between 0 and 8191. If the set value has been exceeded the maximum, an
access error will occur and an error message will appear
File: Destination file name
The file name can be specified using character string directly or using $W or
$HW (uses 2 words) indirectly. If the specified file name for "F" already
exists, the file name will be overwritten without showing a confirmation
message. (Return value will be 0 (Completed normally)). Up to 43
alphanumerical
characters ("0 to 9", "A to Z", "a to z", "$", "_") including extension can be set
for the file name.
Dev: Always specify 0 since destination will be a Memory Card only.
0: Completed normally
-1: Failed to save data
1. $W100=WRITECF($W1000, 128, "CF_FILE.BIN", 0);
2. $W2000L=128;
STRCPY($W2002, "CF_FILE.BIN");
$W100=WRITECF($W1000, $W2000, $W2002, 0);
37

Advertisement

loading

This manual is also suitable for:

Ns-series