National Instruments 320682C Musical Toy Instrument User Manual


 
RS-232 Library Chapter 5
LabWindows/CVI Standard Libraries 5-32 © National Instruments Corporation
Parameters
Input
COMPort
integer Range 1 through 32.
startDelay
double-precision 0.0 selects the default value
10.0 seconds.
maximum#ofRetries
integer 0 selects the default value 10.
waitPeriod
double-precision 0.0 selects the default value
10.0 seconds.
>5.0 is recommended.
packetSize
integer 0 selects the default value 128.
Return Value
result
integer Result of the XModem
configuration operation.
(Less than zero) Error code; See Table 5-6.
(Zero) Success.
Parameter Discussion
XModemSend and XModemReceive use the baud rate, and the input/output queue sizes
specified by OpenComConfig. But they ignore the data bits, the parity and the stop bits
settings of OpenComConfig, and always use 8 bits, no parity, and one stop bit. Instead of using
the time-out value defined by the SetComTime function, XModem functions use a 1 second
time-out between data bytes.
A zero input for any parameter except COMPort sets that parameter to its default value.
startDelay sets the timing for the initial connection between the two communication parties.
When a LabWindows/CVI program assumes the role of receiver, startDelay specifies the
interval (in seconds) during which to send the initial negative acknowledgment character to the
transmitter. That character is sent every startDelay seconds, up to maximum#ofRetries times.
When a LabWindows/CVI program assumes the role of transmitter, startDelay specifies the
interval (in seconds) during which the transmitter waits for the initial negative acknowledgment.
The transmitter waits up to (startDelay*maximum#ofRetries) seconds. The default value of
startDelay is 10.0.
maximum#ofRetries sets the maximum number of times the transmitter retries sending a packet
to the receiver on the occurrence of an error condition. The default value of
maximum#ofRetries is 10.
waitPeriod sets the period of time between the transfers of two packets. When a
LabWindows/CVI program assumes the role of transmitter, it waits for up to waitPeriod seconds