Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lessons In Industrial Instrumentation-6.pdf
Скачиваний:
6
Добавлен:
25.06.2023
Размер:
2.13 Mб
Скачать

986

CHAPTER 15. DIGITAL DATA ACQUISITION AND NETWORKS

15.1.4Example of industrial number formats

To illustrate how di erent digital data formats are used in industrial systems, we shall explore an example of a human-machine interface (HMI) panel providing graphical view and control of data within a programmable logic controller (PLC). HMI panels are nothing more than specialpurpose computers equipped with graphic display screens for displaying data to human operators and pushbuttons (sometimes touch-sensitive graphic screens) for receiving input from human operators.

The following illustration shows how an HMI may be used with a PLC to control electric power to a motor:

Touch-screen panel

(HMI)

Human operator

 

Data cable

 

Motor start

 

PLC

 

 

 

 

 

 

Motor stop

 

 

 

 

 

 

 

Power

Processor

Input

Input

 

Output

 

 

 

 

0

4

0

4

 

supply

 

 

2

6

2

6

 

 

 

 

1

5

1

5

Control cable

 

 

Analog

3

7

3

7

 

 

IN 0+

IN0

 

VDC

 

 

 

 

IN 0-

IN1

 

OUT0

 

 

 

 

ANL COM

IN2

 

OUT1

 

 

 

 

IN 1+

 

 

 

 

 

 

 

 

 

 

 

 

IN 1-

IN3

 

OUT2

 

 

 

 

ANL COM

IN4

 

OUT3

 

 

 

 

IN 2+

IN5

 

OUT4

 

Motor

 

 

IN 2-

 

 

L1

 

IN7

 

OUT6

 

 

IN 3+

 

 

 

ANL COM

IN6

 

OUT5

 

 

L2/N

 

IN 3-

COM

 

OUT7

 

 

 

 

ANL COM

 

 

 

Gnd

 

 

 

 

 

 

 

 

COM

 

COM

 

 

Motor control center (MCC)

480 VAC three-phase power

When the operator presses a button on the HMI display to tell the motor to start, the HMI panel sends digital data to the PLC instructing the program within the PLC to activate the motor. The PLC, in turn, receives this data from the HMI and determines whether or not7 to start the motor. If the motor starts, the PLC sends data back to the HMI confirming the motor’s “run” status, which the HMI indicates to the operator in graphic form.

7This motor may be “interlocked” to prevent start-up if certain conditions are not met, thereby automatically prohibiting the operator’s instruction to start.

15.1. DIGITAL REPRESENTATION OF NUMERICAL DATA

987

The configuration software used to set up communication between an HMI panel and the control device typically requires the human programmer (engineer or technician) to specify which data points inside the control device will be accessed by the HMI panel. This is specified in a list called the tag name database. A screen-shot of the tag name database for a particular HMI panel configured to communicate with a PLC using Modbus protocol appears here:

This database table shows the “tag name” assigned to each data point (for easy programming reference), the type of digital data format used, the memory address within the control device (the PLC), the network name of the PLC, and whether the data point is read-only (R), write-only (W), or read/write (R/W) from the perspective of the HMI panel.

Note how the first three tag names are all classified as discrete data. The word “discrete” here is synonymous with Boolean, because it represents single-bit data having only two possible states: on or o , 1 or 0. As the tag names imply, these particular data points are associated with simple on/o states: a pushbutton for starting a motor, another pushbutton for stopping a motor, and a bit representing the motor’s “run” status. Once these tag names, data types, and device address values have been established, the programmer may then link the tags to graphic objects on the screen of the HMI panel. Perhaps a square box with the words “Motor start” may serve to activate the START PUSHBUTTON bit and cause the PLC to energize the electric motor. An animated graphic image of a motor may be programmed to show rotation if the MOTOR RUN bit is set, and show no motion if that same bit is cleared.

988

CHAPTER 15. DIGITAL DATA ACQUISITION AND NETWORKS

Four other data types appear in this tag name database, each one representing di erent forms of information:

Unsigned 16-bit integer

Unsigned 32-bit integer

Floating-point 32-bit (also known as “Real” number format)

ASCII string

Two “unsigned integer” data points represent motor run time and a “start counter” for keeping count of how many times the motor has been started. The timer is a 32-bit integer value, while the counter is a 16-bit integer value. Being unsigned integers (no two’s complement notation), the numerical range of the timer is 0 to 4,294,967,295 (232 −1) and the numerical range of the counter is 0 to 65535 (216 − 1). The large range a orded by the timer’s 32-bit word length allows up to 136.2 years’ worth of recorded continuous motor run time, assuming a timer resolution of one second per count.

Two of these data points use 32-bit floating-point format to represent analog motor data: motor temperature and motor speed. Given the units of measurement common to these types of variables (degrees Celsius or Fahrenheit, revolutions per minute), a resolution of ±1 as given by an integer number would probably be insu cient for the task. Instead, the operator should be able to read fractions of a degree in temperature, and fractions of an RPM motor speed. This necessity to display numerical values with resolution less than 1 unit dictates the use of the floating-point data type8.

The last data type represented in this tag name database is an “ASCII string,” which means a series of bytes (8-bit groupings) representing text data, such as a message. In this particular case, the tag name itself betrays the purpose of the data: ERROR MESSAGE. The PLC obviously has the ability to generate text messages and send them to the HMI panel to communicate specific errors to the operator.

8It is also possible to “simulate” fractional resolution using an integer number, by having the HMI insert a decimal point in the numerical display. For instance, one could use a 16-bit signed integer having a numerical range of −32768 to +32767 to represent motor temperature by programming the HMI to insert a decimal point between the hundreds’ and the tens’ place. This would give the motor temperature tag a (displayed) numerical range of −327.68 degrees to +327.67 degrees, and a (displayed) resolution of ±0.01 degree. This is basically the concept of a fixed-point number, where a fixed decimal point demarcates whole digits (or bits) from fractional digits (or bits).