Kinh Nghiệm Hướng dẫn How does a loopback plug verify that a device can both send and receive signals? 2022
HỌ VÀ TÊN NỮ đang tìm kiếm từ khóa How does a loopback plug verify that a device can both send and receive signals? được Cập Nhật vào lúc : 2022-12-05 15:16:09 . Với phương châm chia sẻ Kinh Nghiệm Hướng dẫn trong nội dung bài viết một cách Chi Tiết 2022. Nếu sau khi tham khảo tài liệu vẫn ko hiểu thì hoàn toàn có thể lại Comment ở cuối bài để Ad lý giải và hướng dẫn lại nha.A loopback test can verify the operation of serial communication by sending and receiving data from the same serial port. It can show problems in the serial port, the cable, or the software generating the messages without having to connect to third-party hardware. Loopback tests can be used for RS-232, RS-422, and RS-485 serial communication.
Nội dung chính Show- Connect HardwareConfigure SoftwareTest CommunicationWhich of the following best describes the purpose for which loopback plugs are used?How is a power supply tester used to test the output from a PC power supply?Which tool can you use to test the parallel port?What types of electrical properties can a multimeter measure?
Before you begin, make sure you have the following:
- Have the latest compatible NI-Serial and NI-VISA drivers installed. Refer to the following for compatibility information. Have NI serial hardware with a female-to-female serial cable or adapter to insert wires.
Connect Hardware
Refer to the sections below to properly connect your hardware. Identify what serial communication protocol you are using (RS-232 vs. RS-422/485) and the type of serial connector you have.
Note: The pin diagrams provided for this tutorial are for the female connector. For more details on NI serial hardware pinouts, refer to the Serial Quick Reference Guide.
RS-232On an RS-232 port, connect the transmit (TXD) signal to the receive (RXD) signal. Refer to the pins below based on your connector type. The connections are indicated in grey.
Connector Types
Pins
Diagrams
DB-9 (female)
Pin 3 to 2 (TXD to RXD)
DB-25 (female)
Pin 2 to 3 (TXD to RXD)
RJ-50
Not recommended*
*It is not recommended to use the RJ-50 connector by itself to perform a loopback test due to the small separation between pins. If you use a RJ-50 to DB-9 serial cable (Part Number 182845-XX), a loopback test can be performed using the pins for a DB-9 connector.
RS-422/485 (4-Wire)On an RS-422/485 port, connect the TXD+ signal to RXD+ signal, and the TXD- signal to the RXD- signal. Refer to the pins below based on your connector type. The positive connections are indicated in red and the negative connections are indicated in blue.
Connector Types
Pins
Diagrams
DB-9 (female)
Pin 4 to 8
(RXD+ to TXD+)
Pin 5 to 9
(RXD- to TXD-)
DB-25 (female)
Pin 5 to 20
(TXD+ to RXD+)
Pin 7 to 22
(RXD- to TXD-)
RJ-50
Not recommended*
*It is not recommended to use the RJ-50 connector by itself to perform a loopback test due to the small separation between pins. If you use a RJ-50 to DB-9 serial cable (Part Number 182845-XX), a loopback test can be performed using the pins for a DB-9 connector.
RS-485 (2-Wire Auto)For 2-wire configurations, you will need two RS-485 ports to achieve a setup similar to a traditional loopback test.
On each RS-485 port, place jumper wires between the TXD+ and RXD+ signals, and between TXD- and RXD- signals.From port 1 to port 2, wire the shorted positive signals together, and the shorted negative signals together. Wire the GND signals together. Refer to the pins below based on your connector type.The positive connections are indicated in red, the negative connections are indicated in blue, and the GND connections are indicated in green.
DB-9 Connector (female)
Port 1 Pins
Port 2 Pins
Pin 1 (GND)Is connected toPin 1 (GND)Pins 4/8 (RXD+ to TXD+)Is connected toPins 4/8 ((RXD+ to TXD+)Pins 5/9 (RXD- to TXD-)Is connected toPins 5/9 (RXD- to TXD-)DB-25 Connector (female)
Port 1 Pins
Port 2 Pins
Pin 8 (GND)Is connected toPin 8 (GND)Pins 5/20 (RXD+ to TXD+)Is connected toPins 5/20 ((RXD+ to TXD+)Pins 7/22 (RXD- to TXD-)Is connected toPins 7/22 (RXD- to TXD-)It is not recommended to use the RJ-50 connector by itself to perform a loopback test due to the small separation between pins. If you use a RJ-50 to DB-9 serial cable (Part Number 182845-XX), a loopback test can be performed using the pins for a DB-9 connector.
Configure Software
Open Measurement and Automation Explorer (MAX) from the Start menu.Select the communications port of interest under Devices and Interfaces. If you are unable to see the port, refer to Serial COM Ports Missing in MAX or LabVIEW.Select the Port Settings tab the bottom of the window. Make sure the proper settings are selected and select Validate. For more information on serial settings, refer to the Help topic.If you are using RS-485, select the Advanced tab and make sure the Transceiver Mode is set correctly.Select Save to save the settings.Test Communication
Note: You can test communication in MAX VISA Test Panels or LabVIEW examples. Make sure not to have VISA Test Panels and LabVIEW simultaneously open, or VISA will throw an access resource error (error code -1073807246 hex:0xbfff0072).
Measurement and Automation ExplorerIn MAX, select the communications port of interest and select Open VISA Test Panel.Once the Test Panel window has opened, select Input/Output.In the Basic I/O tab, select Query to send the default *IDN?n command.The display window will then outline the write and read operations. The Test Panel should successfully read the sent *IDN?n command.LabVIEWFor both RS-232 and RS-485 (4-wire), test communication with shipping example Simple Serial.vi.
To locate the example, open LabVIEW and navigate to the Help tab >> Find Examples >> Hardware Input and Output >> Serial >> Simple Serial.vi.Ensure the proper VISA resource name is selected and the serial settings are correct.Run the VI.The Respond indicator should display the *IDN?n command.If you are using RS-485 (2-wire), test communication with the shipping example RS-485 Transceiver Control.vi.