EasyManua.ls Logo

Anybus CompactCom 40 EtherNet/IP - Page 145

Anybus CompactCom 40 EtherNet/IP
198 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
145
Doc.Id. HMSI-27-212
Anybus CompactCom 40 EtherNet/IP
Doc.Rev. 1.5
Read a File
The following example opens weld_info.txt in the reports folder an read data from the file.
Start
InstX = Obj.Create( )
InstX.File Open( R, \reports\
weld_info.txt )
data = InstX.File Read( Size )
EOF
(Zero bytes returned)
End
InstX.File Close( )
Obj.Delete ( InstX )
Yes
No
Create a new instance. The instance number
returned will be used by subsequent commands.
Open le for reading (CmdExt[0] = 0) and point
to the le to open. The instance can now be used
for le operations. Any directory operations will
be rejected.
Read Size number of bytes from the le.
Keep reading until the Read command returns
zero (0) or the desired content has been read.
Close the le.
Delete the instance.

Table of Contents

Related product manuals