Monday, 3 August 2020

What is RS-232, RS-485 & RS-422?

The RS-232, RS-422 and RS-485 designations refer to interfaces for digital data transmission. The RS-232 standard is better known as a normal computer COM port or serial port (although Ethernet, Wire and USB can also be considered as a serial port). The RS-422 and RS-485 interfaces are widely used in the industry for connecting various equipment.

The main differences between RS-232, RS-422 and RS-485 interfaces

Transmitter Type -
RS232 & RS422 - Full Duplex
RS485 - Half Duplex (2 wire), Full Duplex (4 wire)
Maximum Distance -
RS232 - 15 mtrs (9600 kbps)
RS485 & RS422 - 1200 mtrs (9600 kbps)
Contacts in Use -
RS232 - TxD, RxD, RTS, CTS, DTR, DSR, DCD, GND
RS422 - TxA, TxB, RxA, RxB, GND
RS485 - DataA, DataB, GND
Max. Number of connected devices -
RS232 & RS422 - only one
RS485 - max 256

Information transmitted via RS-232, RS-422 and RS-485 interfaces is structured as a protocol

Address type

Bit Address - 0 and 1
8 Bit Unsigned INT Address = [0 to 256],
Signed INT Address = [-128 to 128],
16 Bit Unsigned INT Address =

Function Codes for Modbus - 
Modbus protocol defines several function codes for accessing Modbus registers. There are four different data blocks defined by Modbus, and the addresses or register numbers in each of those overlap.

Thursday, 6 September 2018

PLC - Programmable Logic Controller



What is PLC?
Programmable Logic Controller (PLC) is a digital computer used for the automation of various electro-mechanical processes in industries. These controllers are specially designed to survive in harsh situations and shielded from heat, cold, dust, and moisture etc. PLC consists of a microprocessor which is programmed using the computer language.

The program is written on a computer and is downloaded to the PLC via different communication cable. These loaded programs are stored in non – volatile memory of the PLC.

Types Of PLCs :-
There are three types of programmable logic controllers
They are Unitary, Modular and Rack mounted.
All three types have different features both good and bad which make each type suitable for many different applications.
We have dedicated Blog about this topic -

Components of PLCs :-

1) Power Supply
Power Supply is to start PLC. Certain PLCs have an isolated power supply. But, most of the PLCs work at 220VAC or 24VDC.

2) 24VDC Out
24VDC out is used for doing connection of Input or Output wiring.

3) CPU
The CPU- Central Processing Unit acts as the brain of the PLC. It contains a memory unit into which the PLC program is written into.

It is basically used to process the information it receives from inputs and carries out instructions to the outputs according to the logic programmed into it.

This process is called the scan cycle and it occurs every 5ms. The scan cycle is shown in image.

When a program is written on a programming device such as a laptop it is uploaded to the CPU, once it has been uploaded it is then written into the CPU's memory. The programming device can then be disconnected without losing any data from the PLC because the program is now saved into the memory of the CPU.

4) Input and Output Devices
In PLC's data is collected from inputs which are connected to the input modules and sent to the CPU, this data is then executed within the program logic and then sent to the output devices via the output modules to perform a specific task.

In terms of PLC's there are two different types of inputs, analogue and digital. An example of an analogue input would be a sensor or transmitter and an example of a digital input would be a switch, push button etc.

=> Input will be operated with 24VDC only
=> PLC has different types of output options like -
 1) Relay Output - Supports AC/DC supply (depends upon Relays)
 2) Transistor Output - Supports only DC Voltage
 3) Triac Output - Supports only AC Voltage

5) Communication Port
Communication port is given for download/upload program to/from PLC. There are main three communication ports RS232, RS485 or Ethernet. Where Ethernet supports multiple protocol. In some PLCs USB also using for downloading/uploading process.

=> Leading Brands of PLCs in India - 
01. Allen Bradley
02. Schneider Electric
03. Siemens
04. Mitsubishi
05. ABB
06. GeFanuc
07. Delta.
08. Yakogawa
09. Honeywell
10. Omron

Wednesday, 29 August 2018

Bit Game


Think of PLC memory as a cabinet with drawers called Registers. Data is held in these Registers. These Registers come in different sizes, and hold different kinds of data.

1 Bit = 0 or 1
1 Byte = 8 Bits

Bit:
Can have values 1 or 0. 1 typically represents On while 0 represents Off. Bits are the building block for all other types of data.

Integers: 
Whole numbers (no decimal points). Called: Integers (int), long Integers (long int) or Words. Look for the bit size and whether they are signed or unsigned. Unsigned are positive numbers, while signed are positive or negative.
Addresses in PLC - Allen-Bradley (N7:0), Siemens (MW0), ABB (MW0.0), Mitsubishi (D0) 

Floating point numbers:
Numbers with decimal points, and can be positive or negative. They are called floating point numbers (Float) or Real Numbers with their larger variety called double floats.
Addresses in PLC - Allen-Bradley (F8:0), Siemens (MD0), ABB (MD1.0), Mitsubishi (Z0)
Hexadecimal Format (Hex):
Instead of writing every bit out, it is common to group sets of 4 bits together. Each group can have a value of 0 – 15, which causes a problem since our number system goes from 0 – 9, so we also use A, B, C, D, E and F to get a total of 16 values. (0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , A, B, C, D, E, F)

Example 1001 0011 1111 0010 in Hex would be 93F2

To be clear that we’re using Hex format we tack on a ‘0x’ the the start of the number so our last example would be written 0x93F2

Characters:
Typically 8 bit unsigned integers are often used to represent letter or symbols. Example: you may use them to display text on an operator panel. Use an ASCII table to see how values are mapped to symbols.


For More Updates please like Our page :-

Monday, 20 August 2018

Modbus Communication



MODBUS


What is Modbus? 
=> Modbus is a serial communication protocol developed by Modicon published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). In simple terms, it is a method used for transmitting information over serial lines between electronic devices. Modbus has Master device and Slave devices.

=> Modbus has become a standard communications protocol in industry, and is now the most commonly available means of connecting industrial electronic devices. It is used widely by many manufacturers throughout many industries. Modbus is typically used to transmit signals from instrumentation and control devices back to a main controller or data gathering system, for example a system that measures temperature and humidity and communicates the results to a computer.

What is Master & Slave Device? 
=> The device requesting the information is called the Modbus Master and the devices supplying information are Modbus Slaves. In a standard Modbus network, there is one Master and up to 256 Slaves, each with a unique Slave Address from 0 to 255. The Master can also write information to the Slaves. We have to define every device as a master or slaves as per its work.
=> Slave devices can supply information to only one Master device at a time. One slave can't response to more then one master device.

Communication protocol used in Modbus =
=> RS485 is mostly used communication protocol in industry and instruments thereafter RS232, RS422 and TCP/IP (Ethernet) used in Modbus.

What is Slave ID?
=> Each slave in a network is assigned a unique unit address from 0 to 255. When the master requests data, the first byte it sends is the Slave address. This way each slave knows after the first byte whether or not to ignore the message.
=> Slave Id also known as Device ID or Node Address

What is Function Code?
=> The second byte sent by the Master is the Function code. This number tells the slave which table to access and whether to read from or write to the table. Most common function code details are given bellow.

1) Function Code 01 - We can read Input Register (0xxxxx)
2) Function Code 03 - We can read Holding Registers (4xxxxx)
3) Function Code 05 - We can write Input Register (0xxxxx)
4) Function Code 06 - We can write Single Holding Register (4xxxxx)
5) Function Code 16 - We can write Multiple Holding Register (4xxxxx)

Data Stored in Modbus? (Addressing)
=> Status are single Bit address where Digital bit can stored
1] Coil Status - (00001) to (09999)
2] Input Status - (10001) TO (19999)
=> Register are 16 Bit address where Analog Value can stored
3] Holding Register - (40001) To (49999)
4] Input Register - (30001) To (39999)

Software used for Modbus -
=> 'Modbus Data Scanner' is unique software for read/write addresses from computer where your computer will work as Master devices and your PLC or any other device will work as a slave.







For More Updates please like Our page :-


What is RS-232, RS-485 & RS-422?

The RS-232, RS-422 and RS-485 designations refer to interfaces for digital data transmission. The RS-232 standard is better known as a no...