7 -4 A NALOG I NPUT D ATA H ANDLING

7 -4 A NALOG I NPUT D ATA H ANDLING

The previous section showed how an analog input module transforms an analog field signal into a discrete signal. Once the module digitizes the signal into binary counts, the processor can read the value and use the information. During the input reading section of the scan, the processor reads the value from the module and transfers the information to a location specified by the user. This location is usually a word or register storage area or an input register. The processor enters the count value into memory using instructions that differ from those used by standard discrete input modules, yet are similar to those used by multibit discrete input interfaces (see Figure 7-12).

Most analog modules provide more than one channel, or input, per interface. Therefore, they can connect to several input signals, as long as the signals are compatible with the module. The analog instructions used in PLCs take advantage of this multiple channel capability, inputting several values at a time into registers or words. Examples of these instructions are analog in, block transfer in, block in, and location in instructions (see Chapter 9). Some programmable controller manufacturers use other instructions, such as arith- metic instructions, to obtain count values from the analog module’s address.

When a processor executes the instruction to read an analog input, it obtains the module’s data during the next I/O scan and places the data in the destination register specified in the instruction. If multiple channels are to be

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

IO T C E

ys o n

m te n Analog e

Voltage Signal

12 Bits

s ts

001 0 11 0 1 1 00 1 Analog Variable

Transducer

Return Line

A/D

Register

In Analog

Analog Input

om

Instruction not used

-7 Word Location

Register Storage -8 u tp T 3

Data Table

Location h u e 9

tS A

ys n a m te lo g

R 7 E Figure 7-12.

Process for inputting analog data to a word location.

S ECTION Components The Analog C HAPTER 2 and Systems

Input/Output System 7

read, the processor reads and stores one channel every scan. This does not cause a delay in signal processing, since the scan is very fast and the signals are rather slow in nature.

A processor can determine whether or not the module inserted in the enclosure is analog. If the module is analog, the processor will read the available data in groups of 16 bits, with 12 bits (depending on the resolution) displaying the analog value in binary or BCD. Some controllers may provide diagnostic information about the module and its channels by reading an extra word or register after all channels are input.

The physical location of a module within the rack or enclosure (see Chapter

5 for I/O enclosures) defines its address location. Figure 7-13 illustrates an example of an address for an analog module location. A typical instruction will reference a module’s address location by specifying the module’s rack and slot numbers, the number of channels or analog inputs used, and the starting register destination address. If a module uses eight channels and the

destination storage register starts at address 200 8 , the last storage register will

be at address 207 8 (see Figure 7-14). The module may also send a status register; in which case, the bits in this register will indicate the status of each channel. The processor assigns the register range automatically according to the number of channels; however, the programmer must remember not to overlap the usage of already assigned registers.

00 01 02 03 04 05 06 07 Slot

Processor and Power Supply

Rack 0

Input Instruction Enable

Rack 0 Slot 03

Number of Channels 8

Destination Register 200

Figure 7-13. An addressed analog module.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Analog C HAPTER 2 and Systems

Input/Output System 7

Status of Channel

7 6 5 4 3 2 1 0 Module’s

Register Bits

15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 Status Register 1010101010101010 (2 Bits per

Code

Channel)

00 Channel Fault 01 Overflow 10 Channel OK 11 Signal Lost

Register Channel

12-Bit Value in Binary Figure 7-14. Bits within a register indicating the status of each channel.