Numbers, Codes, and Data Types for Siemens PLCs 220

This class reviews the basic types of numbers, codes, and data used by Siemens PLCs. Binary, octal, decimal, and hexadecimal numbers are covered, as well as different types of integers and scientific notation.

Class Details

Class Name:
Numbers, Codes, and Data Types for Siemens PLCs 220
Version:
1.0
Difficulty:
Intermediate
Number of Lessons:
11
Additional Language:
Spanish

Class Outline

  • Objectives
  • PLC Numbers, Codes and Data Types
  • Decimal Numbers
  • Binary Numbers
  • Octal Numbers
  • Hexadecimal Numbers
  • Binary Coded Decimal (BCD)
  • Integers
  • Real Numbers
  • Data Types
  • Summary

Objectives

  • Explain how PLCs use numbers.
  • Explain decimal numbers.
  • Explain binary numbers.
  • Explain octal numbers.
  • Explain hexadecimal numbers.
  • Define binary coded decimal.
  • Describe the different types of integers.
  • Explain how to write numbers in scientific notation.
  • Explain the purpose of data types.

Job Roles

Certifications

Glossary

Vocabulary Term Definition
base 10 The most commonly used number system in everyday life, also known as the decimal system. Each position in a base ten number represents a power of 10. The base 10 system uses ten digits, 0-9.
base 16 A commonly used numbering system for PLCs, also known as hexadecimal. Each position in a base 16 number represents a power of 16. Base 16 uses 16 characters: 0 through 9 and A through F.
base 2 The most commonly used number system in PLCs and other computer systems, also known as the binary system. Each position in a base 2 number represents a power of 2. The base 2 system has only 2 characters, 0 and 1.
base 8 A commonly used numbering system for PLCs, also known as octal. Each position in a base 8 number represents a power of 8. Base 8 only uses 8 characters, 0 through 7.
BCD Binary-coded decimal. A binary-based code in which each decimal digit from 0 to 9 is represented by four binary bits.
binary The most commonly used number system in PLCs and other computer systems, also known as the base 2. Each position in a binary number represents a power of 2. The binary system has only 2 characters, 0 and 1.
binary-coded decimal BCD. A binary-based code in which each decimal digit from 0 to 9 is represented by four binary bits.
bit Each position in a binary number. A bit may be a 0 or a 1.
bit strings Consecutive groups of binary bits.
byte A binary number made of 8 consecutive bits.
consecutive binary bits Binary bits that fall after one another that may be used individually or as a group.
data type A description of a bit string pattern in a PLC that shows how the PLC interprets the bit string.
decimal A numbering system that uses ten digits, from 0 to 9, arranged in a series of columns to represent all numerical quantities. Each column or place value has a weighted value of 1, 10, 100, 1000, and so on, ranging from right to left.
DInt Signed double integer. A type of integer used by a Siemens PLC that is 32 bits long. A signed double integer may have any decimal value between -2,147,483,648 to +2,147,483,647.
hexadecimal A commonly used numbering system for PLCs, also known as base 16. Each position in a hexadecimal number represents a power of 16. Hexadecimal uses 16 characters: 0 through 9 and A through F.
Int Signed integer. A type of integer used by a Siemens PLC that is 16 bits long. A signed integer may have any decimal value between -32,768 and +32,767.
integer A positive or negative whole number.
least significant bit LSB. In a binary number, the bit farthest to the right.
Lreal Long real number. A type of real number that some SIMATIC PLCs can use that has 64 bits.
LSB Least significant bit. In a binary number, the bit farthest to the right.
mantissa The part of a floating-point number that represents the value that is multiplied by a power of ten.
most significant bit MSB. In a binary number, the bit farthest to the left.
MSB Most significant bit. In a binary number, the bit farthest to the left.
octal A commonly used numbering system for PLCs, also known as base 8. Each position in an octal number represents a power of 8. Octal only uses 8 characters, 0 through 7.
power A mathematical notation indicating the number of times a quantity is multiplied by itself. Also known as an exponent.
Real A type of real number that a SIMATIC PLC can use that has 32 bits.
real numbers A number that consists of a manitssa that is multiplied a power of 10 to arrive at the actual value.
scientific notation A system of writing numbers that involves converting them to a mantissa multiplied by a power of ten.
signed Indicates that a number can have a positive or negative sign.
signed double integer DInt. A type of integer used by a Siemens PLC that is 32 bits long. A signed double integer may have any decimal value between -2,147,483,648 to +2,147,483,647
signed integer Int. A type of integer used by a Siemens PLC that is 16 bits long. A signed integer may have any decimal value between -32,768 and +32,767.
signed short integer SInt. A type of integer used by a Siemens PLC that is 8 bits long. A signed short integer may have any decimal value between -128 and +127.
SInt Signed short integer. A type of integer used by a Siemens PLC that is 8 bits long. A signed short integer may have any decimal value between -128 and +127.
two’s complement A system for writing negative numbers in binary in which the pattern of bits used to store a negative binary number is determined by inverting all the binary bits in the equivalent positive binary value and then adding a binary 1.
UDInt Unsigned double integer. A type of integer used by a Siemens PLC that is 32 bits long. Unsigned double integers may have any decimal value between 0 and 4,294,967,295.
UInt Unsigned integer. A type of integer used by a Siemens PLC that is 16 bits long. Unsigned integers may have any decimal value between 0 and 65,535.
unsigned Indicates that a number can only represent 0 or positive numbers.
unsigned double integer UDInt. A type of integer used by a Siemens PLC that is 32 bits long. Unsigned double integers may have any decimal value between 0 and 4,294,967,295.
unsigned integer UInt. A type of integer used by a Siemens PLC that is 16 bits long. Unsigned integers may have any decimal value between 0 and 65,535.
unsigned short integer USInt. A type of integer used by a Siemens PLC that is only 8 bits long. Unsigned short integers can have any decimal value between 0 and 255.
USInt Unsigned short integer. A type of integer used by a Siemens PLC that is only 8 bits long. Unsigned short integers can have any decimal value between 0 and 255.