Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
The following figure shows a programming example. If the write buffer def[] is BYTE data, 100 bytes of
data is written to the file.
LD
FileWrite_instance
A
Execute
abc
FileID
def[0]
WriteBuf
UINT#100
Size
The FileWrite instruction writes the contents of the write buffer WriteBuf[] to the position
of the file position indicator in the file specified by FileID in the SD Memory Card. Then
the data size that is actually written is output to WriteSize.
WriteBuf[0] =def[0]
WriteBuf[1] =def[1]
:
:
WriteBuf[99]=def[99]
Size
UINT#100
Writing is performed for 100 elements.
Related System-defined Variables
Name
_Card1Ready
SD Memory Card Ready
Flag
*2
SD Memory Card Write
_Card1Protect
Protected Flag
2-1274
ghi
FileWrite
Done
Busy
jkl
mno
Error
ErrorID
pqr
WriteSize
stu
BYTE#16#00
Written.
BYTE#16#AB
:
BYTE#16#24
One-hundred elements are written to the position of the file
position indicator. The def[] array is a BYTE array, so 100
bytes are written.
Meaning
Data type
BOOL
BOOL
ST
FileWrite_instance(A, abc, def[0], UINT#100, ghi,
jkl, mno, pqr, stu);
File FileID = abc
00AB
WriteSize UINT#100
The data that was actually written was 100 bytes.
This flag indicates if the SD Memory Card can be accessed
by instructions and communications commands.
TRUE: Can be used.
FALSE: Cannot be used.
This flag indicates if the SD Memory Card is write protected
when it is inserted and ready to use.
TRUE: Write protected.
FALSE: Not write protected.

NY-series Instructions Reference Manual (W560)

24
File position indicator
Description
*1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents