![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212100.webp)
OMRON
CHAPTER 6 – Functions and Methods
Revision 2.0
Page 87
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 Type
Description
Returnstate
bool
Returnstate
is ‘1’ if the function is successful, or ‘0’ otherwise.
RecordId
integer
An index into the file.
Pointname
point
Name(s) of point(s) containing data to write to the open file.
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.
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...