3.23.4 Process DataShare - Output to an external device/file (EXTOPEN, WRITE,
EXTCLOSE):
The writing of data from a part program to an external device/file is performed in three steps:
1. Open the external device/file
The external device/file is opened for the channel for writing using the EXTOPEN command.
2. Writing data
The output data can be processed using the string functions of the NC language, e.g.
SPRINT. The WRITE command is used for writing.
3. Close the external device/file
The external device/file assigned in the channel is released again using the EXTCLOSE
command, when the end of the program is reached (M30) or for a channel reset.
Syntax
DEF INT <Result>
DEF STRING[<n>] <Output>
…
EXTOPEN(<Result>,<ExtDev>,<SyncMode>,<AccessMode>,<WriteMode>)
…
<Output>="data output"
WRITE(<Result>,<ExtDev>,<Output>)
…
EXTCLOSE(<Result>,<ExtDev>)
Work preparation
3.23 Additional functions
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 997