The SEQUEL software language

The SEQUEL software language

EU ROM ICRO Journal 4 (1978) 30-38 © EU ROM ICRO and North-Holland Publishing Company The SEQUEL software language Colin Dye Hawker Siddeley Dynamics...

2MB Sizes 32 Downloads 144 Views

EU ROM ICRO Journal 4 (1978) 30-38 © EU ROM ICRO and North-Holland Publishing Company

The SEQUEL software language Colin Dye Hawker Siddeley Dynamics Engineering Ltd., Hatfield, UK

Synopsis

(CEGB) for an e l e c t r o n i c sequence cont r o l l e r for e q u i p m e n t in one of the n e w p o w e r stations. Hawker Siddeley D y n a m i c s E n g i n e e r i n g L i m i t e d has b e e n inv o l v e d in m i c r o p r o c e s s o r s almost since their i n c e p t i o n on other control e q u i p ment and d e c i d e d to use a m i c r o p r o c e s s o r to satisfy this requirement. It was r e a s o n e d that the m i c r o p r o c e s s o r w o u l d give a h i g h degree of f l e x i b i l i t y for the controller, as well as cost r e d u c t i o n s and i n c r e a s e d reliability. The d e s i g n was well under w a y w h e n the p r o j e c t was c a n c e l l e d due to the rise in fuel p r i c e s c o u p l e d w i t h a f a l l i n g d e m a n d for electricity. The C o m p a n y d e c i d e d that the c o n c e p t of the s e q u e n t i a l c o n t r o l l e r was sound, w o u l d be a v i a b l e n e w p r o d u c t and d e c i d e d to press a h e a d w i t h its d e v e l o p m e n t as a C o m p a n y - f u n d e d venture. The d e v e l o p m e n t g u i d e l i n e s were w i d e n e d to e x p a n d the s y s t e m into a g e n e r a l - p u r pose sequence c o n t r o l l e r for the industrial market.

S E Q U E L is a m i c r o p r o c e s s o r b a s e d s e q u e n c e r c o n t r o l l e r for c o n t r o l and moni t o r i n g o p e r a t i o n s in industry. It is d e s i g n e d to be m o d u l a r in b o t h h a r d w a r e and so f t w a r e so that construction, use and m a i n t e n a n c e of the e q u i p m e n t Can be a c h i e v e d b y p l a n t engineers. The h a r d w a r e is b a s e d upon double eurocard size circuit b o a r d s c o n t a i n e d w i t h i n a s t a n d a r d rack system. The range of b o a r d s a v a i l a b l e c o m p r i s e s CPU, two types of memory, d i g i t a l input and output boards, a n a l o g u e input and output b o a r d s etc. A special e a s y to learn p r o g r a m m i n g language, c a l l e d SEQUEL, has been d e v i s e d to e n a b l e the c o n t r o l r e q u i r e m e n t s to be e n t e r e d into the s y s t e m b y the p l a n t engineer. The s y s t e m does not d e p e n d u p o n a host c o m p u t e r or s p e c i a l i s t prog r a m m i n g k n o w l e d g e for its operation. Full s i m u l a t i o n f e a t u r e s as well as all aids n e c e s s a r y to p r e p a r e p r o g r a m m e s are i n c l u d e d w i t h the s u p p l i e d s o f t w a r e so that e n g i n e e r s can w r i t e and test their p r o g r a m m e s f u l l y b e f o r e c o u p l i n g up to the pl a n t to be controlled.

2.

CONCEPTS

The d e s i g n b r i e f for the h a r d w a r e and s o f t w a r e e n g i n e e r s was to d e s i g n a s y s t e m that was (i)

i.

DESIGN

Simple

INTRODUCTION it s h o u l d not require a q u a l i f i e d p r o g r a m m e r to p r o g r a m m e the system, or a qualified electronics e x p e r t to put it t o g e t h e r

As a p r e l u d e to d e s c r i b i n g the S E Q U E L s y s t e m s o f t w a r e it m a y be of i n t e r e s t to b r i e f l y e x p l a i n the origins of the S E Q U E L project. The d e s i g n and c o n s t r u c t i o n of the S E Q U E L h a r d w a r e will then be desc r i b e d as the S E Q U E L language, and its f a c i l i t i e s are i n t i m a t e l y tied to the hardware.

(ii)

Easy-to-use the e q u i p m e n t was to be a i m e d at the p l a n t e n g i n e e r or p r o d u c t i o n man. He is the one who

S E Q U E L arose f r o m a r e q u i r e m e n t by the Central Electricity Generating Board 30

THE

SEQUEL

SOFTWARE

LANGUAGE Conditions encountered are often harsh, hot, dusty, v i b r a t i o n s from other machines, e l e c t r i c a l interference etc., and the s y s t e m must be d e s i g n e d a c c o r d i n g l y

u n d e r s t a n d s his p r o b l e m and the s y s t e m s h o u l d e n a b l e h i m to e a s i l y solve his p r o b l e m w i t h o u t expensive, long t r a i n i n g or r e c o u r s e to the c o n t r o l l e r manufacturer

L o w Cost

(vii) (iii)

Flexible this almost goes w i t h o u t saying. The a d v a n t a g e s of u s i n g m i c r o p r o c e s s o r s m u s t be p a s s e d on in a c o m p e t i t i v e price. The total SEQUEL concept, esp e c i a l l y the price, must make the s y s t e m a t t r a c t i v e to a wide v a r i e t y of users

the b a s i c b u i l d i n g 'bricks', b o t h h a r d w a r e and software, of the s y s t e m s h o u l d be as f l e x i b l e and as m u l t i p u r p o s e as possible, w i t h out any c o m p r o m i s e over performance (iv)

Modular the e q u i p m e n t s h o u l d comprise plug-in components w i t h easy c o n n e c t i o n bet w e e n the modules. The s o f t w a r e also s h o u l d be d e s i g n e d on the 'Lego' p r i n c i p l e to a l l o w for e a s y a d d i t i o n s and a m e n d m e n t s to the s y s t e m

(v)

31

Ease

3.

HARDWARE

of M a i n t e n a n c e

an almost a u t o m a t i c byp r o d u c t of the m o d u l a r c o n c e p t is ease of m a i n tenance. Replacement of the h a r d w a r e was to be r e d u c e d to a b o a r d rep l a c e m e n t level. In s o f t w a r e terms the use of software modules means e a s i e r t e s t i n g and d e b u g at the p r o g r a m m e d e v e l o p ment stage, and q u i c k e r f a u l t - f i n d i n g subsequently (vi)

Robust

Construction

the s y s t e m s h o u l d be c a p a b l e of o p e r a t i n g w h e r e it is needed; on the plant. No special enc l o s u r e s s h o u l d be r e q u i r e d and it c e r t a i n l y s h o u l d not r e q u i r e a computer room environment.

Fig.

1

POWER SUPPLY CARD FRAME

AND

32

C. DYE

The Power S u p p l y is r a c k - m o u n t e d and s u p p l i e s all the n e c e s s a r y logic voltages w i t h e x t r a supplies for the r e l a y cards and front p a n e l displays. The s u p p l y has a p o w e r - f a i l d e t e c t i o n s y s t e m which, in c o n j u n c t i o n w i t h SEQUEL software, e n a b l e s the s y s t e m to cope w i t h mains i n t e r r u p t i o n s and f a i l u r e s and p r o t e c t s the m e m o r y from corruption.

The SEQUEL s y s t e m u t i l i z e s the u b i q u i t o u s Intel 8080. It features three serial i n t e r f a c e s for current loop, V 2 4 and m o d e m devices d r i v e n by a USART: p r o g r a m m a b l e b a u d rate and c l o c k rate counters, p o w e r - f a i l logic in c o n j u n c t i o n w i t h the Power S u p p l y and a b o o t s t r a p R O M for initial p r o g r a m m e loading.

The C a r d R a c k is a simple 19" double e u r o c a r d rack, w i t h a b a c k p l a n e buss structure. This e n a b l e s any m o d u l e to be p l u g g e d into any p o s i t i o n in the rack a i d i n g a s s e m b l y and m a i n t e n a n c e .

Fig.

3

MEMORY MODULES

Two types of m e m o r y m o d u l e a r e shown in Fig. (iii), the 8K Core Store and the P R O M / R A M board.

Fig.

THE P R O C E S S O R

CARD

Core m e m o r y is u s e d for d e v e l o p m e n t of S E Q U E L control p r o g r a m m e s and w h e n the e v e n t - l o g f a c i l i t y is required. PROM/ R A M is u s e d w h e n a b s o l u t e p r o g r a m m e s e c u r i t y is required. In p r a c t i c e we have f o u n d the core stores to be virtu a l l y incorruptable.

THE

SEQUEL

SOFTWARE

LANGUAGE

33

The a n a l o g u e output b o a r d has four c h a n n e l s per board. Each output has 12 bits r e s o l u t i o n and p r o v i d e s a p h y s i c a l output of plus or m i n u s ten volts or +_ 20mA. The output can be u p d a t e d as often as r e q u i r e d by the programme. In a d d i t i o n to these b o a r d s others are c u r r e n t l y under d e s i g n or the subject of o n g o i n g r e s e a r c h and development. F r o m the f o r e g o i n g it can be seen h o w the d e s i g n c r i t e r i a has b e e n met w i t h r e g a r d to the hardware. The s y s t e m b u i l d s up in the 'Lego' m a n n e r and e x p a n s i o n is m e r e l y a q u e s t i o n of a d d i n g more m o d u l e s and racks as necessary. Future d e v e l o p m e n t s w i l l f o l l o w the e x i s t i n g c o n s t r u c t i o n p r i n c i p l e s and be fully c o m p a t i b l e w i t h the c u r r e n t range of modules.

3. S O F T W A R E

N o w h o w have the o r i g i n a l d e s i g n concepts b e e n i m p l e m e n t e d in software? Fig.

4

DIGITAL

INPUT A N D O U T P U T

BOARDS

There is a range of d i g i t a l input and output b o a r d s as shown in Fig. (iv). They come in two variations. 16-way i s o l a t e d input and output boards, w h e r e each input or output is i s o l a t e d f r o m e a c h other and f r o m ground. These b o a r d s are u s e d to c o n n e c t to or f r o m the plant. 32-way n o n - i s o l a t e d input and output boards. This type of i n t e r f a c e is u s e d m a i n l y to c o n n e c t to and f r o m c o n t r o l p a n e l s and to drive displays. In addition, there and output boards.

are

analogue

input

The a n a l o g u e input is d r i v e n t h r o u g h a 3 2 - c h a n n e l m u l t i p l e x e r board. Up to four m u l t i p l e x e r s m a y be a t t a c h e d to any one A - D b o a r d g i v i n g 128 c h a n n e l s per A-D. The A - D itself is the i n t e g r a t i n g type g i v i n g l!-bit r e s o l u t i o n plus sign w i t h seven p r o g r a m m e s e l e c t a b l e input ranges and o v e r l o a d detection.

The r e q u i r e m e n t for s i m p l i c i t y and ease of use p r e c l u d e d the use of a s s e m b l y language as the p r o g r a m m i n g language. The s y s t e m must be capable of b e i n g p r o g r a m m e d by a user w i t h the m i n i m u m of training. In our v i e w the t y p i c a l user will not be t r a i n e d in p r o g r a m m i n g , and r i g h t l y so, and need not even have an a p p r e c i a t i o n of the o p e r a t i o n of computers. We c o u l d u t i l i s e one of the ~ s t a b l i s h e d h i g h - l e v e l l a n g u a g e s but these are g e n e r a l l y large in core usage, and often require the use of a disc drive for compilation. The use of a disc drive w o u l d make the cost of the s y s t e m u n a c c e p t a b l y high, and w o u l d c e r t a i n l y rule out the use of the e q u i p m e n t in adverse environments. A l s o c o n s i d e r e d was the use of an i n t e r p r e t i v e language, such as Basic, but it was soon r e a l i s e d that such a l a n g u a g e did not fit in w i t h the o r i g i n a l d e s i g n aim and w o u l d not e x e c u t e fast enough. It was t h e r e f o r e d e c i d e d to d e s i g n our own language. Fig. (v) shows ment.

a typical

control

require-

34

C. DYE

c o . , . o , ,,.c~ 0 , , , ~ * , , -

L,~,, SEQUEL PROGRAMMABLE CC~('fFIROLLER

Fig.

5

TYPICAL

CONTROL

CONFIGURATION

The c o n t r o l l e r accepts i n f o r m a t i o n from the plant in v a r i o u s formats, it interprets the p a t t e r n of signals r e c e i v e d and sends c o n t r o l i n f o r m a t i o n b a c k to the plant, b a s e d u p o n the r e c e i v e d data. To p e r f o r m the c o n t r o l f u n c t i o n we must be able to u n i q u e l y i n d e n t i f y any signal to or from the plant, and be able to reference these signals from w i t h i n the programme. To achieve this any i n d i v i d u a l plant signal to or f r o m the p l a n t is c a l l e d a Line. B e c a u s e an 8-bit m i c r o p r o c e s s o r is u s e d these Lines are r e f e r e n c e d in groups of eight, w h i c h are c a l l e d Ports. Thus, any d i g i t a l signal to or from the p l a n t can be u n i q u e l y i d e n t i f i e d b y its Port and Line number. These digital signals m a y be in one of two states, e i t h e r O N or OFF, u s u a l l y d e n o t e d by a 1 or an 0. This 0 or 1 state is c a l l e d the condition. We n o w have a means to r e f e r e n c e any signal to or from the plant, and to test or to set its condition. This p l a n t c o n n e c t i o n r e f e r e n c i n g s y s t e m is the base from w h i c h the l a n g u a g e is constructed.

i d e n t i f i e s the instruction. The statement n u m b e r can be r e g a r d e d as a 'label' to the instruction. It is r e f e r e n c e d b y other S E Q U E L i n s t r u c t i o n s to t r a n s f e r control w i t h i n a p r o g r a m m e and by the v a r i o u s p r o g r a m m e t e s t i n g aids, simulation, programme m o n i t o r p a n e l etc. to i n d i c a t e the p o s i t i o n of the programme. Next comes a t h r e e - l e t t e r m n e m o n i c field w h i c h defines the action to be performed. In this case, TLI m e a n s ~est Line. All S E Q U E L m n e m o n i c s are i n d i c a t i v e of the a c t i o n to be performed, h e l p i n g to make t h e m e a s i l y memorised. F o l l o w i n g the m n e m o n i c field is the argument field. This c o n t a i n s i n f o r m a t i o n which, w h e n t a k e n in c o n j u n c t i o n w i t h the m n e m o n i c field, defines p r e c i s e l y the o p e r a t i o n to be performed. In this case, the action is to test Port 3, Line 5 for the c o n d i t i o n one, (or 'on' Lastly, comes a c o m m e n t field, w h i c h is u s e d by the p r o g r a m m e w r i t e r to d e s c r i b e his prograntme as he sees fit.

SEQUEL PLANT

pROGRAM

TLI

--

TEST ONE

OLI TPT

--

O U T P U T LINE TEST PORT

OPT

--

OUTPUT PORT

CONT!:E)L JMp --

UNCONOITrONAL JUM~

JEQ

J U M P IF E Q U A L

j,'~E

- - . J U M ~ IF N O T EQUAL

jG T

--

jUMp

JLT

--

J U M P IF" LESS T H A N

STI

--

?F G R E A T E R T H A N

TIMERS S T A R T T~MER

CT[

Each i n d i v i d u a l action that the c o n t r o l ler is to p e r f o r m is d e f i n e d by one programme instruction. Every instruction must have an 'instruction identifier' s o m e w h e r e so that p r o g r a m m e a c t i o n can be f o l l o w e d and p r o g r a m m e c h a n g e s can be e a s i l y made. A m e a n s must be d e v i s e d to i n d i c a t e the type of a c t i o n to be p e r f o r m e d b y the instruction: and also a m e a n s to tie that a c t i o n to a p a r t i c u lar p l a n t connection.

MNEMONICS

CONDITIONS

COMPARE T I M E R

REGISTERS ip R

~

INPUT

ORP

PORt T O

REGISTER

O U T P U T PEGISTER T O P O R T

PEQ IE

--

REGISTER E S T A T E INCREMENT R E G I S T E R

DEC ADD SUB

--

DECREMENT REGISTER ADD REGISTERS SLr~TRACT REGISTERS

AND O~R

--

XO R

--

LOGICAL EXCLUSWE O R REGISTERS

SL L SRL

--

SHIFT LEFT L O G I C A L SHIFT RIGHT LOGfCAL

--

L j O G E A L ANO R E G I S T E R S LOGICAL OR REGISTERS

MQV

--

M O V E ~EGI~TER TO REGISTER

ERR CRG

--

COMPARE REGISTER TO REGISTER COMPARE REGISTE~ T O LITERAL

PRT

--

MESSAGE

SEQUEl_ INTERLOCKS

Here

is a typical

735

TLI

3,5,1

SEQUEL

instruction

ASQ

-

IS V A L V E CLOSED?

First, is the 'instruction identifier' or s t a t e m e n t n u m b e r w h i c h u n i q u e l y

Fig.

6

--

ACTIVATE

SEQUENCE

OSQ

--

DEACTIVATE

OSQ

--

OVERRIDE

SEQUENCE

SEQUENCE

CSN

--

COMPARE

STATEMENT

NUMBER

SEQUEL MNEMOniCS

THE S E Q U E L S O F T W A R E L A N G U A G E U s i n g this s t r u c t u r e we b u i l t up a r a n g e of i n s t r u c t i o n s for all the a c t i o n s t h a t we w i s h e d the c o n t r o l l e r to perform. Fig. (vi) gives a list of all the b a s i c S E Q U E L m n e m o n i c s , or i n s t r u c t i o n s . The first four i n s t r u c t i o n s are u s e d to t e s t or set p l a n t c o n d i t i o n s . The TLI a n d OLI i n s t r u c t i o n s o p e r a t e on i n d i v i d ual lines, w h i l s t the TPT and OPT ins t r u c t i o n is u s e d to test lines in g r o u p s of eight. This can be v e r y u s e f u l w h e n s e a r c h i n g for a p a r t i c u l a r c o m b i n a t i o n of p l a n t c o n d i t i o n s . A r e f i n e m e n t of the Port i n s t r u c t i o n s is the use of X in the a r g u m e n t f i e l d to d e n o t e 'don't care', i.e. 830

TPT

6,01XXI011

T h i s a l l o w s us to t e s t f r o m 2 to 8 lines for any d e s i r e d s i m u l t a n e o u s c o m b i n a t i o n . The next five i n s t r u c t i o n s are u s e d to t r a n s f e r p r o g r a m m e c o n t r o l w i t h i n the programme. T h e i r a r g u m e n t f i e l d s are the s t a t e m e n t n u m b e r s of other i n s t r u c tions. T h e y are u s e d f o l l o w i n g a test type i n s t r u c t i o n , so that p r o g r a m m e a c t i o n can be m a d e c o n d i t i o n a l u p o n the r e s u l t of that test. All p l a n t c o n t r o l l e r s r e q u i r e t i m i n g func t i o n s to set d e l a y s or to t i m e events. The two T i m e r i n s t r u c t i o n s a l l o w T i m e r s to be s t a r t e d and t e s t e d at any s u b s e q u ent p o i n t w i t h i n the p r o g r a m m e . Within SEQUEL, a 2 4 - h o u r c l o c k is m a i n t a i n e d so that d e l a y s of up to 24 h o u r s can be m a d e w i t h a r e s o l u t i o n of i0 m i l l i s e c o n d s . The CTI i n s t r u c t i o n can be u s e d as o f t e n as r e q u i r e d so that m u l t i p l e e v e n t s can be t i m e d f r o m one timer. W i t h i n the s y s t e m are areas in w h i c h d a t a m a y be s t o r e d and m a n i p u l a t e d . These areas are c a l l e d R e g i s t e r s , and like p o r t s t h e y are e i g h t lines, or bits, wide. D a t a c a n be r e a d to or f r o m the p o r t s into these r e g i s t e r s , or t h e y m a y be l o a d e d w i t h d a t a f r o m w i t h i n the p r o g r a m me. As w e l l as m a n i p u l a t i n g w h a t is in e f f e c t p o r t d a t a in the r e g i s t e r s , we can also do simple i n t e g e r a r i t h m e t i c and logic f u n c t i o n s .

35

In later v e r s i o n s of the software, the r e g i s t e r c a p a b i l i t y of the s y s t e m has b e e n e n h a n c e d to a l l o w the use of f l o a t i n g p o i n t numbers, thus g r e a t l y i n c r e a s i n g the tasks that this s y s t e m is c a p a b l e of performing. The Print i n s t r u c t i o n a l l o w s m e s s a g e s to be d i s p l a y e d on any s u i t a b l e t e r m i n a l device. T h e s e m e s s a g e s m a y be i n s t r u c t i o n s to an operator, test results, or whatever. The c o n t e n t s of r e g i s t e r s as w e l l as time and date can be printed. The use of this f a c i l i t y a l l o w s q u i t e s o p h i s t i c a t e d d i s p l a y s to be c o n s t r u c t e d as w e l l as just simple m e s s a g e s . So far the S E Q U E L l a n g u a g e and its instr u c t i o n s h a v e b e e n t r e a t e d as if it w e r e one long s e q u e n t i a l p r o g r a m m e . It was d e c i d e d e a r l y on in the s o f t w a r e d e s i g n that the s y s t e m m u s t be c a p a b l e of m o n itoring several plant conditions simultaneously. W i t h o n l y one p r o g r a m m e in the m a c h i n e it is m o r e t h a n l i k e l y that the c o n t r o l l e r m a y be p e r f o r m i n g a c t i o n s d e f i n e d b y one p a r t of the p r o g r a m m e and c o m p l e t e l y m i s s an i m p o r t a n t o c c u r r e n c e on the p l a n t b e c a u s e it is not at the r e l e v a n t p a r t of the p r o g r a m m e . This p r o b l e m was o v e r c o m e by the use of Sequences. A n y p l a n t c o n t r o l p r o g r a m m e can be b r o k e n down into a n u m b e r of s e l f - c o n t a i n e d f u n c t i o n s or tasks. T h g s e tasks are called Sequences. Each sequence can be a l l o c a t e d to p e r f o r m a d e f i n i t e p l a n t function, such as 'start motor' or 'check l u b r i c a t i n g oil circuit', etc. An i m p o r t a n t f e a t u r e of S E Q U E L is that s e q u e n c e s are run in parallel. Fig.(vii) shows this f e a t u r e d i a g r a m a t i c a l l y . SEQUENCE

~0 TLI ~.29

~L167.1

SEQUENCE 2

I

. . . . . . . .

. . . . . . .

SO,EQ 2~ . . . . . . .

7 0 IPR 6.5 .

l Fig.

7

SEQUENCE 3

.

.

.

3'~0

S!L4

4 0 5 JL3 2 . 0

l SIMULTANEOUS

INSTRUCTIONS

36

C. DYE

O n l y three s e q u e n c e s are shown as active, but the d o t t e d line shows the flow of c o n t r o l t a k e n by the processor. It can be seen that w h i l e each s e q u e n c e p r o g r e s ses down t h r o u g h its own task, the S E Q U E L s o f t w a r e e n s u r e s that only one i n s t r u c tion f r o m any one s e q u e n c e is p r o c e s s e d b e f o r e m o v i n g c o n t r o l to the next sequence. Thus, the s y s t e m is able to perform c o n c u r r e n t tasks and these tasks n e e d bear no r e l a t i o n s h i p to e a c h other. This feature is v e r y u s e f u l w h e n p r o v i d ing a 'safety monitor' type f u n c t i o n for a plant, as the m o n i t o r i n g can be continuous i r r e s p e c t i v e of the control aspects of the plant. P a r a l l e l s e q u e n c e s are u s e d to p r o v i d e i n t e r l o c k i n g of p l a n t f u n c t i o n s and a range of m n e m o n i c s are a v a i l a b l e to control this. A S Q and DSQ a c t i v a t e and d e - a c t i v a t e s e q u e n c e s respectively. (see S E Q U E L I N T E R L O C K S - Fig. (vi). A d e - a c t i v a t e d s e q u e n c e has no e f f e c t on the plant. O v e r r i d e sequence, OSQ, and c o m p a r e s t a t e m e n t number, CSN, are u s e d to m o n i t o r and o v e r r i d e any one s e q u e n c e from any other sequence. The o b j e c t i v e in d e s i g n i n g S E Q U E L is that it must be simple and e a s y to use. The m o d u l a r nature of the h a r d w a r e m e a n s that p h y s i c a l l y the s y s t e m can be e a s i l y put together. On the s o f t w a r e side, the p r o g r a m m e i n s t r u c t i o n s are simple, and easy to learn, but the user m u s t have a m e a n s to e a s i l y input his i n s t r u c tions to the machine, and test that his p r o g r a ~ n e will f u n c t i o n correctly. He s h o u l d also be able to make p r o g r a m m e changes and m o d i f i c a t i o n s q u i c k l y and readily.

4. T E R M I N A L S For simplicity, it was d e c i d e d to use a p r o p r i e t a r y t e r m i n a l to c o n s t r u c t and edit p r o g r a m m e s . The s y s t e m is able to use a v a r i e t y of terminals, i n c l u d i n g the u b i q u i t o u s Teletype, but the Texas I n s t r u m e n t s Silent 700 is p r e f e r r e d . The twin c a s s e t t e f a c i l i t y allows p r o g r a m m e

m o d i f i c a t i o n s to be e a s i l y made by c o p y i n g a p r o g r a m m e from one c a s s e t t e to another, i n s e r t i n g or d e l e t i n g p r o g r a m m e i n s t r u c t i o n s as required. A search f a c i l i t y on the t e r m i n a l allows a search at h i g h speed for a p a r t i c u l a r s t a t e m e n t n u m b e r to be made s p e e d i n g up the e d i t i n g process. N e w p r o g r a m m e s can be t y p e d up onto c a s s e t t e and e d i t e d c o m p l e t e l y o f f - l i n e f r o m the c o n t r o l l e r w i t h o u t tieing up the machine.

5. S U P P L I E D

SOFTWARE

S E Q U E L systems are s u p p l i e d system programmes -

w i t h three

The E x e c u t i v e This p r o g r a m m e is p e r m a n e n t l y r e s i d e n t in the machine. It is i n i t i a l l y l o a d e d by p r e s s i n g an E x e c u t i v e P r o g r a m m e Load b u t t o n on the c o n t r o l panel, w h i c h activates a b o o t s t r a p R O M on the CPU board. Once in, the p r o g r a m m e n e e d only be rel o a d e d in the event of a m e m o r y failure. For systems w i t h P R O M / R A M m e m o r y this p r o g r a m m e will be a l r e a d y p r e s e n t in the PROM. The E x e c u t i v e p r o v i d e s basic 'housekeeping' f a c i l i t i e s for the S E Q U E L system, (i)

Real-Time

Clock

A 24-hour c l o c k is m a i n t a i n e d w h i c h can be set or d i s p l a y e d at any time. The c l o c k resol u t i o n is i0 msecs. A calendar f a c i l i t y is also included, g e a r e d to the realtime clock. (ii)

Power-Fail

Management

The p o w e r supply i n d i c a t e s to the p r o c e s s o r the onset of p o w e r failure. S o f t w a r e is p r o v i d e d for an o r d e r l y shutdown of p r o g r a m m e activity. When p o w e r is restored, the s y s t e m is able to r e s t a r t w h e r e it left off if required. This feature guards against m e m o r y c o r r u p t i o n due to s u p p l y fluctuations.

THE iii)

Health

SEQUEL

Monitor

Every clock pulse the system r e t r i g g e r s an i n d i c a t o r o n the CPU board. If f o r a n y r e a s o n , h a r d w a r e or s o f t w a r e , the system fails to retrigger t h e l a m p it g o e s out, indicating a system failure. (iv)

Communications T h e s y s t e m is a b l e t o t a l k t o a v a r i e t y of t e r m i n a l d e v i c e s , or o t h e r p r o c e s s o r s , t h r o u g h a n y o n e of t h e t h r e e i n t e r f a c e s o n t h e f r o n t of t h e CPU board. Input and outp u t are i n t e r r u p t d r i v e n i n t o a n d o u t of s e p a r a t e buffers.

(v)

Tape

Handling

Facilities

S o f t w a r e is p r o v i d e d t o drive remotely the $700 terminal. Each cassette unit can be commanded individually to Rewind, Load, P l a y b a c k or R e c o r d . T h e u s e r just n e e d s t o a s k t h e s y s t e m t o R e a d or W r i t e a particular tape and the s y s t e m d o e s t h e rest.

SOFTWARE

The

This programme and the Interpreter both o c c u p y t h e s a m e a r e a in m e m o r y , a n d are thus mutually exclusive. The Translator is r e a d i n t o t h e s y s t e m b y t h e E x e c u t i v e . Its j o b is t o r e a d t h r o u g h t h e c o n t r o l p r o g r a m m e , w r i t t e n in t h e S E Q U E L l a n g u a g e , a n d c o n v e r t it t o m a c h i n e code. Simultaneously, it w i l l p r o d u c e a p a g e d l i s t i n g of t h e p r o g r a m m e f o r r e c o r d p u r poses, and indicate any syntax or logic errors. The user must correct any programme errors by using the edit facilities of t h e T e r m i n a l .

Interpreter

The interpreter takes the machine code SEQUEL instructions and applies them to the plant. It c o n t a i n s all t h e s o f t w a r e necessary for the simultaneous processing of s e q u e n c e s , t h e t i m e r s , r e g i s t e r s , etc. T o a i d in p r o g r a m m e d e v e l o p m e n t s o m e u s e ful f e a t u r e s h a v e b e e n b u i l t i n t o t h e Interpreter. (a)

Programme

Monitor

Panel

T h e u s e of t h i s p a n e l a l l o w s t h e p r o g r e s s of a n y s e q u e n c e to be monitored. The desired sequence number can be called u p a n d the c o r r e s p o n d i n g statement number within that sequence will be displayed. In a d d i t i o n a n y s e q u e n c e m a y b e s t a r t e d or h e l d at a n y statement within that seque n c e b y u s e of p u s h b u t t o n s .

(b) Translator

37

T h e s y s t e m w i l l o n l y a l l o w an e r r o r f r e e c o n t r o l p r o g r a m m e t o b e run, so t h e u s e r is f o r c e d t o c o r r e c t all e r r o r s . O n c e an e r r o r - f r e e p r o g r a m m e is o b t a i n e d , t h e W r i t e f a c i l i t y of t h e E x e c u t i v e c a n b e u s e d t o o b t a i n a m a c h i n e c o d e c o p y of the programme onto a cassette. Subseque n t l y , if t h i s p a r t i c u l a r c o n t r o l p r o g r a m m e is r e q u i r e d , it c a n b e q u i c k l y l o a d e d i n t o t h e s y s t e m in m a c h i n e c o d e f o r m without having to perform a re-Translation.

In a d d i t i o n , t h e E x e c u t i v e h o l d s c o m m o n s u b - r o u t i n e s w h i c h are u s e d b y t h e T r a n s l a t o r or I n t e r p r e t e r p r o g r a m m e .

The

LANGUAGE

Simulation T h i s a l l o w s t h e p r o g r a m m e to be completely debugged without the need to be connected t o t h e p l a n t to b e c o n t r o l l e d In s i m u l a t i o n m o d e t h e I n t e r preter displays the sequence a n d s t a t e m e n t n u m b e r of e v e r y i n s t r u c t i o n as it is b e i n g performed. W h e n an i n s t r u c tion requires a plant conditi o n i.e. a T L I i n s t r u c t i o n , the system asks the operator t o e n t e r t h e c o n d i t i o n , it does not reference the plant. S i m i l a r l y , if an i n s t r u c t i o n is e n c o u n t e r e d w h i c h w i l l

C. DYE 38 c h a n g e a p l a n t condition, the c h a n g e is d i s p l a y e d to the operator, r a t h e r than b e i n g sent to the plant. A sample p r i n t - o u t of the s i m u l a t i o n mode is shown in Fig. (viii).

-START l.lO SEQUENCE N~:01.STATEMENT NUMBER:00010 OE~O pRC~RA~ SEQUENCE NO:01.STATEMENT N U M B S : 0 0 0 2 0 ~N ON SWITCH 1 SE~ENCE NO:OI.STAT~E~ ~MB~R:00030 INPUT PORT:015.pREV~OUS STATUS:O0000000.CURRENT STATUS:?0000000 SEQUENCE NO:01.STATEMENT NUMgSR:O0040 SEQUENCE NO:02.STATKME~NT ~.~M~SR:000[0 SEQUENCE NQ~OI.STAT~MENT NUMBER:00050 OUTPUT PORT:015.pREVIOUS STATUS:OIO]OIOI.CURRENT STATUS:J0101010 SEQUENCF. NO:02. STATEMENT N~MBF.R:O0020 SEQUENCE NO:01. STATEMENT NUMSE~ :00060 OUTPUT PORT:016.PREVIOUS STATUS:01010101.CURRENT STATU5:IOIOI01) SEQUENCE NO:02.STATEMENT N"OMB£R:00030 SEQUENCE NO:01.STATEMENT STATUS:00070 SEQUENCE NO:O2.STATKMENT hq/MBER:0004O SEQUENCE NO:OI.STAT~MKN~ NUMBER:000@0 SEQUENCE NO:02.STATF24ENT NUMBER:O0050 SEQUENCE NO:04.STATF~SNT N~M,ER:000[O SEQUENCE NO:02.STATKMENT NUMBER:00060 SEQUENCe NO:O4.STATEMENT NL~I~R:00020 OUTPUT PORT:OI5.PR~VIOUS ZTA?US:I01OI010.CL~RENT STATUS:r~I0101CI

Thus, the user is able to c o m p l e t e l y test his programme, t r y i n g all conc e i v a b l e c o m b i n a t i o n s of p l a n t c o n d i t i o n s and v e r i f y i n g that the d e s i r e d r e s p o n s e is m a d e b e f o r e c o n n e c t i o n to the plant. The u s e f u l n e s s of this feature is self-evident, especially when very e x p e n s i v e p l a n t is involved. The I n t e r p r e t e r also allows the status of r e g i s t e r s to be d i s p l a y e d and c h a n g e d at any time. The c o n d i t i o n of any Ports m a y also be i n t e r r o g a t e d and i n d i v i d u a l Lines m a y be o v e r r i d d e n to be on or off as d e s i r e d to o v e r c o m e any p l a n t malfunction.

6. T H E F U T U R E

This then is what S E Q U E L is and h o w it has d e v e l o p e d so far. What of the future? The s y s t e m is in a c o n s t a n t p r o c e s s of evolution, and the use of the m i c r o p r o c e s s o r in the s y s t e m is crucial to its flexibility. The a d v a n c e s in m i c r o p r o c e s s o r t e c h n o l o g y a l l o w us to b u i l d s o p h i s t i c a t e d i n t e r f a c e b o a r d s at l o w cost. For instance, we have alr e a d y b u i l t A to D and D to A b o a r d s and we are c u r r e n t l y b u i l d i n g c o u n t e r / t i m e r , stepper m o t o r drive and SDLC link distrib u t e d control hoards as w e l l as investig a t i n g further facilities. On the s o f t w a r e side, the use that can be made of these b o a r d s and the f a c i l i t i e s that can be b u i l t into the l a n g u a g e seem almost endless. Already floating point m a t h e m a t i c s and a n a l o g u e c a p a b i l i t y are offered. S h o r t l y t h r e e - t e r m control and data l o g g i n g will be available. Software will also be a v a i l a b l e for the n e w b o a r d s as and w h e n they arrive. Distrib u t e d control is a n e w and e x p a n d i n g field and the subject is b e i n g f o l l o w e d closely. The advent of m i c r o p r o c e s s o r s has meant that we are able to p r o d u c e a flexible, simple, p o w e r f u l i n d u s t r i a l c o n t r o l l e r w i t h the c a p a b i l i t y to s a t i s f y most i n d u s t r i a l control p r o b l e m s at a reasonable cost. Our e x p e r i e n c e has shown that n e w users of S E Q U E L are able to use the e q u i p m e n t e f f e c t i v e l y to solve their control p r o b l e m s w i t h i n a m a t t e r of days. We a l r e a d y have systems in the field w i t h over a years c o n t i n u o u s o p e r a t i o n and the i n t e r e s t shown b y i n d u s t r y leads us to b e l i e v e that this e q u i p m e n t is the answer to m a n y c o n t r o l problems.