Chapter 5 RS-232 Library
© National Instruments Corporation 5-35 LabWindows/CVI Standard Libraries
Return Value
result integer Result of the XModem send
operation.
<0 Failure.
0Success.
Using This Function
The file is opened in binary mode. Carriage returns and linefeeds are not treated as ASCII
characters. They are sent to the receiver untouched.
This function uses the XModem file transfer protocol. The receiver must also follow this
protocol for this function to work properly.
If the size of the file being sent is not an even multiple of the packet size, the last packet is
padded with NUL (0) bytes. For example, if the file being sent contains only the string HELLO
and the packet size is 128, the packet of data sent contains the letters HELLO followed by
123 (packet size - 5) zero bytes.
The standard XModem protocol only supports 128 and 1024 packet sizes. The sender sends an
SOH character (0x01) to indicate that the packet size is 128, or an STX character (0x02) to
indicate that the packet size is 1024. LabWindows/CVI attempts to support any packet size. As a
sender, LabWindows/CVI sends an STX character when you specify packet size as 1024. For
any other packet size, it sends an SOH character.
For transfers with a large packet size and a low baud rate, a large delay period is recommended.