Search This Blog

PLC COMMUNICATION


PLC COMMUNICATION
Extension modules
PLC I/O number can be increased through certain additional modules by system extension through extension lines. Each module can contain extension both of input and output lines.
Extension modules can have inputs and outputs of a different nature from those on the PLC controller. When there are many I/O located considerable distances away from the PLC an economic solution is to use I/O modules and use cables to connect these, over the long distances, to the PLC.

Remote I/O connections When there are many I/O located considerable distances away from
the PLC an economic solution is to use I/O modules and use cables to
connect these, over the long distances, to the PLC.

Remote PLCs In some situations a number of PLCs may be linked together with a master PLC unit sending and receiving I/O data from the other units.
Cables Twisted-pair cabling, often routed through steel conduit. Coaxial cable enables higher data rates to be transmitted and does not require the shielding of steel conduit.
Fiber-optic cabling has the advantage of resistance to noise, small size and flexibility.

Parallel communication Parallel communication is when all the constituent bits of a word are
simultaneously transmitted along parallel cables. This allows data to be transmitted over short distances at high speeds. Might be used when connecting laboratory instruments to the system.

Parallel standards The standard interface most commonly used for parallel communication is IEEE-488, and now termed as General Purpose Instrument Bus (GPIB).
Parallel data communications can take place between listeners , talkers , and controllers. There are 24 lines: 8 data (bidirectional), 5
status & control, 3 handshaking, and 8 ground lines.

Serial communication Serial communication is when data is transmitted one bit at a time. A data word has to be separated into its constituent bits for transmission and then reassembled into the word when received. Serial communication is used for transmitting data over long distances. Might be used for the connection between a computer and a PLC.
Serial standards RS-232 communications is the most popular method of plc to external device communications. RS 232 is a communication interface included
under SCADA applications. Other standards such as RS422 and RS423
are similar to RS232 although they permit higher transmission rates and longer cable distances.

 There are 2 types of RS-232 devices:
 DTE – Data Terminal Equipment and a common example is a computer.
 DCE – Data Communications Equipment and a common example is a modem.
 PLC may be either a DTE or DCE device.

 ASCII
ASCII is a human-readable to computer-readable translation code
(each letter/number is translated to 1′s and 0′s). It’s a 7-bit code, so we can translate 128 characters (2^7 is 128).

Protocols
It is necessary to exercise control of the flow of data between two devices so what constitutes the message, and how the communication is to be initiated and terminated, is defined. This is termed the protocol.
One device needs to indicate to the other to start or stop sending data.
Interconnecting several devices can present problems because of compatibility problems.
In order to facilitate communications between different devices the International Standard Organization (ISO) in 1979 devised a model to be used for standardization for Open System Interconnection (OSI).

START/STOP Bits start bit. This is a synchronizing bit added just before each character we are sending. This is considered a SPACE or negative voltage or a 0.
stop bit. This bit tells us that the last character was just sent.
This is considered a MARK or positive voltage or a 1.

Parity bit Parity bit is added to check whether corruption has occurred. Common forms of parity are: None, Even, and Odd. During transmission, the sender calculates the parity bit and sends it. The receiver calculates parity for the character and compares the result to the parity bit received. If the calculated and real parity bits don’t match, an error occurred and we act appropriately.
Baud rate it is the number of bits per second that are being transmitted or received. Common values (speeds) are 1200, 2400, 4800, 9600, 19200, and 38400.
RS232 data format RS232 data format (baud rate-data bitsparity-stop bits). 9600-8-N-1 means a baud rate of 9600, 8 data bits, parity of None, and 1 stop bit.
Software handshaking Software handshaking (flow control) is used to make sure both devices are ready to send/receive data. The most popular “character flow control” is called XON/XOFF. The receiver sends the XOFF character when
it wants the transmitter to pause sending data. When it’s ready to receive data again, it sends the transmitter the XON character.

STX & ETX Sometimes an STX and ETX pair is used for transmission/reception as well. STX is “start of text” and ETX is “end of text”. The STX is sent before the data and tells the external device that data is
coming. After all the data has been sent, an ETX character is sent.

ACK / NAK Pair The transmitter sends its data. If the receiver gets it without error, it sends back an ACK character. If there was an error, the receiver sends back a NAK character and the transmitter resends the data.