Basic characteristics
Activation
The name of the streaming program is defined in the channel parameter list: stream_prog_file (see P-CHAN-00158). If this virtual streaming NC program is started as the main program (automatic mode) or as a global subroutine, the data is automatically read out from the streaming interface.
Switchover to streaming mode takes place automatically. For users, this program then behaves as if it was available as a real NC program in the file system.
Deactivation/termination
Streaming mode can be terminated normally by:
- A main program end (M2/M30) or
- A return at subroutine end (M17/M29)
Notice
After normal termination of a streaming program, the remaining contents of the interface are retained but data already read with the program end data packet is discarded. That is to say that, after a program end M2/M30 or M17/M29 is written, he user should first wait until the streaming interface is read completely and empty. Only then can it be ensured that the next streaming program is correctly executed from the very start.
Example
Behaviour at program end
To supplement the above note, the area marked in red in the figure below represents a program start. This is not considered since it was already read out when the previous program end M30 was read.
The following programming example requires the following parameters in the channel parameter list:
; Excerpt from the channel parameter list
; Activate streaming via a global subroutine
streaming_prog_file streaming.nc
Programing Example
Activating streaming when the program is invoked
N10 G01 X200 F1000
N20 X240 Y100
N30 X200 Y0
N40 L streaming.nc
Description of the chronological sequence
The data stream can be written via a corresponding interface object where one data packet can consist of one or several NC lines.
If there are several read accesses in succession, the individual data packets are sorted according to chronological access and are available to the CNC for read access as a data packet consisting of several lines.
On extraction, the data packets are no longer extracted singly. Instead, all data available at the time of the read access is extracted as a common data packet (program segment).
Notice
Each NC line must be terminated by a carriage return (ASCII value = 13) and line feed (ASCII value = 10).
Interrupt
If the data stream is not written any further, this results in a temporary motion interrupt. The motion can then be resumed by writing the data stream.
Abort/reset/delete
Streaming mode is explicitly disabled in case of an NC reset and the previous contents of the streaming interface are deleted.