IrDA Write Function
- Updated2025-07-30
- 4 minute(s) read
Sends string data to the IrDA connection specified by connection ID.

Inputs/Outputs
connection ID
—
connection ID is an IrDA connection refnum that uniquely identifies the IrDA connection.
data in
—
data in is the data the function writes to an IrDA device. The data must be a string or a flattened string. Use the Flatten To String function to convert any data that is not a string to the string format. You must then use the Unflatten From String function to unflatten the string on the remote computer. You also can use the Flatten To XML function to convert data to XML format. Use one of the following techniques to handle messages that might vary in size:
timeout ms (25000)
—
timeout ms specifies the time, in milliseconds, for the function to write bytes to a device before the function completes and returns an error. The default value is 25,000 ms. A value of –1 indicates to wait indefinitely.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
connection ID out
—
connection ID out is the IrDA connection refnum that uniquely identifies the IrDA connection. Use this value to refer to this connection in subsequent IrDA function calls. connection ID out always has the same value as connection ID.
bytes written
—
bytes written indicates the number of bytes the function wrote.
error out
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Data Communication\Protocols\IrDA\Simple IrDA\Simple IrDA.lvproj
- labview\examples\Data Communication\Protocols\IrDA\Simple IrDA\Simple IrDA.lvproj
connection ID
—
data in
—
timeout ms (25000)
—
error in (no error)
—
connection ID out
—
bytes written
—
error out
—