![Anybus CompactCom 40 EtherNet/IP Network Manual Download Page 146](http://html1.mh-extra.com/html/anybus/compactcom-40-ethernet-ip/compactcom-40-ethernet-ip_network-manual_2948758146.webp)
146
Doc.Id. HMSI-27-212
Anybus CompactCom 40 EtherNet/IP
Doc.Rev. 1.5
Write a File
The following example opens up the test.txt file for writing.
Start
InstX = Obj.Create( )
InstX.File Open( W, \test.txt )
InstX.File Write( data )
Done
End
InstX.File Close( )
Obj.Delete ( InstX )
Yes
No
Create a new instance. The instance number
returned will be used by subsequent commands.
Open file for reading (CmdExt[0] = 1) and point
to the file to open. The instance can now be used
for file operations. Any directory operations will
be rejected.
Write the desired data to the file.
Keep writing until the desired content has been
written.
Close the file.
Delete the instance.