CHAPTER 6 – Functions and Methods
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).
WriteMessage
Syntax
returnstate = WriteMessage("filename", offset, "text", linefeed)
Remarks
Argument
returnstate
filename
offset
text
linefeed
Typical Example
WriteMessage("C:\CX-SUPERVISOR\TESTFILE.TXT", 0, "Hello World", TRUE)
The text 'Hello World' is written at the start of the 'C:\CX-SUPERVISOR\TESTFILE.TXT' file and
a carriage return and line feed is appended which moves and subsequent text to the start of the next
line.
Note:
When the text is written into the file it overwrites any existing text that may exist at
this location.
Recipe Commands
DisplayRecipes
Syntax
returnstate = DisplayRecipes()
Remarks
Argument
returnstate
Page 88
Type
bool
Returnstate is '1' if the function is successful, or '0' otherwise.
string
Pathname of file to be written.
integer
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.
string
The text to be written into the file.
bool
A flag to indicate a carriage return and line feed should be
appended.
Type
bool
Returnstate is '1' if the function is successful, or '0' otherwise.
Description
Description
Revision 2.0
OMRON
Need help?
Do you have a question about the CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 and is the answer not in the manual?
Questions and answers