12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

plc serial - 27.8<br />

RI - (ring indicator) - this is used by modems to indicate when a connection is<br />

about to be made.<br />

CTS/RTS - (clear to send, ready to send)<br />

DSR/DTR - (data set ready, data terminal ready) these h<strong>and</strong>shaking lines indicate<br />

when the remote machine is ready to receive data.<br />

COM - a common ground to provide a common reference voltage for the TXD <strong>and</strong><br />

RXD.<br />

When a computer is ready to receive data it will set the CTS bit, the remote<br />

machine will notice this on the RTS pin. The DSR pin is similar in that it indicates the<br />

modem is ready to transmit data. XON <strong>and</strong> XOFF characters are used for a software only<br />

flow control scheme.<br />

Many PLC processors have an RS-232 port that is normally used for programming<br />

the PLC. Figure 27.6 shows a PLC-5 processor connected to a personal computer with a<br />

Null-Modem line. It is connected to the channel 0 serial connector on the PLC-5 processor,<br />

<strong>and</strong> to the com 1 port on the computer. In this example the terminal could be a personal<br />

computer running a terminal emulation program. The ladder logic below will send a<br />

string to the serial port channel 0 when A goes true. In this case the string is stored is string<br />

memory ST9:0 <strong>and</strong> has a length of 4 characters. If the string stored in ST9:0 is HALFLIFE,<br />

the terminal program will display the string HALF.<br />

PLC5<br />

channel 0<br />

RS-232 Cable<br />

com 1<br />

Terminal<br />

Emulator<br />

A<br />

AWT<br />

Channel 0<br />

String Location ST9:0<br />

Length 4<br />

Figure 27.6<br />

Serial Output Using Ladder Logic<br />

The AWT (Ascii WriTe) function below will write to serial ports on the CPU only.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!