How To Restore Rs485 Cable
페이지 정보
본문
This section describes the QED-Forth routines that control the RS485 transceiver, and presents some ideas that may prove useful in designing a multi-drop data exchange protocol. With one sing coaxial cable, both the video data transmission and PTZ Control are achievable. The configuration and specifications of RS485 make it faster and extend the range of data transmission. The rate of data transmission is expressed in bits per second, or baud. If you do this now, remember to move the QScreen Controller’s serial connector back to Serial Port 1, and to change the terminal’s baud rate back to 19200 baud using the "Comm" item under the terminal’s "Settings" menu. RS485 is another protocol supported by the primary serial port on the QScreen Controller. The diagram below shows a basic RS485 cable for use with the RJ11 socket on Unitronics PLCs. Table 9-6 shows the connection diagram for a standard 9-pin serial cable. Table 9-6 Serial Cable Connections. From the QScreen Controller’s point of view, these three signals (TxD, RxD, and ground) are the only connections required to perform serial communications.
Chassis and signal grounds are connected together to the digital ground (GND) signal. If you are using the QScreen as a slave device and require the /SS signal for your external SPI hardware, configure one of the Port A pins on the Field Header as an input pin. Likewise, the terminal’s transmit signal TxD is connected to the QScreen Controller’s receive signal RxD1. The QScreen Controller, however, does not implement hardware handshaking. On the other hand, the secondary serial port (Serial2) is implemented using hardware pins PA3 (input) and PA4 (output), and is controlled by the associated interrupts IC4/OC5 and OC4, respectively. By polling the Port A pin or by setting up an interrupt service routine, you can configure the QScreen to ignore the SCK input when /SS is high and keep MISO in a high-impedance state so that it does not interfere with the SPI bus. Also, several non-serial interrupts can stack up; if they have higher priority than the serial interrupts, they will be serviced before the Serial2 interrupt routine, and again a serial input or output bit may be lost.
The data bits are also transmitted in reverse order, with the least significant bit transmitted first, after a start bit. The pinout of the QScreen’s Serial Header (H5), QScreen’s Field Header (H3), and the Serial Connectors are shown in the following tables. Hardware is interfaced to the SPI via three PORTD pins named SCK, MOSI, and MISO brought out to pins 7, 8, and 10 on the Wildcard Port Header (see Appendix B). These signals may alternatively be redirected to the digital inputs and outputs used by the second serial port if hardware handshaking is required. You can operate the port at any baud rate up to 4800 baud; just specify the rate you want before the BAUD2 command. The maximum sustainable baud rate on the secondary serial port is 4800 baud. If your application requires RS485, use the primary serial port (serial1) for RS485 communications, and use the secondary serial port (Serial 2) to program and debug your application code using the RS232 protocol. Unlike the standard RS232 protocol, RS485 allows many communicating parties to share the same 3-wire communications cable. To ensure that no two devices drive the network at the same time, it is necessary that each slave device be able to disable it’s own RS-485 data transmitter.
You can use the QScreen’s RS485 link to create such a multi-drop serial network. When the network master wants to talk to this particular slave, it outputs the slave’s ascii name onto the serial bus. You can implement the slave select lines by configuring Port A pins as outputs. In summary, the code provided for implementing the second serial port is very flexible and can be used to support dual concurrent communications ports. Because all of the serial I/O routines on the QScreen Controller are revectorable, it is very easy to change the serial port in use without modifying any high level code. Function prototypes for this function and other versatile serial I/O routines are defined in the COMM.H header file, and are described in detail in the Control-C Glossary. The Control-C Glossary contains a list of functions that temporarily disable interrupts, and the glossary entries give further information regarding how long interrupts are disabled. The QScreen Controller’s kernel software contains a complete set of high level driver routines for the Serial2 port, and these functions are summarized in the Control-C Glossary. The secondary serial port is implemented by a software UART that controls two pins on PortA.
- 이전글시알리스당일배송 24.07.13
- 다음글Glyco Optimizer: The Role of Exercise in Blood Sugar Management 24.07.13
댓글목록
등록된 댓글이 없습니다.