Omron CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 Reference Manual page 100

Script language
Table of Contents

Advertisement

OMRON
Typical Example
TFile = SelectFile()
The 'File Open' dialog will be displayed, showing all files in the current working directory. The
users choice will be stored in tFile.
TFile = SelectFile("Text Files (*.txt)|*.txt||")
The 'File Open' dialog will be displayed, showing just files with a .txt extension in the current
working directory.
TFile = SelectFile("Text Files (*.txt; *.csv)|*.txt;*.csv||")
The 'File Open' dialog will be displayed, showing files with either a .txt or .csv extension in the
current working directory.
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.
Write
Syntax
returnstate = Write(RecordId, pointname, ...)
Remarks
Argument
Returnstate
RecordId
Pointname
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.
Revision 2.0
Type
bool
Returnstate is '1' if the function is successful, or '0' otherwise.
integer
An index into the file.
point
Name(s) of point(s) containing data to write to the open file.
CHAPTER 6 – Functions and Methods
Description
Page 87

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents