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...