Topic: DMD0304 STREAMOUT - Stream Out Data to Device |
|
|
|
The Stream Out Data to Device (STREAMOUT) instruction is used to send data from a String or numeric data block to the specified, stream-capable device, such as a serial port.
If the source data is a String use the Print to String (STRPRINT) instruction to build up the contents of the String.
If the source data is binary data from a numeric data block, use the Put Bytes into a String (STRPUTB) instruction to store the bytes of data in the data block first.
|
|
Element References:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
Device
- designates which of the configured Stream Devices to output the data
to. Before this instruction can select a Device, that Device must be configured
to accept data from an external source. Part of the configuration for
a device is assigning a name to the device. It is that name which will
show up in the Device selection drop-down menu. For more information on
configuring devices go to the Device Configuration Section under System
Configuration.
Data Source - selects where the data to send to the Stream Device is currently stored. The option chosen will depend on the type of data that is to be sent by the Stream Device. If the data is ASCII text the appropriate location is a String Structure. If the data is binary or simple bytes of data the appropriate choice is a numeric block of bytes.
Endian Settings - specifies
optional processing to handle the Byte and Word ordering of the data
Note: select both options to swap the Bytes in each of the Words and swap the Words in each of the DWord elements
Flush INPUT device first - for Devices that have an input buffer (for example a serial port Device), optionally clear the Device's input buffer before sending the output data through that device.
On Success: - designates one of the following two options if the Stream Out Data to Device operation is successful:
On Error: - designates one of
the following two options if the Stream Out Data to Device operation is
unsuccessful:
|
|
|
|
Status DisplayThe red triangle in the upper left corner indicates this is a Fully Asynchronous instruction.
The gray triangle at the right end of an input leg indicates the input
is edge
triggered
|
|
|
|
See Also:
|
|
|
|
Example Using Stage:
|
|
|
|
Rung Example:
|
|
|