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 number of array elements in ReadBuf[] is smaller than the value of Size.
• The SD Memory Card is not in a usable condition.
• The file specified by FileID does not exist.
• The file specified by FileID is being accessed.
• The file specified by FileID was not opened in a reading mode.
• An error that prevents access occurs during SD Memory Card access.
Sample Programming
In this sample, four bytes of data are read from the second byte from beginning of the file named
'ABC.bin.' The data is written to BYTE array variable InDat[]. The processing procedure is as follows:
1
The FileOpen instruction is used to open the file 'ABC.bin.'
2
The FileSeek instruction is used to set a file position indicator at the second byte from the begin-
ning of the file.
3
The FileRead instruction is used to read four bytes of data from the position of the file position
indicator and store it in array variable InDat[].
4
The FileClose instruction is used to close the file 'ABC.bin.'
LD
Internal
Variables
External
Variables
2-1268
Variable
OperatingEnd
BOOL
Trigger
BOOL
Operating
BOOL
Fid
DWORD
ARRAY[0..999]
InDat
OF BYTE
RS_instance
RS
FileOpen_instance
FileOpen
FileSeek_instance
FileSeek
FileRead_instance
FileRead
FileClose_instance
FileClose
Variable
_Card1Ready
Data type
Initial value
FALSE
FALSE
FALSE
16#0
[1000(16#0)]
Data type
Comment
BOOL
SD Memory Card Ready Flag

NY-series Instructions Reference Manual (W560)

Comment
Processing completed.
Execution condition
Processing
File ID
Read data

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents