AUTOMATION AND SYSTEM CONTROL


Tags:

announcement, website, testing, PLC rack, I/O, Cable, Parallel communication, Serial communication, ASCII, RS232, RS-232 Communication, ProfiBus, Industrial robots, manipulator, Cartesian robot, SCARA Robot, Articulated robot, end-of-arm-tooling, Robotics, Metalcasting, automotive industry, Integrated force sensing, shunt, electric current, Human - Machine Interface, HMI, MMI, Human Factors Engineering, Usability Engineering, User Interface, Systems Engineering, Opton, T-WIN20, T-WIN20 KDM, robot bender, pipes, PROFIBUS, Process Field Bus, communication, automation technology, PROFINET, Industrial Ethernet, Central Association for the Electrical Industry, ZVEI, PROFIBUS FMS, PROFIBUS DP, PROFIBUS International, field-bus, OSI Network model, Field bus Data Link, FDL, RS485, fiber-optic transmission, Manchester Bus Power, MBP, bus topology, Fieldbus Message Specification, Decentralized Periphery, PROFIBUS PA, PROFIdrive, PROFIsafe, The PROFIBUS User Organization, Contactor, Relay, Differences, automation, switch, power contacts, auxiliary contacts, contact springs, electromagnet, coil, armature, Grounding, shielding, EMI, Shields, PWM, RF signal, Magnetic coupling, Pulse-width-modulation, PWM simulation, EMI noise, CE mark, and many more...

PLC Communications:

Extension modules


Siemens PLC with additional 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.

RS-232 Communications



RS-232 connectorRS-232 is an asynchronous communications method (a marching band must be "in sync" with each other so that when one steps they all step. They are asynchronous in that they follow the band leader to keep their timing). We use a binary system to transmit our data in the ASCII format. PLCs serial port is used for transmission/reception of the data, it works by sending/receiving a voltage, With RS232, normally, a 1 bit is represented by a voltage -12 V, and a 0 by a voltage +12 V. (The voltage between +/- 3 volts is considered 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.
When plc and external device are both DTE, (or both DCE) devices they can't talk to each other. The solution is to use a null-modem connection.

Using RS-232 with PLC

Some manufacturers include RS-232 communication capability in the main processor. Some use the "programming port" for this. Others require a special module to "talk RS-232" with an external device. External device may be an operator interface, an external computer, a motor controller, a robot, a vision system, etc.
To communicate via RS-232 we have to setup:
1. Where, in data memory, will we store the data to be sent?
2. Where, in data memory, will we put the data we receive from the external device?

As I've seen so far, most of the communication is done by ProfiBus. More about ProfiBus in another post.



This post belongs to category: