An intelligent remote-control station

An intelligent remote-control station

An intelligent remote-control station Intelligent remote-control stations can advantageously be applied in distributed control systems. ]aries Grantne...

557KB Sizes 51 Downloads 153 Views

An intelligent remote-control station Intelligent remote-control stations can advantageously be applied in distributed control systems. ]aries Grantner, Bela Lantos, Karoly Kenderesi and Sander Terplan describe a structure for such a station

The development of a microprocessor-besed remote~ontrol station which is a part of a distributed process control system is described. The paper discusses the functions of the station, the hardware organization of the microprocessor system, which is based on the Inte18008 CPU, the attached analogue I / 0 system and data telecommunications channel, as well as the structure of the software required for the performance of the functions. A team of the Department of Process Control at the Technical University of Budapest has been investigating computer-aided design methods for microprogrammed and microprocessor systems since 1972. The team has developed an experimental computer system i and, as a part of this. a microcomputer development system and a simulation program supporting the microprocessor system. The simulation program offers the possibility of • •

• • • •

translating microprograms translating the operational strategies of systems attaching the microprocessor to its environment, written in a special language of flowcharts simulating and tracing the run of microprograms simulating and tracing the run of flowcharts simulating and tracing the dialogue between the microprocessor and =ts environment describing the strategy of checking the dialogue with the aid of a special JOB control language

The simulation system is suitable for the time-correct, fundamental functional checking of the entire hardware, firmware and software before the designed equipment is constructed 2. The simulation system can also be used for simulating multiprocessor systems and Petri-nets 3 To facilitate the hardware design of digital devices containing microprocessors, a universal microprocessor system has been developed 4,s, which is coupled to the experimental computer system ~ and is supported by the computer's software: =t is also capable of performing some functions of a host system. In this way it may be possible to configure special microprocessor systems for solving various tasks, orgamze ~ts I/0 channel, define its memory requirement, and debug its microprogram, both for real signal flows and Department of ProcessControl, Technical University Budapest H - 1111 Budapest, Hungary.

vol 2 no 1 february 78

for signal flows simulated by a computer. Practical advantages can also be expected from the development of a universal microprocessor system. It can be expected that most of the boards of the modularly built host system (memory boards containing various types of storage elements, I/O boards and interface boards) can be used without great modification in special-purpose microprocessor systems. Within a research and development agreement (on industrial commission), another team of the Department has dealt with the computerized control of a gas pipeline 6, From experience gained in this work, it can be shown that intelligent remote-control stations performing independent control functions can advantageously be employed in the decentralized control system. These stations can be coupled to a central system in many ways. Based on the available auxiliary means (simulation and development systems) and experience, the aim was set to realize such an intelligent remote-control station. A m~croprogrammed remote-control station and process control equipment with microprocessors have already been constructed in our country s,1 o, 11. When setting the aims of the design work, we took these into consideration; we wanted to extend them on the one hand, and modify them in compliance with the special requirements on the other.

FUNCTIONS OF THE REMOTE-CONTROL STATION Design strategies A remote-control station is usually a part of a central control system. The station has bidirectional data telecommunication with the centre. The stations are placed in series along a data telecommunications line and the centre can be connected only with one station at a time. If the number of the stations is increased, the data telecommunications line becomes the bottleneck of the system. It is therefore desirable that the station has functions with short response time and period time. The telemechanical station works without supervision. Its data are sent to the centre to be processed by the central computer for human use. The man-machine connection must therefore be designed only to ensure the possibility of checking and repair.

21

system-specific I/O ports are built from storage elements. The microcomputer contains the system registers listed below. The letters OP mean output port and the letters IP mean input port, while the number following them is the decimal equivalent of the address part of the OUT and IN instruction respectively

Functions The functions of a remote-control station are • Periodic sampling of analogue data • Processingof analogue data • conversion to engineering units • filtering • limit check • trend computation • trend limit check • Generation of computed values • Set-point control • Closed loop control • Periodic sampling of digital signals • Processingof digital signals • observation of changes • computation of logical functions • counting • delaying • Output of digital signals • Data telecommunications to the centre

OP 30: IPG (input port group) OP 29: SORA (system output register address) OP 28: ROP (register output port). Listed in order increasing according to the addresses, the system contains the following output system registers. • OP 29 (0): AR • OP 29 (I): LR • OP 29 (6): D7 D6 D5 D4 D3 D2 D1 DO X X DITs DIT4 DIT3 DIT2 SELO X OP29(I0):

D7 D6 D5 D4 D3 D2 DI DO X X X X X X X SELOR

• OP 27: SI RA (system input register address) • IP 7: RIP (register input port). Listed in order increasing according to the addresses, the system contains the following input system registers:

HARDWARE STRUCTURE OF THE STATION A block diagram of the station is shown in Figure I. Each functional unit is connected to the I/O and interrupt interface channels of a microcomputer which is based on the Intel 8008-I. Microcomputer The microcomputer, which is part of the station, is a version of the system discussed in s, reduced in compliance with hardware and software requirements (Figure 2) first for the possibility of handling real-time interrupts and unlimited subroutine nesting, but also as a consequence of the high number of the input lines to be established. There is a need for special-purpose I/O ports, i.e. system registers, that can be set and read by a microprogram. The term 'system register' is [ustified by the fact that all the

• • • • • •

OP 27 (0): storing the states of flags C,S,Z,P ACC *-- 0 OP 27 (I): IPG OP 27 (3): OP29R OP 27 (4): OP27R OP 27 (5). LR OP27(6): D7 D6 D5 D4 D3 D2 DI DO c s s ~7 Fo 0

• OP 27 (7): AR • OP27(8). D7 D6 D5 D4 D3 SP3 SP2 SP1 SPO 0 • OP 27 (11): SPCH • OP 27 (12): SPCL

D2 DI DO 0 SELOB SELOR

The functions of the system registers are described in references 4 and 5.

Input ports

4 Intel 8008 mqcrocornputer

Output p;rt; INT--]

I

-i-'~ I [

..... tl=,o

..... --]

J[~ "

P

mg point telecommumcatLOnSchanne[ Float ar,thmetlc urut

hne~DIglI/O tal

!

;

,

qervmemodule '

odem~

Figure 1. Remote~:ontrol station

22

microprocessors

~ ~uscPet ~

INT

[]

.o,

4

I

M oArP yM R 1271e00m A 22E ROM ,,

4

' -

,Oo0can0

-1

Figure 2. Microcomputer

The JMP* instructions have been introduced in order that the stack within the CPU may not essentially restrict the depth of nesting the subroutines. The CPU cannot detect any difference between the 15th and 16th bits of the address parameter of JMP instructions, but to their given combination the interpretation can be assigned that in the case of their occurrence an extra hardware unit stores the address of the next instruction. In this way, the iMP* (GOTO) instruction can be used for calling a subroutine without the stack being pushed down, since through the IP7 port the address for return from the subroutine is accessible to the programmer. The interface signal flows constructed for speeding up the I/O between the system and its environment, as well as the signal flow of the interrupt requested by a peripheral can be found in references 4 and 5.

Analogue I/0 system and real-time clock The system handles 16 analogue I/O signals (Figure 3). Because the signals change relatively slowly and are noisy, an integrating A/D converter was chosen. The measurements are started by a 50ms clock signal supplied by the real-time clock. The counter controlling the analogue multiplexer is also actuated by the 50ms clock signal, but only one counting cycle is possible during one period of the 1 s clock signal, as during the rest of the time the clock signal of the counter is inhibited. The 1 s clock signal always causes an interrupt through the IT logic. The 50ms signal, however, only interrupts in the case when the signal

vol 2 no I february 78

EN has a logical value of 1. In both cases, different RST(i) will be inserted (Figure 4). The separation of the measured 12-bit value and its sequential input through an input port is performed by the input port logic with the aid of the digital multiplexer. The 12-bit output value appears on two output ports in two bytes following one another. The lower four bits of the second byte determine the anal()gue channel, at the output of which the 12-bit registers belonging to the individual D/A converters are rewritten.

Digital I/0 lines The digital I/O lines (with galvanic separation in both directions) are connected to the input and output ports of the microcomputer. From the 56 input lines of the present configuration of the system, 36 are occupied by the 12 X 3-bit flags (e.g. gate valve) and 20 by the l-bit flags (e.g. signal of disturbance). These seven input ports are organized in port group I. The number of the input lines can be increased, if necessary, to a great extent by the I PG system register provided. There are 64 digital output lines (8 output ports) This number can be increased by a further 40 lines without any additional system registers being necessary.

Floating-point arithmetic unit The floating-point arithmetic unit is applied because of the orders of magnitude of the occurring constants and mea-

23

*E

tion results a status byte, or an operand and a status byte in this sequence, to be input to the microcomputer by a series of input instructions. Concerning the result, the command byte also contains the following information: rounding and normalization, normalizing without rounding, rounding without normalization, no normalization and rounding. The functions coded in 3 bits m the command byte, and the number of output and input bytes transferred in each case are contained in Table I.

Input

el

~

~urement :rol

EN

t:F-q

INT c~

Internal

~

Iog,c

~

Table 1. Functions of the floating-point arithmetic unit Function code

11 12 bit register

Function

Number of output bytes

Number of input bytes

0

STORE A

1+4

1

1

LOAD M

1

4+1

2

A+op-~A

1+4

1

3

A-op-*A

1+4

1

4

op-A--*A

1+ 4

1

5

AXop-~A

1+ 4

1

6

A/op-*A

1+ 4

1

7

op/A-*A

1+4

1

O/A 15

= o %

15

Figure 3. Analogue inputs and outputs

A floating-point

accumulator,

M m~crocomputer,

op operand

The status byte of the format given below serves to quickly evaluate the bits (OF = overflow, S = sign, Z = zero, UF = underflow). Is CLK 50ms CLK

I

IIIIIIIIIIIII '

I1111111111

50ms INT

IIII

D7 D6 D5 D4 D3 D2 DI OF S S Z Z UF 0

DO 0

I

I

EN

lS INT

t111111 IIII

I

The execution time of a floating-point arithmetic operation is shorter than 20 #s. so that the time requirement of I/O data transfer is decisive for each function. Should the above manner of complete floating-point data handling prove too lengthy in certain cases, the data transfer periods between the memory of the microcomputer and the arithmetic unit can be reduced by more than an order of magnitude if the microcomputer is completed by a DMA channel 4, s

Figure 4. Real-time clock surement data, as well as for the exact (and quick) computation of integrated quantities. The high-speed floating-point arithmetic unit with independent microprogrammed control is coupled to the microcomputer through an I/O port. By a completely parallel organization it handles numbers consisting of a 24-bit mantissa and an 8-bit characteristic (shifting +128), on the 2's complement binary basis. By a series of output instructions, the microcomputer sends a command byte and, in the majority of the functions, an operand (4 bytes) to the arithmetic. The opera-

24

Control unit of the date telecommunications channel The stations are placed in series along to the same data telecommunications channel. Within this, the station is attached to the central computer through a bit-serial duplex information channel and a one-way 'alarm' channel (through modems). The control unit is based on the Intel 8251 and attached to the microcomputer through an input port, two output ports and the interrupt interface. The

microprocessors

type of operation mode and the format of messagescan be programmed and the transfer rate can be selected to 600 baud or 200 baud. The exchange of messages(except for the alarm signal) is always initiated by the central computer. The call of one byte from the computer, or the request for a new byte to be sent to the computer are indicated to the microcomputer by an interrupt which inserts two different RST (i) instructions. The IT of data telecommunication has a higher priority than the 1 s and 50ms ITs. The messagescoming from the central computer may contain, in addition to the station address and the command bytes, a memory address and a data byte (in binary form) to be placed on the given address. An interrupt is requested from a microcomputer only by the data telecommunications control unit that has recognized the address of the station. The station sendsthe measurement data and the computation results to the computer in floating-point form, and the binary values of the digital signals. The information transmitted is acknowledged by being sent back to the respective transmitter. If the response time of a station exceeds a given time, this timeout condition generates an interrupt in the central computer.

Service module The stations contain no display and control panel permitting external correction and no microprograms serving them. The service module can be used for installing and debugging the station. The service module, which contains a similar microcomputer, can be attached to the system between the modem and the data telecommunications control unit. By means of the service module and using the commands of the central computer, the station can be checked functionally and some of its parameters can be modified.

STRUCTURE OF THE SOFTWARE The system can receive four interrupt conditions which, in the order of decreasing priority, are as follows •

ITtele.in: offer of command, address or data from the computer on the data telecommunications line • ITtele , out: data transmitted to the computer on the . . . data telecommumcattons hne • ITS0ms. conversion of the data arriving from the next analogue line is finished on the A/D converter • IT1 s' the real-time clock indicates that I s has elapsed Each IT invokes the insertton of a RST (i) instruction, which transfers the control of the program execution to the beginning of the corresponding interrupt service program. Each of these programs saves the values of the scratchpad registers and the indicators, and after the execution of the functions belonging to the IT it restores them and acknowledges the IT. On the levels of the interrups the following operations will be executed

IT1 s: observation of the elapse of the sampling time of analogue signals and the cycle time of analogue processes (TAO table); setting of enable signal EN for A/D conversion if there is an analogue signal to be sampled; sampling and storing of digital signals; computation and output of digital signals; in the case of suspendable analogue tasks, modification of the SS table and preparation of the start of the scheduler running on level zero The main parameters required for operating the system are as follows • TAO (timing of analogue operations): contains the sampling time of the analogue signal or the cycle time of the analogue data processing (Ts-1), the desactivity (D) of the operation, the state of count back (Ts-1 -k) and the claim to starting the operation (S) (Figure 5) • PCAP (parameters of common analogue signal processing) contains the length (L) of the parameters for one process, the address of the table for the collected alarm signals (AAS) and the operation types to be executed in the processing/conversion to engineering units (C), filtering (F), limit check (L), trend computation (T), trend limit check (TL), alarm signal for measured or computed data (AM), alarm signal for trend (AT), the lower and upper end values of the range for converting to engineering units, the time constant for low-pass filtering, the lower and upper limits and hysteresis for limit check and alarm signalling, the upper limit of the absolute value of the trend and its hysteresis for checking trend limit and trend alarm signalling as well as indicating overstepping the lower or upper limit, and the upper limit of trend absolute value (OLL, OUL, OUTA), which, in common with the alarm signal inputs generate alarm signals in the station (Figure 6) • AS (alarm signals) : indicate the status of station alarm signalling (SA) and acknowledge the station alarm signal (SAA), as well as for each measured (computed) signal the alarm signal due to limit value (AL) and trend (AT), and the address of the digital alarm output (Figure 6) RAD (rough analogue data) : contains the value of the sampled analogue signal (A/D), the overflow signal (OF) during sampling, and the presence of the double measuring instrument (DM, the next instrument has a wider measurement range) (Figure 7)

1

2

D i I

16

Ts -I

1

2

S

II

16 T s

- 7-k

I I

16

d'

I

, i

I i

16+1 L

16+16

r

i

i

I

b I

Tnmnng o f a n a l o g u e o p e r a t n o n s ( T A O )



ITtele,nn/out: execution of the data telecommunication of given format • IT50ms: sampling of analogue data and placing them in the table of rough analogue data (RAD)

vol 2 no 1 february 78

Figure 5. TAO (timing o f analogue operations)

25

H8)

Length (L) Address of alarm slgna~hng (AAS)

14

[

OF ' DM

1

( rmv+rtPd f, tered +

Sequence of computation

I ]AMITLITI LI' I

c

H8)

Upper end value

(48)

Lower end value

(48)

Time constant of the filter ith

16 I

A D

--

15

(28)

(481

Upper h m l t

(4B)

Lower limit

(48)

Hysteresis

(48)

Upper h m l t of the trend absolute value

(48)

Rough anatogue data (RAD}

Computed filtered

{48)

Trend hysteresis

OULIOLLIOUTA[

{18)

Analogue data I AD)

Parameters of common analogue signal p 3cessmg (PCAP~

Figure 7. RA D (rough analogue data) and A D (analogue data) S tATSAAIA00 .... a ...... Ou

(18}

32

16

32 1

Mask

1

_ PgInteZ __

£1gnalhng

Set

IT5Oms

I

Alarm signalling (AS)

Figure 6. PCAP (Parameters of common analogue signal proceessing) and A S (alarm signalling)

+--

_

I

~6

Start conditions of analogue tasl, s ISCAT~

• AD (analogue data) contains the values converted to engineering units from rough measurement results, or the values computed during processing (in the case of filtering they are overwritten by the filtered values) (Figure 7) • SCAT (start condition of analogue tasks): contains for each process a mask for determining the resources from measured and computed values, a signal for determining measured and computed values that have arisen since the last run of the task, and a pointer for determining the parameters of the task (in the PT table). In the special case when the mask=O, processing is not timedependent, and the common type of process (e.g. PCAP with homogeneous table layout) must be performed for every measured or computed signal (Figure8). Above a given order (the beginning of suspendable tasks) the task can be suspended so that urgent short processes may be executed during slow processes running on level zero • SS (state of the scheduler): contains the serial number (order) of the current task, the beginning of the suspendable tasks, the status of suspension (SU), the serial number of the suspended task and the next value of the program counter (PCSU) (Figure 9)

J Actual analogue task

i

Task working block ,

Parameterlzmq of the task

Address

I ~ Mask=D Paldmeler transfer (PT)

Parameters of the actual task

Converted, fdtered

Parameters of c o m m o n analogue s~gnal processing (PCAP}

AL T AT1

32 Anal ogue data { A DI

The analogue data processing running on level zero is selected by the scheduler which is also running on level zero. The scheduler starts at the end of each analogue task or at the acknowledgement of the IT 1 s if the analogue task

26

Alarm slgnalhng IAS~

Figure 8. SCAT (start condition of analogue tasks)

microprocessors

is suspendable. The scheduler first tests whether there are nonsuspendable processes to be selected, and only after this does it examine whether a suspendable process can be selected (in the latter case it first continues the suspended process/. The condition of selectability is that the timing has elapsed ((D)16+//k(S) 16+j = 1 re'the TAO table) further (mask)i and (signal) i are in accordance (which can be decided by means of the SCAT table). Mask and signal are in accordance if • (mask)/~ 0 and the resources determined in the mask are present in the signals, i.e. (mask)/ A (signal)i = (mask)/or • (mask)/= 0 and (signal) I #= 0; in which case the common process has to be performed with the parameter belongmg to the serial number min /" (signal (/)), = 1, 1 <~j ~< 32 The scheduler tests the selectability of the tasks, starting always from i=1 in the direction of increasing values of i. At the start of analogue signal processing, the scheduler sets the serial number (i) of the process on the place of the current order (SS table). In the case of (mask) i #= 0, the start of the analogue signal processing sets the sampling time to the count back (TAO table, (S) 16 + i " = 0 and ( Ts --1

- h ) 16 +i " = Ts - l ) and clears the signal

(SCAT table, (signal)/: = 0). If (mask) I : = 0, then the (I 6+1)th hne of the TAO table will not be modified. ((S)l 6 + i = I remains, and therefore this process is not tlme-dependent), and on executing with the parameters belonging to orderj the (signal (/))i : = 0 will be set The process will place in the AD table the computed/ filtered analogue signals belonging to serial number (16+k), produced by them, and they wdl set thehth bit in each signal (signal (16+k))/ : 1,i = 2,..., 16). During any operation (write/read) performed on the table, the interrupts are masked for the time required. This software organization can be adapted for any other microprocessor having suitable hardware features.

CONCLUSIONS

t

I

(1B)

Order of actual task Begin of suspendabletasks

SU

(2B)

PCSU Order

of suspended task

State of the scheduler

HB)

(1B)

(SS}

Figare 9. SS(state o f the scheduler)

2 Lantos, B and Taganyi, Cy 'Ein Programmsystem zur Simulation der L~sung yon Aufgaben mit dem Mikrorechner MCS-8' Fachkolloquium Informationstechnik

Vol 10 (1977) 3 Lantos, B and Taganyi, Cy 'A possible solution of the simulation of multi-microprocessor systems ' M A T E Conf. Application o f simulation systems in cybernetics

(1977) (in Hungarian) 4 Arat6, P, Grantner, J and Lantos, B 'Ein auf den Microrechner MCS-8 orientiertes Entwurfssystem f~r die Losung steuerungstechnischer Aufgaben ' FachkolIoqulum Informationstechnih Vol 10 (1977) 5 Grantner, J, Lantos, B and Terplan, S 'A universal microprocessor system for the processing of analog and digital signals' 4th Nat. Conf. Electronic instruments and measurements, Meres es Automatika Vol 24 No 2 (1976) (in Hungarian) 6 Mosoni, I, Kondorosi, K, Langer, L, Megyeri, J and Risztics, P 'System organization problems of process control software' Conf. Programming systems (1975) (in Hungarian)

In addition to the case discussed in the paper, the above system is suitable for processing and setting arbitrary analogue and digital signals of restricted amount for which the sampling time and the time requirement of the computations are in agreement with the hardware features of the system. For general-purpose applications, the user has to fill in the basic tables and to translate the formulas given in the source language offline. Simple modifications to the tables can be requested through the data telecommunications line during operation.

7 Kondorosi, K, Langer, L, Megyeri, J and Risztics, P 'On some practical problems of the computer-aided control of gas pipe-lines' CHEMA U T '75 Conf. (1975) (in Hungarian)

REFERENCES

Arato, P, Grantner, J and Lantos, B 'An on-line com-

10 Lukacs, J 'Hardware structure and organization problems of the MMG te'lemechanical system' CHEMA U T '75 Conf. (1975) (in Hungarian)

puter aided design method on developing system for microprogrammed systems specified by flow chart' Euromicro Newsletter ( Jan u ary 1977)

11 Manual o f the microprocessor~ided process control equipment SZTAKI (1976) (in Hungarian)

vol 2 no I february 78

8 Homans, K M 'A computer-aided control system of gaspipes' ' CHEMAUT '75 Conf. (1975) (in Hungarian) 9 Vizer, J 'Some considerations and solutions of telemechanical systems performing the control tasks of pipes' C H E M A U T ' 7 5 Conf. (1975) (in Hungarian)

27