Siemens Sinumerik 840D sl Programming Manual page 714

Job planning
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

Additional functions
14.10 Output to an external device/file (EXTOPEN, WRITE, EXTCLOSE)
WRITE:
EXTCLOSE:
Example
Program code
N10
N20
N30
N40
N50
N60
N70
N80
N90
N100
714
<write mode>: Parameter 5: Write mode for the WRITE commands to
Command to write output data
For a description, see "Write file (WRITE) [Page 140]"!
Command to close an external device/file that has been opened
<error>: Parameter 1: Variable for returning the error value
Type:
Values: 0
<ExtG>: Parameter 2: Symbolic identifier for the external device/file to be
closed
For a description see under EXTOPEN!
Note:
The identifier must be identical to the identifier specified in the
EXTOPEN command!
DEF INT RESULT
DEF BOOL EXTDEVICE
DEF STRING[80] OUTPUT
DEF INT PHASE
EXTOPEN(RESULT,"LOCAL_DRIVE/my_file.txt","SYN","SHARED")
IF RESULT > 0
MSG("error for EXTOPEN:" << RESULT)
ELSE
EXTDEVICE=TRUE
ENDIF
this file/device (optional)
Type:
STRING
Values: "APP":
Attaching
The file is always kept regarding
its contents; write calls are
attached at the end.
Overwrite
"OVR":
The contents of the file are
deleted and re-generated using
the subsequent write calls.
Note:
Using this parameter, the write mode configured in the
extdev.ini file cannot be overwritten. In the case of a
conflict, then the EXTOPEN call is acknowledged with
error.
INT
No error
16 Invalid external path has been programmed
21 Error when closing the external device
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents