The Productivity Suite Software allows us to use tags in the PLC. Tags are a method for assigning and referencing memory locations within the programmable logic controller. They allow a more structured programming approach and are stored within a tag database. The tag database is stored in the memory of the Productivity Series of PLC’s from Automation Direct. Do not over think tags. Tags are just names that we assign to variables of any data type stored in the PLC memory.

We will be looking at data types available in the Productivity PLC and how to use the tag database. Let’s get started. Continue Reading!

# Category Archives: Number Systems

Different numbering systems in the programmable controller.

# BRX PLC Numbering Systems and Addressing

The BRX PLC like all of the PLCs in the Do-More Series use strong data typing. This means that there are fixed memory structures to work with in your program. Errors will be displayed if you try to put the wrong type of value in the memory location. The data structures will automatically assist you in your automation system.

Memory can now be as flexible as you want and need. You can define and allocate all the data memory the way you want it up to specific maximums. As a system integrator you determine what best fits your automation framework.

We will be looking at the addressing and numbering systems in the BRX Series PLC. Let’s get started. Continue Reading!

# Omron CP1H Numbering Systems and Addressing

The Omron CP1H series of programmable logic controllers has a fixed input and output addressing system. Every PLC has its own way of addressing its inputs and outputs. We will be looking at how the CP1H series of controller addresses its inputs and outputs. Numbering systems used in this controller will also be looked at as well as addressing. Addressing can be direct or indirect. We will look at how this can be accomplished using examples in the CP1H controller. Continue Reading!

# Horner XL4 Numbering System and Addressing

We will now look at the Horner XL4 numbering system and addressing. Data is stored into different memory type locations called registers. The registers can be either bits or words (16bit). Multiple registers can be used together to store a 32 bit value. (Double word) This all in one controller has several additional registers to handle some of the HMI communication. Let’s look at all of the areas in the controller. Continue Reading!

# Here’s a Quick Way to Convert Grey Code into Binary for PLC

**Grey Code**

Grey Code is used because only one bit of data will change at a time. The following chart shows the conversion of Grey Code to Binary.

Number | Binary Code | Grey Code | Number | Binary Code | Grey Code |

0 | 0000 | 0000 | 8 | 1000 | 1100 |

1 | 0001 | 0001 | 9 | 1001 | 1101 |

2 | 0010 | 0011 | 10 | 1010 | 1111 |

3 | 0011 | 0010 | 11 | 1011 | 1110 |

4 | 0100 | 0110 | 12 | 1100 | 1010 |

5 | 0101 | 0111 | 13 | 1101 | 1011 |

6 | 0110 | 0101 | 14 | 1110 | 1001 |

7 | 0111 | 0100 | 15 | 1111 | 1000 |

It is important for absolute encoders because if the power is interrupted the encoder will know where it is within the one bit.

Example:

Power is interrupted when the encoder is between 7 and 8. If we are looking at Binary Code all of the bits would be effected and we would not be sure as to what number we are looking at for the encoder. Therefore we have lost position. In Grey Code only one bit changes so we will still be able to tell if we were on 7 or 8 if the power was interrupted.

The following sample PLC program will convert 4 bit grey code into binary code.

This code was written in an Automation Direct PLC software called Do-more Designer.

Do-more Designer Software

How to use video’s for Do-more Designer Software

Contact me for the above program. I will be happy to email it to you.

Thank you,

Garry

If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.

Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you **subscribe to ACC Automation**.

# What Everybody Ought to Know About PLC (Programmable Logic Controller) Numbering Systems

**Programmable Logic Controllers (PLC)** are the same as computers. They only understand two conditions; on and off. (1 or 0 / Hi or Low/ etc.) This is known as binary. The PLC will only understand binary but we need to display, understand and use other numbering systems to make things work. Let’s look at the following common numbering systems.

**Binary** has a base of two (2). Base means the number of symbols used. In binary the symbols are 1 or 0. Each binary symbol can be referred to as a bit. Putting multiple bits together will give you something that looks like this: 100101112. The 2 represents the number of symbols/binary notation. Locations of the bits will indicate weight of the number. The weight of the number is just the number to the power of the position. Positions always start at 0. The right hand bit is the ‘least significant bit’ and the left hand bit is the ‘most significant bit’.

Let’s look back at our example to determine what the value of the binary number is:

100101112 =

We start with the least significant bit and work our way to the most significant bit.

1 x 2^{0 }= 1 x 1 = 1

1 x 2^{1 }= 1 x 2 = 2

^{2 }= 1 x 2 x 2 = 4

^{3 }= 0 x 2 x 2 x 2 = 0

^{4 }= 1 x 2 x 2 x 2 x 2 = 16

^{5 }= 0 x 2 x 2 x 2 x 2 x 2 = 0

^{6 }= 0 x 2 x 2 x 2 x 2 x 2 x 2 = 0

^{7 }= 1 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 128

**Decimal**has a base of ten (10). The symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

^{0 }= 1 x 1 = 1

5 x 10^{1 }= 5 x 10 = 50

1 x 10^{2 }= 1 x 10 x 10 = 100

15110 = 1 + 50 + 100

151 = 151

**Hexadecimal** has a base of sixteen (16). The symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. Hexadecimal is used to represent binary numbers. F16 = 11112

Every for bits of binary represent one hexadecimal digit.

In our original binary number we now can convert this to hexadecimal.

100101112

The least significant four bits are:

01112 =

1 x 2^{0 }= 1 x 1 = 1

1 x 2^{1 }= 1 x 2 = 2

^{2 }= 1 x 2 x 2 = 4

0 x 2^{3 }= 0 x 2 x 2 x 2 = 0

^{0 }= 1 x 1 = 1

^{1 }= 0 x 2 = 0

^{2 }= 0 x 2 x 2 = 0

1 x 2^{3 }= 1 x 2 x 2 x 2 = 8

Therefore:

100101112 = 9716

We can now convert this hexadecimal number back into decimal

9716 =

^{0 }= 7 x 1 = 7

^{1 }= 9 x 16 = 144

9716 = 7 + 144 = 151

The following chart will show all of the combinations for 4 bits (nibble) of binary. Its shows the Binary, Decimal and Hexadecimal (Hex) values. It is interesting to not that Hex is used because you still have only one digit (Place Holder) to represent the nibble of information.

Binary | Decimal | Hexadecimal | Binary | Decimal | Hexadecimal |

0000 | 00 | 0 | 1000 | 08 | 8 |

0001 | 01 | 1 | 1001 | 09 | 9 |

0010 | 02 | 2 | 1010 | 10 | A |

0011 | 03 | 3 | 1011 | 11 | B |

0100 | 04 | 4 | 1100 | 12 | C |

0101 | 05 | 5 | 1101 | 13 | D |

0110 | 06 | 6 | 1110 | 14 | E |

0111 | 07 | 7 | 1111 | 15 | F |

**ASCII**(American Standard Code for Information Interchange)

**word**is

**made up of two bytes, or 4 nibbles, or 16 bits of data. Words are used in the PLC for holding information. The word can also be referred to as an integer.**

**Long word / Double word**is made up of 4 bytes, or 8 nibbles, or 32 bits of data. Long words are used for instructions in the PLC like math.

**Memory retentiveness:**

Thank you,

Garry

If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.

Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you **subscribe to ACC Automation**.