Siemens SINUMERIK 840D sl Programming Manual page 610

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

Advertisement

Additional functions
16.9 Process DataShare - output to an external device/file (EXTOPEN, WRITE, EXTCLOSE)
WRITE
EXTCLOSE
Example
Program code
N10
N20
N30
N40
N50
N60
N70
N80
N90
N100
...
N200
N210
N220
N230
N240
...
610
:
Command to write output data
For a description, see "Write file (WRITE) (Page 139)"!
:
Command to close an external device/file that has been opened
:
<error>
:
<ExtG>
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
PHASE=4
IF EXTDEVICE
OUTPUT=SPRINT("end of phase: %D",PHASE)
WRITE(RESULT,"LOCAL_DRIVE/my_file.txt",OUTPUT)
ENDIF
Parameter 1: Variable for returning the error value
Type:
INT
Values:
0
No error
16
Invalid external path has been programmed
21
Error when closing the external device
Parameter 2: Symbolic identifier for the external device/file to be
closed
For a description see under
Note:
The identifier must be identical to the identifier specified in the
command!
EXTOPEN
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
!
EXTOPEN
Job Planning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents