Write; Writemessage - Omron CX-Supervisor Reference Manual

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

Advertisement

File Commands

6-9-11 Write

6-9-12 WriteMessage

84
TFile = SelectFile("Text Files (*.txt;
*.csv)|*.txt;*.csv|Document Files (*.doc)|*.doc||")
In this example, the 'Files of type' filter has 2 choices: one to show text files
(i.e. both .txt and .csv files), and one to show document files (just .doc files).
TFile = SelectFile("", "C:\WINDOWS")
The 'File Open' dialog will be displayed, showing all files in the
"C:\WINDOWS" directory.
Syntax
returnstate = Write(RecordId, pointname, ...)
Remarks
Argument
Type
returnstate
bool
RecordId
integer
Pointname
point
Typical Examples
WroteOK = Write(indexno, $Second)
The point '$Second' is written to the currently open file using the value of
indexno as an index into the file. Pass or fail status is stored in 'WroteOK'.
Write(2, $Second, $Minute, $Hour)
The points '$Second', '$Minute', '$Hour' are written to the currently open file
using the value 2 as an index into the file.
Note:It is advisable to use a RecordId less than 1024 whenever possible, in
order to optimise file access time (records 0 to 1023 are cached).
Syntax
returnstate = WriteMessage("filename", offset, "text",
linefeed)
Remarks
Argument
Type
returnstate
bool
filename
string
offset
integer
text
string
linefeed
bool
SECTION 6 Functions and Methods
Description
Returnstate is '1' if the function is successful, or
'0' otherwise.
An index into the file.
Name(s) of point(s) containing data to write to
the open file.
Description
Returnstate is '1' if the function is successful, or
'0' otherwise.
Pathname of file to be written.
An offset from the beginning of the file (in
characters) indicating where to start writing. If
the offset is -1 then the message is appended
to the end of the file.
The text to be written into the file.
A flag to indicate a carriage return and line feed
should be appended.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents