With any PLC (Programmable Logic Controller) system, you generally have many different types of data to process. For example keypad button inputs, lighting circuit outputs, interval timers, etc. It is important to understand how the system represents and stores various types of data. There are basically two types of data; discrete and word data. Discrete data is one bit that can be either a ‘1’ or a ‘0’. Discrete data is used for keypad button inputs and lighting circuit outputs. Word data is 16-bits that represent a fixed or variable number. For example, word data is used for interval timers and any other mathematical calculations.
Discrete data is for inputs, outputs and special control or status bits. Discrete input points are represented with an ‘X’, ‘I’ or some other alphanumeric character, depending on the PLC specifications. There are usually up to 20 fixed discrete input points on micro PLC’s, with expandability to a maximum of 64 inputs with optional cards. Discrete output points are noted with a ‘Y’, ‘O’ or some other alphanumeric character. There are usually up to 16 fixed discrete output points on micro PLC’s, with expandability to a maximum of 64 outputs with optional cards. In this example, the output point ‘Y0’ (lighting circuit) will be turned on when input ‘X0’ (keypad button) energizes.
Discrete special control or status bits are represented with a ‘C’, ‘T’, or some other alphanumeric character, again depending on the PLC specifications. These types of discrete data points do not represent a real world device, that is, they cannot be physically tied to keypad buttons or lighting circuits. They are internal to the PLC; therefore they can be programmed as discrete inputs or discrete outputs.
In this example, the output point ‘Y1’ (lighting circuit) will be turned on when input ‘X1’ (keypad button) momentarily energizes and ‘Y1’ will turn off when input ‘X1’ momentarily energizes again. By using the control bits ‘C1’ and ‘C2’ we have created a toggle situation where the PLC memory knows when the light is on or off. Word data is for timers, counters and numbers (manipulated or stored). The symbol for word data could be a ‘V’, ‘K’ or some other alphanumeric character; based on the specific PLC specification. Word data is referred to as variable memory (16-bit string of ‘1’s and ‘0’s) that represents a number that can be manipulated or stored. For example, timer ‘T0’ has current values stored in word data ‘V0’. When ‘X2’ (keypad button) is turned on, the timer ‘T0’ will start timing up to 60 seconds (preset K60). Comparative contacts are used to energize ‘Y2’, ‘Y3’ and ‘Y4’ (lighting circuits) at 20-second intervals respectively. When ‘X2’ is turned off, the timer ‘T0’ will reset to 0 and the comparative contacts will turn off ‘Y2’, ‘Y3’ and ‘Y4’.