Movefile; Openfile; Printfile - Omron CX-Supervisor Reference Manual

Script language reference
Hide thumbs Also See for CX-Supervisor:
Table of Contents

Advertisement

File Commands
Note:
6-9-5

MoveFile

6-9-6

OpenFile

Note:
6-9-7

PrintFile

Argument
Type
filename
string
returnpoint
point
Typical Example
FileName = "TEST.TXT"
Exists = FileExists(FileName)
The Boolean point 'Exists' is set to 'TRUE' if a file called 'C:\TEST.TXT' exists.
"FileName" is a text point which can be set to any string value.
Syntax
returnstate = MoveFile("sourcename", "destname")
Remarks
Argument
Type
returnstate
bool
sourcename
string
destname
string
Typical Example
MoveFile("c:\autoexec.bat", "c:\autoexec.old")
The file "c:\autoexec.bat" is moved to the file "c:\autoexec.old".
Syntax
returnstate = OpenFile("filename")
Remarks
Argument
Type
returnstate
bool
Filename
string
Typical Example
OpenFile("c:\filename")
The file "c:\filename.csf" is opened and able to be accessed by the Read() and
Write() script commands. Only one file can be open at a time. A file is created
if it doesn't already exist. Files can be shared (for instance located on a
network drive, and accessed by several running CX-Supervisor applications
simultaneously - this can be used for data exchange).
An extension ".csf" will always be added to the filename so it must not be
specifed as part of the argument.
Syntax
returnstate = PrintFile("filename")
Remarks
SECTION 6 Functions and Methods
Description
This text string contains the file name.
Boolean point that contains the return value.
Description
Returnstate is '1' if the function is successful, or
'0' otherwise.
Pathname of file to be moved.
Pathname of destination of move.
Description
Returnstate is '1' if the function is successful, or
'0' otherwise.
Pathname of file to be opened.
81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents