Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

VISA Configure Serial Port VI

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info

Owning Palette: Serial VIs and Functions

Requires: Base Package

Initializes the serial port specified by VISA resource name to the specified settings. Wire data to the VISA resource name input to determine the polymorphic instance to use or manually select the instance.

Example

Use the pull-down menu to select an instance of this VI.

VISA Configure Serial Port

Enable Termination Char prepares the serial device to recognize termination char. If TRUE (default), the VI_ATTR_ASRL_END_IN attribute is set to recognize the termination character. If FALSE, the VI_ATTR_ASRL_END_IN attribute is set to 0 (None) and the serial device does not recognize the termination char.
termination char calls for termination of the read operation. The read operation terminates when the termination char is read from the serial device. 0xA is the hex equivalent of a linefeed character (\n). Change the termination char to 0xD for message strings that terminate with a carriage return (\r).
timeout specifies the time, in milliseconds, for the write and read operations. The default is 10000.
VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.
baud rate is the rate of transmission. The default is 9600.
data bits is the number of bits in the incoming data. The value of data bits is between five and eight. The default value is 8.
parity specifies the parity used for every frame to be transmitted or received. This input accepts the following values.

0no parity (default)
1odd parity
2even parity
3mark parity
4space parity
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
stop bits specifies the number of stop bits used to indicate the end of a frame. This input accepts the following values.

101 stop bit
151.5 stop bits
202 stop bits
flow control sets the type of control used by the transfer mechanism. This input accepts the following values.

0None (default)—The transfer mechanism does not use flow control. Buffers on both sides of the connection are assumed to be large enough to hold all data transferred.
1XON/XOFF—The transfer mechanism uses the XON and XOFF characters to perform flow control. The transfer mechanism controls input flow by sending XOFF when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received.
2RTS/CTS—The transfer mechanism uses the RTS output signal and the CTS input signal to perform flow control. The transfer mechanism controls input flow by unasserting the RTS signal when the receive buffer is nearly full, and it controls output flow by suspending the transmission when the CTS signal is unasserted.
3XON/XOFF and RTS/CTS—The transfer mechanism uses the XON and XOFF characters and the RTS output signal and CTS input signal to perform flow control. The transfer mechanism controls input flow by sending XOFF and unasserting the RTS signal when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received and the CTS is unasserted.
4DTR/DSR—The transfer mechanism uses the DTR output signal and the DSR input signal to perform flow control. The transfer mechanism controls input flow by unasserting the DTR signal when the receive buffer is nearly full, and it controls output flow by suspending the transmission when the DSR signal is unasserted.
5XON/XOFF and DTR/DSR—The transfer mechanism uses the XON and XOFF characters and the DTR output signal and DSR input signal to perform flow control. The transfer mechanism controls input flow by sending XOFF and unasserting the DTR signal when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received and the DSR signal is unasserted.
VISA resource name out is a copy of the VISA resource name that VISA functions return.
error out contains error information. This output provides standard error out functionality.

VISA Configure Serial Port (Serial Instr)

Enable Termination Char prepares the serial device to recognize termination char. If TRUE (default), the VI_ATTR_ASRL_END_IN attribute is set to recognize the termination character. If FALSE, the VI_ATTR_ASRL_END_IN attribute is set to 0 (None) and the serial device does not recognize the termination char.
termination char calls for termination of the read operation. The read operation terminates when the termination char is read from the serial device. 0xA is the hex equivalent of a linefeed character (\n). Change the termination char to 0xD for message strings that terminate with a carriage return (\r).
timeout specifies the time, in milliseconds, for the write and read operations. The default is 10000.
VISA resource name specifies the resource to be opened. The VISA resource name control also specifies the session and class.
baud rate is the rate of transmission. The default is 9600.
data bits is the number of bits in the incoming data. The value of data bits is between five and eight. The default value is 8.
parity specifies the parity used for every frame to be transmitted or received. This input accepts the following values.

0no parity (default)
1odd parity
2even parity
3mark parity
4space parity
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
stop bits specifies the number of stop bits used to indicate the end of a frame. This input accepts the following values.

101 stop bit
151.5 stop bits
202 stop bits
flow control sets the type of control used by the transfer mechanism. This input accepts the following values.

0None (default)—The transfer mechanism does not use flow control. Buffers on both sides of the connection are assumed to be large enough to hold all data transferred.
1XON/XOFF—The transfer mechanism uses the XON and XOFF characters to perform flow control. The transfer mechanism controls input flow by sending XOFF when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received.
2RTS/CTS—The transfer mechanism uses the RTS output signal and the CTS input signal to perform flow control. The transfer mechanism controls input flow by unasserting the RTS signal when the receive buffer is nearly full, and it controls output flow by suspending the transmission when the CTS signal is unasserted.
3XON/XOFF and RTS/CTS—The transfer mechanism uses the XON and XOFF characters and the RTS output signal and CTS input signal to perform flow control. The transfer mechanism controls input flow by sending XOFF and unasserting the RTS signal when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received and the CTS is unasserted.
4DTR/DSR—The transfer mechanism uses the DTR output signal and the DSR input signal to perform flow control. The transfer mechanism controls input flow by unasserting the DTR signal when the receive buffer is nearly full, and it controls output flow by suspending the transmission when the DSR signal is unasserted.
5XON/XOFF and DTR/DSR—The transfer mechanism uses the XON and XOFF characters and the DTR output signal and DSR input signal to perform flow control. The transfer mechanism controls input flow by sending XOFF and unasserting the DTR signal when the receive buffer is nearly full, and it controls the output flow by suspending transmission when XOFF is received and the DSR signal is unasserted.
VISA resource name out is a copy of the VISA resource name that VISA functions return.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the labview\examples\instr\smplserl.llb for examples of using the VISA Configure Serial Port VI.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit