Copyright © IFA C Control in Power Elect ronics and Electrical Drives, Lausanne, Switzerland, 1983
HIGH LEVEL LA N GUAGE AND N EW CO NTROL MET HODS
USER-RECONFIGURABLE DIGITAL DRIVE CONTROLLER G. A. Tendulkar and M. Bete Siem ens AG, G WE l TS, D-8520 Erlangen , Fed eral R epublic of Germany
Abstract. This paper describes an experimental high level language-based digital drive controller for use in numerical control and robot control systems as well as in general single and multiple drive sys t ems. The controller is designed to replace conventional modular analog control systems. The controller directly executes a high level application-oriented graphic language ideal for real-time control in industrial automation. The high level language makes it possible for the user to configure the controller to his control application without difficulty, so reducing software costs significantly. A new architecture designed for high execution speed and a microprogrammed operating system allow the controller to be used for all control loops and also logic tasks in high performance multi-drive systems. Typical configurations for a d.c. motor controller are shown and experimental results are described. Keywords • .Industrial control; d.c. motors ; PID-control; digital systems; Programming languages; computer architecture; microprogramming; numerical control; robot control; programmable controllers.
Their use in drive applications is restricted to hierarchical controllers which feed setpoint values to slave analog drive controllers (Fischer and others, 1979).
INTRODUCTION The flexibility inherent in microprocessorbased systems has led to their increasing use in industrial logic control and closedloop control applications. The microprocessor based controller can be used in widely different applications without any hardware modification through suitable programming. The availability of high-level application-oriented user programming languages, which have been developed for programmable controllers, has made programming simple even for users with little software experience. The user can enter his program by drawing it in the familiar form of a ladder diagram or logic gate diagram, directly on the screen of the video monitor in the programming unit (Berger and others, 1979). The graphical user program is converted into the machine code of the controller by a programming unit (Glas and others, 1979). This code is loaded into the user memory of the controller and defines its control function. Some programmable controllers can also be programmed to carry out more complex functions such as closed-loop algorithms for controlling plants with time constants of 100 ms or more, e.g. temperature control. Programmable controllers are still not capable of controlling electrical drives due to the high sampling rates of 1ms required.
STATE OF THE ART IN HIGH LEVEL LANGUAGE-BASED DRIVE CONTROL Although substantial progress has been made in the technology of high level languagebased microprocessor systems for logic control , i.e. programmable controllers, similar high level language-based systems for the closed-loop control of electrical drives are still in their infancy. The electrical drive however is a major component in industrial control. Every drive system in an industrial environment requires not only closed-loop control for position or speed but also associated logic control for start-up, sequencing, shut down, monitoring, protection and interfacing to other parts of the plant (Hoft and others, 1982). Therefore these logic control tasks have also to be carried out by the controller. An important requirement of a digital drive controller is an easy man-machine interface for the operating personnel, who will be required to carry out a certain amount of program reconfiguration during the installation or extension of a plant (Bollinger and others, 1980) •
485
486
G. A. Ten d ulk a r and M. Be t e
In contrast to programmable controllers where spec i al high level languages and direct-execution processor architectures have been developed ( Tendulkar, 1983 ) , this has not been the case in closed-loop controllers for drives. The use of problemoriented high level languages for microprocessor systems for electrical drives has been restricted to entering parameters (Leimgruber, 1977) and controlling the operation (Kuo, 1981) but the actual reconfiguration of the controller structure has not been covered. Almost all the drive controllers described in the literature use standard microprocessors with general purpose architectures. The only mention of adapting the processor to drive control applications is by Kamiyama and co-workers (1978) and Ohmae and co-workers (1980 ) , where special microprogrammed instructions for closed-loop control were introduced. The importance of integrating the logic tasks into controllers for drives has been mentioned in the survey papers by Kusko ( 1977) and Hoft and others ( 1982). However only two papers, one by Perdikaris and coworkers ( 1978) and the other by Kuo (1981) describe systems with both closed-loop control and logic control capab i lity. The first system is in fact a hierarchical system with analog slave speed-controllers for the drives and with logic capability. The system decribed in the second paper has only limited logic capability and is designed for robot control. The controller accepts 32 input lines, 32 output lines and 8 relay-control lines for the logic tasks . In addition three d.c. motors and three stepper motors can also be controlled. An AIM-65 microcomputer with a 6502 microprocessor and slave microprocessors for the drives are used, giving a sampling time of 16ms. Twenty-four high level commands for program organization, logic control and starting and stopping of the d.c. and stepper motors are available. A PID algorithm was used for controlling the d.c. motors, which were assumed to be first order systems. The long sampling time and the resultant slow response restrict the applicstion of the system in h i gh performance servo applications. Furthermore the system is dedicated and only the logic control can be reconfigured. Vaughan and co-workers (1982) compared two real time operating systems for microprocessor-based controllers for chopper fed d.c. motors. These operating systems are designed for the support of application software for speed control. One of the opersting systems has a preemptive nucleus which allows any task to be interrupted. The other operating system has a non-preemptive nucleus. The results of the investigation confirm the fact that stability in a quasianalog (linear) controller can only be ensured if the sampling time is constant and not random as is the case in a preemptive system. The logic control however can be
preempted by th e closed-loop control, as stability considerations do not arise in the former. This is the basic operating princ iple of the controller described in the present paper.
SPECIFICATION OF DRIVE CONTROLLER
THE
DIGITAL
Before one can specify the requirements a digital drive controller has to fulfill in detail, one has to differentiate between dedicated single drive d i gital controllers and programmable digital drive controllers. The dedicated single drive controller is designed to replace the conventional analog closed-loop controller found for instance in servo drives. In such controllers the program is fixed and can not be altered by the user. Only control parameters such as gain or integrating time constant can be set. The fact that a microprocessor executes the control algorithm instead of an analog amplifier is not directly apparent to the user except for easi e r adjustment of parameters using a pocket terminal instead of tr i mmers and the availability of d i gital displays. A serial or parallel digital interface for the input signals is also available. Dedicated units are usually designed using standard 8 bit microprocessors or single chip microcomputers and have to be very low cost as they have to compete with analog drive controllers. The trend in dedicated digital controllers is to integrate them into a package which includes the power stage of the chopper . In this way the microprocessor can be used for executing other functions in addition to the closed-loop control algorithms. The programmable digital drive controller· on the other hand, can be configured by the user as required, to fit different applications. For this purpose a high level language, which relieves the user from specialized hardware knowledge and machine level coding is necessary. Both simple and complex control configurations can be realized easily. In these controllers, the user can alter both the program, i.e. the control structure, and the parameters to fit a wide variety of tasks. Since the hardware required for such systems is more complex than in the single drive dedicated controller, these units are designed to control more than one drive simultaneously. In addition they possess the capability of handling all logic control tasks associated with the drives. These tasks would otherwise have required a separate programmable controller in addition to the drive controller. By eliminating the separate programmable controller, the programmable digital drive controller becomes competitive in applications where multiple drives have to be controlled and where logic control is required.
Us er-re conf i gurabl e Di g it a l Dri v e Contro ll e r
48 7
The high level language digital drive controller described in this paper is of the programmable type and was designed for application in numerical control and robot control systems. A separate processor is required for executing the NC or robot programming language and for the interpolation. This separate processor outputs speed setpoints and logic commands to the digital drive controller. Although advanced control strategies e.g. statevariable feedback, optimal control, etc. can be implemented using microprocessors, these methods have up to now been limited to complex processes and plants. In general industrial applications, the PID controller still remains widespread. This is due to the familiarity of the non-specialized users with PID controllers for whom advanced control is too complicated on the one hand, and the added effort due to the precise mathematical modelling and the accurate actual value measurements required by advanced control on the other hand (Schoeff1er, 1981). Therefore only quasianalog PID control algorithms were developed initially for the controller.
input based on symbols familiar to the engineer is required. Rising software costs dominate hardware costs and point to the need for simplification of programming. At present software (development and maintenance) constitutes approximately 70% of the total cost of an industrial installation. This is expected to rise to 85% by 1985 for one-off industrial installations (Cragon, 1982).
The majority of numerical controls have 4 drives with some possessing 6 or more. Robots on the other hand generally have 6 drives for controlling the arm and manipulator. The fast servo drives found in such applications have time constants of 5 to 10 ms. Therefore sampling times of 1 ms are necessary in the closed-loop control algorithms. In order to control a drive directly without any analog controllers, 2 loops are required per drive: o~e current loop and one speed loop, if a cascaded control configuration is used. Hence 12 loops have to be executed every 1 ms for 6 drives, allowing a maximum of 50~s for each PID-Ioop, i.e. a total of 600~s for the closed-loop control. The logic functions can be carried out in the remaining 400~s. Typical logic control found in numerical control and robot applications carries out tasks such as start-up, interlocking, reversing and safety monitoring. For this 128 digital inputs and outputs are sufficient. Standard programmable controllers have execution times of 2~s per logic input. Taking this value for the digital drive controller, a maximum capacity of 2000 logic statements can be executed per 10 ms reaction time. This represents 500 3-input gate functions and was considered to be satisfactory. In addition hardware for actual value measurement and chopper control is required. The final and perhaps key requirement is an application-oriented high level language for configuring the c10sedloop and logic control tasks of the digital drive controller.
An
USER PROGRAMMING DRIVE CONTROLLERS
OF
DIGITAL
As clearly shown by the rapid growth of PCs, a simple user friendly language with graphic
General purpose languages such as PLM, ADA, FORTRAN and PASCAL are undoubtedly powerful. They however produce too much code or are too slow for real-time control applications such as electrical drives (Schmidt and Swik, 1980). These languages are also too complicated for "factory floor" user programming. High level application-oriented graphic languages containing not only control functions such as PID-loops but also logic functions, similar to the languages used in programmable controllers, are ideal for electrical drives. On of the advantages of such languages is that the user does not need to have any specialized knowledge about the CPU which is fully transparent to him. easy to use language for closed-loop control and logic control tasks in drive applications must contain often used functions as the basic building blocks of the language, i.e. statements or function blocks. A simple high level language was developed for the digital drive controller, which only contains the key statements required for both the closed-loop and logic control of electrical drives. The extensive functions found in modern programmable controllers or minicomputer-based DDC systems were not implemented at this stage and can be included if required by microprogram extension. The HLL statements implemented can be subdivided into 3 groups, namely the logic control, closed-loop control and organizational groups as shown in Fig.l. These few simple statements form the core of an application-oriented high level language suitable for controlling electrical drives in numerical control and robot control systems (also see example in Fig.6) • The software building blocks for closed-loop control consist of graphical function blocks containing the functions. These function blocks can either be configured on the screen of a graphical programming unit, which converts the graphic input into a list of statements or instructions for execution by the controller. Alternatively the list of high lev~l language statements corresponding to the user program can be entered manually into a smaller pocket-size non-graphic programming unit. The later alternative is suited for on-site modifications of the control function during commissioning and start-up or for trouble-shooting. Each function block in the language possesses the characteristics given below:
488 1.
2.
3.
4.
5.
C. A. Tendulka r an d M. Bete A mnemonic designation of the function contained in the function block, e.g. PlC , •• for PI-controller A unique symbolic name specified by the user, which identifies the function in the program and follows the mnemonic designation, e.g. PIC,SPEED. This name is also used for changing parameters during operation or commissioning. A function block can be used repeatedly in the program with different symbolic names. The interconnection parameters to other function blocks or the rest of the program. The sampling time, which specifies how often the function block is to be processed. Other paramters such as time constants or gains required by the function.
In order to prevent dead times, which are multiples of the sampling time, the execution sequence of the closed-loop program must correspond to the signal flow in the control configuration. The programming unit must check both the total execution time of the program including contributions due to the operating system and also the execution sequence. In applications where function blocks with different sampling times are used, the operating system of the controller must supervise the mu1tiplexed execution of the closed-loop program. In the controller described in this paper, only one fixed sampling time was realized for the closedloop functions.
HARDWARE AND SOFTWARE REQUIREMENTS FOR REAL TIME EXECUTION OF THE HIGH LEVEL LANGUAGE A high level computer language can be executed in various ways. Basically one differentiates between the following: 1. Compilation and subsequent execution of the compiled machine code. 2. Interpretation of the high level language by jumping to a particular machine code segment for each statement. 3. Direct execution of the high level language by a special processor whose instruction set is identical to the high level language. The first two methods are common as the majority of standard microprocessors have instructions sets which do not correspond to a high level language. The third method is the fastest but requires a special processor. Benchmarks indicated that standard microprocessors were too slow for the real time closed-loop and logic tasks. Therefore a special direct execution architecture based on the 8X300 was chosen for the high level language digital drive controller. This microprocessor architecture was based on the principle of direct and
optimal interpretation of the high level language ( Flynn, 1980). A block diagram of the architecture is shown in Fig. 2. The CPU consists of three processors, i.e. the master processor, the slave processor and the multiplier, which can all operate simultaneously. The slave processor is responsible for accessing the external bus and fetching the next user high level language statement while the master processor is executing the current one. The multiplier performs a 16x16 bit multiplication in 4~s as soon as the operands are loaded by the master processor. Both the slave processor and multiplier are given commands via the microinstructions of the master processor. A fast 1Kx8 bit internal RAM is used to provide 1024 additional registers for the CPU, which speeds up the control algorithms as all operands can be stored internally. The adder in the address input of the fast RAM simplifies and speeds up vector address decoding of the high level language. In contrast to standard microprogrammed systems, the hardware structure and result i ng highly orthogonal microinstruction set were optimized for industrial control applications (Tendulkar, 1982). A block diagram of the complete high level language digital drive controller with one drive is shown in Fig. 3. The speed is measured either using a tacho with AID conversion or a novel measurement system based on a resolver and phase-locked loop (Tendulkar, 1979). The armature current is measured using a shunt and an AID converter. The chopper control module converts the digital output of the controller into pu1sewidth modulated switching signals for the output power transistors. Digital input and output modules are used for logic control. The interface module is used for receiving setpoint commands fom the numerical control or robot control systems. Both d.c and a.c. motors can be controlled by using appropriate chopper control modules. The high level language drive controller contains a real-time microprogrammed operating system, which controls all major functions of the HLL controller. It is responsible for start-up, supervision of user program execution and shut-down. In addition interrupts and faults are also handled by it. The interleaved execution of the logic and loop programs is controlled by the operating system. This simplifies user , programming as the logic and closed-loop control programs can be loaded in separate modules by the user. The operating system was microcoded so that all CPU resources could be utilized and so that the implementation of extra statements exclusively for the operating system would be avoided. After power has been switched "on" or after a reset, an initialization procedure is executed in order to bring the hardware to
User-reconfigurable Digital Drive Controller a ready condition. The process image is then updated and cyclic execution of the user logic program is started. During the first cycle of the logic program after start-up, the closed-loop program is disabled as the logic conditions for all closed-loop controllers have to be brought to an initial state defined by the user in the user logic program. The closed-loop program is enabled for all subsequent cycles and is executed every 1ms. Fig. 4 shows the mu1tiplexed execution of the logic and closed-loop user programs. The logic program can be interrupted by system faults, by the 1ms clock for the closed-loop program and by a DMA request, in order of priority. The closed-loop program can only be interrupted by system faults, which ensures a constant sampling time. Whereas the complete closedloop program is executed at each 1ms interrupt, the logic program is asynchronous and its execution is continued after each 1ms interrupt, until the END PROGRAM statement is reached. Before updating the process image, a wait-loop is entered. Only after the next 1ms closed-loop interrupt has been processed, is updating carried out. This prevents the updating being interrupted by the closed-loop program. Transfer flags, which are updated with the process image, are used for synchronizing information transfer between the logic control and closed-loop programs. EXPERIMENTAL RESULTS The user program for a simple d.c. drive control application is shown in Figs. 5 and 6. The sta·tement list representation of the logic and closed-loop algorithms is shown in Fig. 5. A cascaded speed controller (PIalgorithm) with a minor current loop is used. The complete configuration is shown in Fig. 6. A different configuration can be realized by inserting different interconnection parameters in the function block e.g. minor acceleration loop by using the parameter E2: w CIB,O instead of I CIB,O in Function Block 2. Adaptive control can be realized by storing the parameters KP and KI of the PlC function blocks in flag words instead of specifying them as immediate values and using a "adaptive" function block to modify the values. Structure variable controllers can be realized by "calling" the function blocks conditionally. In Fig. 6 the CIB,O function block is used to generate the actual values from the resolver and current measurement. It also outputs the control value from PIC,l to the chopper at the start of the next sampling instant. Hence the CIB function block is the interface between the software and hardware. The logic control is used to enable the controllers, the chopper and to release the brake. It also indicates whether the controllers are operating correctly (i.e. within the limit values) and whether the speed is zero.
489
The PI-control algorithm required 160~s instead of the estimated 50~s. The reason for this is the additional microprogram length required for checking that no overflow has occurred during addition or subtraction and if required substituting the maximum positive or negative values in case of overflow. A "saturating" arithmetic unit could be used in future systems for increasing the speed to the specified 50~s. A floating point unit would offer advantages for parameter selection. The logic statements such as the AND INPUT statement required less than 2~s. A total microprogram of 1K words of 40 bits width was needed; this corresponds to 5K bytes when comparing with 8 bit processors. All logic statements together required 48 words. The PI-control microprogram required 268 words. The operating system took up 448 words. Steadystate behaviour and step response of a cascaded proportional plus integral action speed and current controller implemented with the digital controller were comparable to that of an analog control system for speed control of a d.c. motor. CONCLUSION The work has shown that it is possible to design a high level language digital drive controller for use in industrial logic and closed-loop control applications. Secondly it has shown that such a high level language digital drive controller with software as well as hardware "blocks" offers significant advantages for implementing not only conventional PI-controllers but also adaptive, non-linear or structure variable closed-loop controllers. Such a system can be used effectively in research and academic institutions for investigating new control techniques. The high level language digital drive controller represents one of the first universal programmable controllers, which can carry out logic control and fast closedloop control tasks in industrial automation with equal ease. The introduction of appropriate high level language execution microprocessor devices for such controllers would reduce their cost and hence increase their application even further . ACKNOWLEDGEMENTS A major part of the work and the literature survey described in this paper was done for an external Ph.D. degree by the first author, under supervision of Dr. H.R. Bolton Imperial College, Dept. of Electrical Engineering, London. The system was subsequently developed further by the second author. The experimental work was carried out at Siemens AG, Geraetewerk Erlangen, West Germany. The system described is purely experimental and does not necessarily correspond with the official views or products of Siemens AG at present or in the future.
G. A. Tendulkar and M. Bete
490 REFERENCES
Berger, H., W. Friedrich, G. Hinsken and S. Schwaiger (1979). Rational Programming of Automation Tasks with STEP 5. Siemens Power Eng., June, I, 6, 180-183. Bollinger, J.G., G. Stute, H. Van Brussel, J. Dinsdale (1980). Digital Controls and Feed Drives State-of-the-Art and New Deyelopments. Annals of the CIRP, Vol.29/2/1980, 497-506. Cragon, H.G. (1982). The Myth of the Hardware/Software Cost Ratio. IEEE, Computer (USA), December, 100-101. Fischer , J., R. Monz and M. Vrhovnik (1979). Antriebsregelung mit dem Mikroprozessorsystem Logistat CP80. Mitt. AEG-Telefunken (Germany) Tech. 69, 1/2, 45-52. Flynn, M.J. (1989). Directions and Issues in Architecture and Language. IEEE, Computer, (USA), October, 5-22. Glas, H., R. Koch, W. Stripf and F. Studer (1979). Programming Simatic S5 Controllers with the 670 Programming Unit with Graphic VDU. Siemens Power Eng., May, I, 5, 49-152. Hoft-,-R., T. Khuwatsamrit and R. Mc Laren (1982). Microprocessor Applications for Power Electronics in North America. In Microelectronics in Power Electronics and Electrical Drives. ETG/GHR Conf., Darmstadt, Germany. VDE-Verlag. 29-42. Kamiyama, K., N. Azusawa, Y. Miyahara, T. Ohmae and T. Kirisawa (1978) . Microprocessor-Controlled Fast-Reponse Speed Regulator for Thyristorized Reversible Regenerative DCM Drives. IEEE IECI'78 Proc., (USA), 216-222. Kuo, M.H. (1981). Distributed Computing on an Experimental Robot Control System. IEEE IECI'81 Proc., (USA)401-406 A. (1977). Application of Kusko, Microprocessors to AC and DC Electric Motor Drive Systems. IEEE IAS '77 Annual Conf. Proc., (USA), 1079-1081.
Leimgruber, J. (1977). Direct Digital Control of a Thyristor-Controlled Synchronous Machine. 4th. IFAC Int. Symposium on Multi-Variable Technol. Systems, Friedricton, Canada, 549-556. Ohmae, T., T. Matsuda, T. Suzuki, N. Azusawa, K. Kamiyama and T. Konishi (1980). A Microprocessor-Controlled Fast-Response Speed Regulator with DualMode Current Loop for DCM Drives. IEEE Trans. Ind. Appl. (USA), IA-16,~ May/June, 388-394. Perdikaris, G.A., T.L. Beck and W.R. Loendorf (1978). A Microprocessor-Based System for DC Servo Control. Wescon'78 ConL Records, (USA), 22, 1/3:1-8. Schmidt, G. and R. Swik (1978). Softwarefragen beim Einsatz von Mikroprozessoren fuer MSR-Aufgaben. Regelungstech.Prax.,Germany, 5, 143-150 . Schoeffler, J.D. (1981). The Incorporation of Advanced Control Techniques in Process Control Systems. In E.J. Kompass and T.J. Williams (Eds.), Annual Conference, Purdue Advanced Control University, Control Eng. (USA). 17-46. Tendulkar, G.A. (1979). Measurement of Speed, Position and Acceleration of Electrical Drives in MicroprocessorBased Control Systems. 2nd.lnt.Conf. on Variable Speed Drives,IEE (UK). 171-174. Tendulkar, G.A. (1982). High Level Language Digital Drive Controller. IEEE IECON'82 Proc., (USA), 196-201. Tendulkar, G.A (1983). Microprocessor-Based Industrial Controllers. In S.G. Tzafestas (Ed.), Microprocessors in Measurement, Signal Processing and Control. Riedel, Holland. Vaughan J.C., M.E. Barry, J.E. Higgins and (1982). Real-Time J.M.D. Murphy Operating System Performance in the Control of a Chopper-Fed DC Motor. In Microelectronics in Power Electronics and Electrical Drives, ETG/GMR Conf. VDE-Verlag, Germany. 103-110.
Stat eme nt
:- - - - - 'Syst"""em"b-us- r i:ttern-a1 ) - - -
Log i c. co ntr ol g ro up AND I NPUT, ' AN D NOT INP UT AN D OUTP UT, AN D NOT OUTP UT AND FLAG, AND NOT FLAG OR INP UT, OR NOT INP UT OR OUTP UT , OR NOT OUTPUT OR FLAG, OR NOT FLAG EQUALS I NPUT EQUALS OUTPUT EQUAL S FLAG
I
AI , ANI AQ,ANQ AF ,ANF OI ,ONI OQ ,ONQ OF ,ONF .1
Org an iz at ion a l group REA D INP UT, OUTPUT , FLAG BYTE READ I NPUT , OUTPUT , FLAG WO RD REA D CONSTANT BYTE OR WOR D WRITE INP UT, OUTP UT , FLAG BYTE WRI TE I NPUT, OUTP UT , FLAG WORD EN D PR OGRA.~ EN D PROG RAM CONDITIONAL NO OPERATI ON
-~
I
.Q . F
·~ ~ -
KAG CIB NEG PlC
·
• "0 0 :I: E
High Level Language Statements
0
u
c
~
c-
0 u
.:
o
~
~ !
c0
.c U
c-
~
0
0
"'"0 0
c;
.
E
-;;,
::;
o
-0
o
E
!
o
=>-0 0
0..
U
E
_ _________ J
Controller cas ing
. c-
RIB, RQB , RFB RIW, RQW, RFW RCB , RCW WIB,WQB,WFB WIW, WQW, WFW EP EPC NOP
u
0
c
Loo p c on t r o l group KAGN ITUDE f~NC TI ON BLOCK CHOPPE R I NTER FACE BLOC K NEGAT E FUNCTI ON BLOCK P I- CONTROLLE R FUNCTI ON BLOCK
- ----- -- - -
I
o
Num er ieal Control , Robot Contro l
Digital Drive Controller Hardware Configuration
User-re configurable Digital Drive Controller
instructions
slave
address
control
address
control
491
data
user high level language
16 x 16 Multiplier
System Timing
Fi
Map. PROM
interrupts
~
.2
user loop prog.
Fig.4 Multiplexed Execution of User Loop and Logic Programs
direct memory (DHA)
AND AND
Fig.5 (right) Logic Program
rNPUT INPUT FLAG
0.1 0.3 0.0
If SYSTEM SWITCH ON AND FANS ON SET SYSTEM ENABLE FLAG
0.2 0.4 0.0 0.1
If CONTROLLER SWITCH DISABLED OR BRAKE NOT RELEASED OR SYSTEM ENABLE FLAG NOT SET SET CONTROLLER DISABLE FLAG
OR OR OR
NOT NOT
INPUT INPUT FLAG FLAG
CIB 0 SETPOINT: INTERFA CE OUPUT : Pl C 1 ( I =CU RR ENT ) ( 8=PO SITION ) ( ", =S PEE D) ( ,, =ACCELE RA TI ON)
OR OR
NOT
FLAG FLAG OUTPUT
0.0 112.0 0.1
OR OR
NOT NOT
INPUT FLAG OUTPUT
112.0 0.0
If CONTROLLER SWITCH DISABLED OR SPEED NOT ZERO SET BRAKE RELEASE OUTPUT
PlC El :
AND
FLAG FLAG
0.1 120.7
IF CONTROLLER DISABLE FLAG SET DISABLE CONTROLLER 0
AND
FLAG FLAG
0.1 121. 7
IF CONTROLLER DISABLE FLAG SET DISABLE CONTROLLER 1
OR OR OR OR
FLAG FLAG FLAG FLAG OUTPUT
112.7 112.6 113.7 113.6
IF" CONIROI.LER o +LlMIT ACTIVE IF CONTROLLER i)-LlPlIT ACTIVE IF CONTROLLER 1 +LIPlIT ACTIVE If CONTROLLER 1 -LIPlIT ACTr"VE SET OUTPUT SIGNAL 0.2 "LlIUTS"
FLAG OUTPUT
112.0
FLAG OUTPUT
0.1 0.5
(below) Loop Program in Statement Li st
0
E'J"
KP: KI : + :
( OUTP UT) PI e El: E2: KP: KI: + : ( OUTP UT)
CIB 0,. CIB 0 '" 7FFFH 0100H 7FFFH OBOOH
PlC 0 output CIB 0 I 1000H OOAOH 7FFFH OBOOH
AND AND EP
0.2
0.2
0.4
If SYSTEM ENABLE FLAG SET OR SPEED NOT ZERO SET CHOPPER ENABLE OUTPUT
IF SPEED ZERO SET OUTPUT 0.4 "SPEED ZERO " If CONTROLLER DISABLE FLAG SET SET OUTPUT 0.5 "CONTROLLER DISABLED" END OF LOGIC PRDGRAPI
G. A. Tendu1kar and M. Bete
4 92
LOGIC CONTROL PROGRAM
LOOP CONTROL PROGRAM
10.1----1--1 I I FO.O IO.3---1 & 1-+-----1--1 +----+ I I +---01 ~l l---QO.I +----+ Chopper Enable
FI12.0--------+---0-1--1 I
I
+---01 ~l l---QO.O I +----+ Brake
ICIB,O
I
I
I
INTERFACE------ISETPOINT I~-.- S CIB,O OUTPUT PIC,lz_xICHOPPER OUT FROM I I CURRENT 1__ c= I CIB,O I POSITIONI-c-= e CIB,O I SPEED I---= w CIB,O I ACCLN I=-=- w CIB,O I I +
-----------------
I I +
Enable
10.2----------+-----1--1 10.4--------------01 I FO.O--------------ol ~l I---FO.I +----+
System Enable
F1l2. 7--------------1--1 FI12.6-------------1 I I FI13 . 7-------------1 FI13.6-------------1 ~l I---QO.2 +----+
Limits Active
FI12.0-------------~---QO.4 + + Brake Released FO.I---------------~---QO.5 + + Controller Disabled
END LOGIC PROGRAM
IPIC,O (SPEED)
I
I
I
FO.I-----------IDISABLE (FI20.7) I
S CIB,O._-m ____ IEI (+) w CIB,O-------=IE2 (-) '7FFFH----_----IKP IOIOOH--=----__ IKI '7FFOH---______ I+LIMIT 10800Hc------•• I-LIMIT
I I
I I I I F112.7 I---- +LIMIT ACTIVE F112.6 I---- -LIMIT ACTIVE
I I
I I
I OUTPUTI==-= OUTPUT PIe,O +----------------+
IPIC,1 (CURRENT)
I
I
I I I I
FO.I-----------IDISABLE (FI21.7) I
OUTPUT PIC,O---IEI (+) I CIB,0-------_IE2 (-) IIOOOH----____ =IKP 100AOH---=c-c._IKI #7FFOHc--------I+LIMIT 10800H----__ =_=I_LIMIT I I
I I I
F113.7 I---- +LIMIT ACTIVE F113.6 I---- -LIMIT ACTIVE I
OUTPUTI===- OUTPUT PIC,1
+-----------------+
END LOOP PROGRAM
Fig.6
Program Configuration for d.c. motor control (Graphic Programming)