scieee AI-readable full text Open interactive document viewer

Proceso de automatización de un sistema elevador

Noval Sánchez, Samuel

Abstract

Ingeniero Técnico Industrial, Especialidad en Electricidad

Full text

UNIVE RSITY OF VALLA DOLID INDUST RIAL ENGINEERIN G SCHOOL FIN A L PROJECT DEGREE INGENIERO TÉC NICO INDUST RIAL , EL ECETRICIDA D AUTOMATION PROCESS OF AN ELEVATOR SYSTEM SAMUEL NOVAL SÁNCHEZ 2012 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 2 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 3 A mis padres Alfre do y Mª D ol ore s, mi hermano Alf redo y mis tías, Fl or y N ani por su ayud a y apoyo incond icional, sin ellos nada de esto habría sido posib le. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 4 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 5 R ESU M E N Un ascenso r es un sist ema de transpo r te ve rtical diseñado para mover personas o bienes entre di ferentes niveles. Puede usarse para moverse arriba o abajo en un edifi cio o en una cons trucción s ubterránea. Está compue s to por partes mecánicas, eléctricas y electrónicas que trabajan conjuntamente p ara obtene r un sis te ma seguro de mo vili dad. La cabina debe acu dir al piso solicitado por el usu ario, ya sea interna o extern am ente. El principal objetivo del presente proyecto es d iseñar tant o la instalación eléctrica c omo el control automático para un ascensor instalado en un edificio de viviendas de diez pisos, ten ie ndo e n cuenta todos los aspectos relacionad os con la seguridad. El control automático del ascensor es llevad o a cabo mediante un PLC (Controlador Lógico Programable), el cual es un d ispositivo electrónico diseñado para programa r y controla r procesos secu e nciales en tiempo real. Con el objetivo d e demostrar la f u ncion ali dad del a lgori tmo diseñado, se ha realizado una simulación con u na maquet a de un ascensor de cuatro n ivel es, ut ilizand o un controlador de “ Klockn er Moeller” llamad o PS4 -201-MM1, el cual se programa mediante el so ftware “ Sucosoft-S40 ”. -PALABR AS CLAVE.- Control Dahlander Ascensor Grafcet PLC PS4-201-MM 1 Seguridad Sucosoft AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 6 -INSTALACIÓ N ELÉCTRICA.- La in st alación e léctrica c omp re nde la instalación y d imensionamiento de la caja de protecciones del ascensor , i nsta lació n del panel d e control, instalación de los contro l es manuales del cuarto de máquinas y d e cabi na, sen sores, ilu mi nación, tomas de corr i ente, conexion a do del motor, etc. La caja d e protecciones est á compuesta por u n inte r ruptor general de corte magneto-térmi co con mando manual con enclavamient o, p ara evit a r la con exión accident al durante los t r abaj os de mantenimiento o reparación del ascensor. Para la protección contra co ntactos indirectos la ins talaci ón cuenta con interruptores diferenciale s de 30mA d e corriente mínima de activación, mientras que para la protección contra sobrecargas y cor tocirc uitos los di s positivos utilizado s son interrupto r es magneto-térmicos e in terruptores f usibles. Para la protección de l motor ante sobre cargas se in st ala u n re lé de sobre carg a de disparo r etardado, p ara evitar el disparo en el a rra nque. E n la caja de protecciones también se inst a lan los con tactores (relés) qu e actúan sobre las diferente s bobina s del mo t or. El panel de contr ol alberga en su interi o r la fuente de alimentación, q ue transforma la cor rient e de 230 V C.A. a 24V C.C. para h acerla apt a para el fun cio namiento del controlado r y los s ensores, y el p r opio control a dor. Los paneles de mando man ual se in s talarán en el t ec ho de la cabina y en el cuarto de máquinas y están compuestos por un botón de parada, uno de subida y otro de bajad a, para p osibilitar al ope r ario el movimient o manual de la cabina del ascensor durante los trabajo s de mant e nimiento o re p aración del ascens or. Para la ilumin aci ón de la cabina se ha instalado u n pane l d e LEDs, con encendido y apagado controlado por el PLC, lo q u e con ll eva un notable ahorro de energía en comparación con ot ros di sposi tivos de ilumin ació n. Pa ra la iluminación del cuarto de máquinas, del hueco y d el foso h an si do instalad os tubos fluorescentes de 8W d e poten cia. La inst a lación y d imensionamiento d e la iluminación d e emergencia y antipánico ta m bién se co ntempla en el pre sen te proyecto . Las tom as d e corriente instaladas en el cuarto de máq ui nas, el hueco y el fo so son tomas Sch ucko de 16A. El mo t or encargado del mo vimiento de la cabi na es un motor trifásico sin redu c tora de 3kW de p otencia con cone xión Dah lander d e dos velocida des con AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 7 inversión de gir o y freno e léctric o. Se incluyen tod os los esquemas de cone xión de potencia y de mando del motor. -SEGURIDAD.- Todos los aspectos relacionados con la seguridad d e los u suarios del ascensor han sido tenid os en cuenta . Para ello, la in s talación cuenta con diversos sen sores, como son l os sens ores de tensión del cable trac tor , sensor de fallo de s umin is tro eléctrico, sensor de sob r epe so, se nsores d e p uer tas, límit es de carre ra, limitad o res d e velocidad , amortiguadores de f re nado de e mergencia, et c. La inst alació n cue nt a con una batería co nectada en paralelo con el circui to del ascensor para suministrar suficiente energía eléctrica como para propiciar que la cabina llegue a la planta b aja del edificio (según la vigen te no r mativa europea sob r e ascensores) en caso de un f al lo de suministro. -SISTEMA DE POSI CIONAMIENTO.- El sist ema de po sicio namiento es el co njunt o de sen sor es instalados durante todo el recorrido d e la ca bina encargados de indic arl e al control automático la posición de la cabin a en todo momento. El sistema de p osicionamiento elegido para el pres ente proyecto c onsta de imanes colocados en l a s p ropias guías me tálic as del ascensor a lo largo d e toda su trayecto ria , y tres senso r es m agnéticos in s talados sobre la cabina. Dos de lo s sensores son los encargados d e detectar los cambios de velocidad del ascensor cu and o la cabina llega al n iv el sol icita do por el usu ario. Para ello h an de in s talarse d os imanes por nivel, uno para el cambio de velocidad en subida y otro para el cambio de velocida d en bajada . El tercero de los sensor es es ut ili zado p ara dete c tar cuándo el ascensor ha llegado al nivel solici tado p or el usu ari o, y debe por tanto detenerse. En resumidas cuent as, cuando un usuario solicita el ascensor en un determin a do n ivel, la cabina arr anca en velo cida d rápida hasta uno s instantes antes de llegar al nivel solicita do, d onde cambia a ve locid ad lenta. La cabi na viaja en ve locidad lenta ha s ta que alcanza el n ivel y se detiene. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 8 Las ventajas principales d e este sist ema de posicion amie nt o so n principalmente la facilidad de instalación y modificación de los imanes y sensore s, así como su redu ci do mantenimiento. -CONTRO L DE PUERTAS.- El control de pue r tas se reali za mediante control automático a través d e un motor de a pertur a de puert as situado en el t ec ho de la cabina. Las puertas instaladas son de tipo telescópico con apertura de derecha a izquierda. La apertura y cierre de las puertas externas se r eali za al mismo tiempo que las internas, gracias a u n a elongación de la parte móvil del mecanismo, permitiendo la man io bra únicamente cuando la cabina se en c uentra perfectamente alin ea da con la puerta de acceso a cada planta, lo que conlleva varias ventajas, como son la simp li ficación de la in s talación , al t ener tan sólo un contr ol de puertas, y la mayor segur i dad al p ermitir la apertura sólo cu a ndo la cabina se en c uentra e n un determinado n ivel, ev itan do así la posible precipitación de personas al hu eco del ascensor. El me canismo const a de u n motor de apertura y cierre y do s finale s de carrera, uno para cierre y otro para ap ertura. Para la seguridad se han instalado ta mbién un sensor óptico para evitar el cierre de l as puertas cuando una p erson a u ob je to se encuentr a n en la trayectoria de cierre de las puertas, y un botón de apertura de puertas incluido en la botonera interna de la propia cabina del ascensor, para abrir las puertas en caso de eme r gencia. -SIMULACIÓN .- Con el ob j etivo d e demostrar el f u ncion ami ento d el algoritmo creado, se ha realizado una simulación para un ascensor d e cuatro nivele s utilizando un PLC d e l fabricante Klockner Moeller , en concreto el modelo PS4-201-MM1. Este controlador consta d e ocho entradas d igitales y ocho sal idas di gitales, funciona con una tensión de 24V C. C. y permite la co nexión de módulos de e x tensión. El software utilizado para p rogramar d icho controlad or es Sucosoft-S4 , el cual sólo permite la programación en modo Lista de In strucciones (IL). La fu nci ón más característi ca de este sof tware es la cono cida como Función de Con trol Se cuencial (SK), la cual está basada en los esquema s GRAFCET, ha cien do la programación basán d ose en AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 9 dichos e sq uem as m ucho má s sen cilla. El program a creado para e l control d e la maqueta de sim ulación se inclu ye en los anexos del p r esente pro yect o. Una de las p rinci pale s limitaciones para esta si mu lación e s el limitado n úmero de entradas y salidas de l cont r olador. Para el sistema d e posicionamiento se utilizan sensores ópticos, u n o por cada n ivel, conectados e n las entradas I0.0 a I0.3. Existe un botón p or cada p iso conectados en las entradas I0.4 a I0.7, quedando a sí ocupadas toda s las entradas disponibl es del controlador . Para las sal idas tan sólo se conectan Q0.1 y Q0.2, p ara actuar so br e las bobin as d el mot or, una para subida y ot r a para bajada . Una vez demostrado e l al goritmo p ar a la simulación, se p u ede admitir que el algoritmo es válido para un ascensor con n pisos o n iveles. En e l caso concreto que en este proyecto se describe, se ha decidido la creac ión d e un algoritmo para un ascensor en un edificio co n d i ez niveles. -CONTRO L AUTOMÁTICO PARA DI EZ NIVELES.- Debido a las limitaciones tanto de software y d e h ar dware como a la p oca disposición de med i os para la creación d e una maqueta para d i ez n iveles, se de cidi ó la realización ú nicamente de lo s e squemas GRAFCET para este caso, siguiend o el mismo algoritmo u tilizado para la simu lación con c uat ro niveles, in cl uyendo t odos los elementos a dicionales necesarios p a ra el control y seguridad del asce nsor. Así, para el presente cas o, se necesitan un número mayor de entradas y salidas, por lo q ue es necesaria la instalación de módulos de expansión. Los módulo s de expansión aptos para este controlador (expansión c o ncentrada o local) son los módu l os LE4-501- B S1, los cuales constan de ocho e n t ra das digitales y seis salid a s digitale s más dos conexiones digitales que pu ede n ser utilizadas com o entradas o como salida s se gún sea necesar io. Funciona con corrien te continua 24V, y el nú mero máximo de módulos que pueden conectarse al con trolador PS4 e s 7. En total se necesitan 6 3 entradas, ent re sensores, ele m entos de se guridad, boton e ras externa s e internas, etc. p or lo que se necesitan conectar un total de 7 módulo s. El nú mero total de salid as e s 13, cuat r o para el motor que cuent a co n velocidad lenta y rápida, en subid a y en bajada, un a para la activación del freno, dos para el con trol de puertas, y el resto para control de l uces y alarmas de seguridad. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 16 P R O JE C T D ES C R IP T IO N AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 17 1. PROJECT DESCRI PTION 1.1. BRI EF HISTORY OF LIFTS The first reference of the use of li f ts is the work of the roman architect Vitruvio, who said that Arquimedes bu il t the firs elevator in 23 6 B.C. In me dieval times, t he lifts worked with t he help of animals or manually to t ra n sport persons or materia ls between different levels. In its ea siest way, it was b uilt wit h a woo den box h anging from a wire. But lifts as they are known no w adays ar e dated from the XIX centu ry. In 1 823, in London, Burto n and H ormer built what they called “ascending room”, whic h could elevate 20 persons at a he ig ht of 37 meter s. In 1853, E l isha Graves Otis invented the first emergency b rake fo r lift s, which was actuated in case that the cable got b roken, or the lift reached a hig h speed. The security device de sig ned by Otis is very similar to one of the d evices that are used nowadays. In 1857 , March 23, Otis installed hi s first elevator in New York thro ugh his company “OTIS”. In 1880 , t he Germa n inventor Werner von Sie m ens introduced th e ele ctr ical motor i n elevators. In 1957, Au g ust 30, the fir st automatic system for doors was installed, wha t finished wi th the process of openin g and closing doo rs manually. In 1996, the com p any KONE built the first viab l e lift wit hout machine r o om. In 2003, ThyssenKrupp Elevators presented the “Twin” elevator: two cars in the same ho l e. The World Trade Cente r, in New York (EE.UU), with it s two towers o f 110 levels, has 244 e l evators with a capacity up to 453 6 Kg and s peed up to 488 m /min. Figure 1. Elisha Otis's Elevator Patent Drawing, 01/15/1861 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 18 1.2. OBJE CTIVES OF THE PROJECT The main goal o f the project is to design an automat ic control for an elevator system with 10 le vels for a m aximum o f 6 p e rsons (450 Kg). In order to demonstrate the functionally of the algorithm designed, a simulati o n has been made with t he PLC PS4-201-MM 1 f or an e levator with 4 le vels , princip al ly due to the limitat io n of i nputs and outp uts of the PLC. For the simulation, the goal is to de sign t he GRA FCET and the program for this PLC u sing “Sucosoft”, whereas that f or the case with 10 levels the goal is to design the GRAFCET fo r the automatic cont rol, t aking into account everything related t o security devices. A second o bj ective is t o de sign the electrical installation fo r t he e leva tor, which involves the connection between the power supply, the motor an d the PLC, t he connect i on of the diffe r ent de vices to the inputs an d o u tput s of the PLC, and the installation of l ight and p ower plugs. Th e design o f elect rical p ro tect io n for motor and person s is also included. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 19 1.3. MA R KE T ORIENTAT ION The current lifts can be divid e d in two big categories: lifts with machine room, and lifts without it . T h e last cat egory has gr eat a dvantages as f ar as spa ce con cerns, letting the lift, fo r inst a nce, have access in the r o of a t the last floor o f a building. A se cond division can be mad e according t o the typ e of energy u se d to move the car. Thus, the car can be mo ved b y electr ici ty or by a pist on m oved by a liq uid. T he first group are called electromech a nical elevators and consist in an electrical motor that moves t h e car and i ts counte rweigh t, whilst th e second group are called hydraulic elevato rs and consist, as it was said at th e beginn ing, in a piston mo ve d by a liqu i d, generall y oil, to ma k e a platform go up and down. According to the speed o f t h e car, three types of lifts can be f ound: one sp ee d elevato rs, two speeds elevato rs or var ia ble speed el eva tors. The classi fication can be easily obse rve d in the following d iagra m: ELEV A TO R FO R P ERSO N S O R MA TERIA LS WITH MA CHIN E RO O M WITH O UT MA CHI NE RO O M HYDRA UL IC E LECTR OME CHA NI C O NE SPEE D TWO SPEE DS ON E SPEE D TWO SPEE DS VA RI A B LE SP EED ELEC TRO M ECH A NIC Figure 2. Elevators classification AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 20 1.3. 1. One speed ele vators Elevator s with one speed are the mo st numer ous typ e o f lifts installed nowadays, since they we re the only type of el evators t hat were p r oduced and installed unt i l 1990´s. Its operation is very simple. The car goes to a gi ven floor at a constant s pee d, and i t stops as soon as it arrives. This t yp e of el evators is n ot produced or installed nowadays for persons, princip al ly due to the ab rupt start an d stop. A not h er rea so n is the low speed of the car in this conf ig uration. 1.3. 2. Two speed elevators Two speed el evator s are the most current marketed el evators. In this configuration, t he car m oves at a constant speed, but a few seconds before th e t arget floo r is reach e d, the car changes to a lower speed un til it st o ps, result i ng in a most comfortab l e trip be tween levels, as well as a ch ance to increase the speed of the car. 1.3. 3. Var iable speed elevator s The variab le speed elevators are mainly used in h igh qu ali ty inst allations, due to a great number o f users per hour. In this type of li fts, t he spe ed is varied b y modif yi ng either the frequency or the voltage of the electrical power supply for the motor, with the aim of causing soft and progressive accelerations and deceleration s. Th us, t he user s practically cannot det ec t abrupt movement s and a hig her speed of the car is allowed. Figure 3. Siemens frequency variators for phase motors AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 21 The current project is based on the configuration with machine r oom and t w o speed s. The main rea so n t o choose th is configurat ion is th e mark et. While the one speed elevator is not used anymore and the variable speed elevator is more comp lex , expensive and fo r specific ap plications, the two spe eds elevator can be used in most of the residential bu il dings or r e form s, whic h are the mo st extended markets n owadays. The two spe e ds motor al so represents an energy savin g with respect to the one speed ele va tor by redu ci ng the friction a t the stop and the energy peaks at the s tart. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 22 1.4. DE SCR I PTION OF TH E INSTALLATI ON 1.4. 1. Main struc ture In an elevat or w ith machine room, t he main structure is composed of five different parts:  Hole: is the space of t h e b uilding provided to th e moveme n t of the car, it contains also the counterweight, t he guides, limit switches, sensors, doors a nd traction cables.  Machine room: this room is at the top of the installation and inside it are locat e d the mo tor, th e tracto r group, the protections and all elements of a utomati c and manual controllers  Car: is th e p latform where th e u sers get into to go up an d down trough different levels. It must b e a closed structure, provided with automatic doors to allow the users get i nt o the car.  Counterweight: in the case of an ele ctromec hanical ele va tor, as a general ru le, a counterweight is installed in the opposite side of the traction cable in order to compensate th e charge o f the car and the person s i nside , th us, t he n ecessary power of the mot or is considerably redu ce d  Pit: is l ocated at the bo t to m of the installation. T here can be fou nd the security damp e rs and other sec urity devices All this p a rts are shown in the next f ig ure: AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 23 Figure 4. Main structure In th e n ext figure, a more detailed di agram o f the componen ts is shown. Al l necessary comp o nents for e lectrical installation an d automation of the elevator are described in the n ext section. MACHINE ROOM CAR PIT COUNTERWEIGHT HOLE AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 24 Figure 5. Components AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 25 1.4. 2. Traction gro up The tract io n gro up is located i n the machine room an d it is co m posed of the following parts: Figure 7. Motor distribution The pulle y is the p ar t integr al with the moto r roto r, and from it the traction cables hang to make the car go up and down dep end i ng o n the direction of rotation of the rotor. The brake is actuated through the contro l ler or when the power supp ly is off. The m otor th a t has been chosen f or the current p r oject is an electrical asynchron o us pole-changing gearless motor with t wo s pee ds (2-4 poles). Th e p ower of the mo tor is 3 kW , the main characteristics o f the motor f or both speeds ar e shown in the next t a ble, and the ju stification of t he power cho sen can be found at the “calculations” secti on. POWER CV | kW SPEED (rpm) I n 400V (A) C n (Nm) cos ϕ η (%) 6 - 4|4 - 3 2850-1420 9-8 22,4-19,6 0,82-0,85 78-79 Figure 6 . Tractor group AUTOM A T I O N P R O C E S S O F A N E L E V A T O R S Y S T E M PROTECTION AG A INST IND I R E C T C O N T A C T S : To protect the ins t a l l a t i o n a g a i n s t i n d i r e c t c o n t a c t s , Residential- Current C ircui t B r e a k e r ( R C C B ) . disconnects a circu it whe n e v e r i t d e t e c t s t h a t t h e be tween th e energize d c o n d u c t o r a n d t h e r e t u r n imbalan ce may indicate cu r r e n t l e a k a g e t h r o u g h t h e b o d y o f a p e r s o n w h o i s g r o u n d e d and accidental ly t ouc hing t h e e n e r g i z e d p a r t o f t h e c i r c u i t . A l e t h a l from the se condition s. RC C B s a r e d e s i g n e d t o d i s c o n n e c t q u i c k l y e n o u g h t o p r e v e n t injury caused by such s against overcu rr ent (overlo a d ) o r They must be p rovi d e d w i t h a t e s t e r b u t t o n t o c h e c k t h e i r o p e r a t i o n . A U T O MATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez Figure 15. Fuse and fuse curve P R O T E C T I O N A G A I N S T I N DIRECT C ONTACTS: T o p r o t e c t t h e i n stallation again st indirect contacts, the d e v i c e i n s t a l l e d i s C u r r e n t C i r c u it Breaker (RCCB). It is a n electrical wir i n g d i s c o n n e c t s a c i r c u i t w h enever i t detects tha t the electric current t w e e n t h e e n e r g i z e d con du ct or a nd the return neutral condu c t o r . S u c h a n i m b a l a n c e m a y i n d i c a t e c u r rent leakage th rough the body o f a per son w h o i s g r o u n d e d l y t o u c h i n g the energized part of th e circuit. A l ethal f r o m t h e s e c o n d i t i o n s . R C CBs are de signed to discon nect quickly eno u g h t o p r e v e n t i n j u r y c a u s e d b y s u c h s hocks. They are not intend e d to pro v i d e p r o t e c t i o n ( o v e r l oad) or short-circuit cond it ions. T h e y m u s t b e p r o v i ded with a tester butt o n to c heck their o pera t i o n . Figure 16. RCCB 32 t h e d e vice inst a lled is e l e c t r i c a l w i ring device that is n ot bal a nced c o n d uctor. Such an i m b a l a n c e m a y i n d i c a t e c u r r e n t l e a k a g e t h r o u g h t h e b o d y o f a p e r s o n who is groun ded shock can resu l t f r o m t h e s e c o n d i t i o n s . R C C B s a r e d e s i g n e d t o d i s c o n n e c t q u i c k l y e n o u gh t o prevent h o c k s . T h e y a r e n o t i n t e n d e d t o p r o vide protection T h e y m u s t b e p r o v i d e d w i t h a t e s t e r b u t t o n t o c h e c k t h e i r o p e r ation. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 33 OVERLOAD RELA Y: Overload relays are the mo st commonly used d evices u se d to protect motors against weak a nd pro l onged ove r loads. This protection en s ures: - Optimize du ra bility of the e ngine, p reve nt i ng it from o perating in abnormal heat i ng conditions - Continuous operation o f machin es or installations to avoid unplanned shutdowns - Restarting afte r a shot more quickly and t he best possible sa fet y conditions for person s and installation. - Figure 17. Overload relay All devices d etailed i n this sectio n are installed inside the p ro tect i on box, in DIN rail, p roperly grounded fo r protection and the characteristics o f each one as well as their distribution on ea c h circuit can be fo u nd in th e P LOTS se cti on in “PLOT N UM: 5 - PROTECTIONS ”. Th e dimensioning o f this in s tallat i on is j us tif i ed in the se c tion CALCULATIONS. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 34 1.5. 2. Conductor s All the condu c tors used in th e installation mu st be made b y coppe r and must also be ab l e to withstand a voltage isol ation o f 0,6 / 1000 V. The m i nimum section for t he condu ct ors of each circuit i s indicated in PLOT NUM: 5 and it is justified in CALC ULATIONS. Each t y pe of conductor must have a different color: - Grounding co n ductors: green and yello w - Phase condu c tors: b lack, grey an d b r own - Neutral con d uctor: b l ue - Control conduc t ors: red 1.5. 3. Lights Several kind s of lights are inst all ed on the el evat or; they will be detailed depend i ng on the kind of ligh t. Th e reby, we will find four d ifferent type s of lights: FLUORESCENT T UBE OR INCAN DESCEN T LAMP : Incande sc ent lamps with a power of 60W/230V o r f l uore sce nt tubes with a power of 11W/ 2 30V will be install e d as follows: - One in the m achine room - One above th e door in each le vel - One in the pit - One und e r the car The dist ri bution of e ac h light can be found in PLOT N UM : 6 . The switch f or these lights will be installed in t he machine room. The a im of these lamps is to light a ll parts of the ele va tor in case of re paration or maintenance. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 35 CAR LIGHT: For the car light, a LED panel has been chosen, due principa lly to energy savings reasons. As it can be seen in Figure 18, energy savings is substantial comp ared to ot h er types of lig ht. Figure 18. Light comparison The car l ight is controlled by t he PLC and it is t urned off whe never the e l evator is not u s ed for a time, meaning a higher energy saving. Figure 19. LED spots ceiling for elevators The type of LED ch ose n is spo t 230V / 7W / AC. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 36 INDICATOR LIGH TS: The elevator has many li ghts to indicate different st ates in orde r to give som e infor m ation to t he users. A ll th is light s are LED 24 V/DC a n d are controlled b y the PLC. The color and connectio n t o PLC´s out puts of e a ch l ight are detailed in PLOT N UM: 3. Thus, the users w ill find the next i ndicator light s: - External Button: Every time that one of the buttons (exter n al or internal) is pushed, all the exte r nal butt o ns on every floor are lighted to indicat e t o ot her users that the lift is being u sed in th a t moment. Once th e lift is free again, the lights ar e turned off. - Up and down ind i cator: a LED light infor ms the user if the lift is mo vi ng up or down. - Weight al a rm: if the m ax imum weight is exceed e d, a lig ht and an alar m are turned on to indicat e the proble m to the user. - Security f a il: another a l arm is turned on if any security fail occurs. EMERGENGENC Y L IGHTS: The e m ergency lights are tu r ned on after a power failure. The y are provided with a batte ry that is charged whil e the p ower supp ly is correct, and actuate s when a power failure exists. They must have a little li ght to indica te if the battery works correctly. They will be i nstalled like follo ws : - One in the m achine room - One above th e door in each le vel - One in the pit - One in si de the car The c haracteristics of e m ergency lights ar e 230V/8W. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 37 1.5. 4. Pl ugs Three p lugs are installed, one in the mach i ne ro om, one in th e pit an d one on the car´s roof, as it is shown in PLOT NU M: 6. The plugs t ype is called “SCHUKO”. It is t he colloq uial name f o r a system of AC power plu gs and sockets that is defined as "CEE 7/4". A Sc hu k o plug features two round pins of 4.8 mm diameter (19 mm lon g, centers 19 mm a part) for the live and neutral conta cts , plu s two flat contact areas on the top and bottom side of the plug for protective ea rt h (gro und), as it is shown in F igur e 20. T he maximum carr ied by t his plu gs is 16A/230V . 1.5. 5. Pr otective earth The protective earth is a pr otection system against d irect contacts. It l imi ts t h e contact t ension in a value (50 V in this installation) t hat cannot cause important injures to a person who touches a metallic part that is accidentally in tension, due for examp l e to an iso la tion failure. For t his purpose, all electrical elements and metallic part s of the in stallation are connected to t h e pr o tective earth (grou nd) of th e build i ng where the elevato r is installed. 1.5. 6. Buttons Three d i fferent types of bu tto ns can b e found i n th e elevator: PUSH BUTTONS MAN UA L CONT ROL: For manual contr ol, N O (normally opened) b utton s (230V A.C.) ar e u sed to con trol t he motor while rep airs or maintenan ce, as will be explain e d la ter. Figure 21. Butto n manual control Figure 20. Schuko plug AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 38 EXTERNAL BUT TONS One extern al bu t ton NO (normally ope ned) per level is installe d to request t he lift at each level. This buttons ar e pro vided with a LED ligh t to indicate t h e use rs whe n the li ft i s bein g used, as it was explained in previous sections. T he external butt o ns work with 2 4 V/D .C ., as they are P LC i nputs. INTERNA L KEYPAD The internal keypad is installed inside the car and all ows the users to choose the de s tination floor. They also ar e NO contacts 24 V/D.C. , PLC i n puts. Besides the number f or level indicator, t hey must have Braille writin g, according to the r ule EN81-70, in o r der to let b li nd person s use the elevator. Figure 23. Internal keypad Figure 24. Br ail le writing on buttons The internal keypad must also have an alarm bu tton an d a door opening button, a s is explained later. Figure 22. External button AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 39 1.5. 7. Contactor s A contactor is an electric ally con trolled switch used for switching a power circuit, sim ilar to a relay exc ept with higher current ratings. A cont act or is controlled b y a circuit which h as a much lower power l evel than the switched circuit. T he control circuit is based on NO and N C switches. The contactors chosen for this project are p rovided with se veral switches NO and NC, but mo r e modules with switc hes can be added i f needed. Another important feature of these con tactors is t he p ossibility to work with either A.C. or D.C. In fact, th ey have a special inp u t to connect b o th contr ols : the manua l control, whi ch has a tension of 2 30V A.C., a nd th e automatic control, which is directly co nnected with a PLC output at 2 4 V D.C. as it is sho wn in Figure 25. The co ntactors are installed i nside the co ntrol panel on DIN r ail. Depend i ng on the contactor activat e d, the rotor can rot ate in on e direction or another with two different speeds, t o make the car goes up or down, fast or slow, as it is explained l ater . Figure 25. Contactor-PLC connection AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 40 1.5. 8. Po wer supply A p ower supply is installed before t he PLC inp uts in order to supply the PLC, including a ll the switches an d sensors. Its f unction is to con ver t the input current (230V A.C.) int o 24V direct curren t suitab l e for the contro l circuit. It consist s basically in an ele ctrical tr ans for mer a nd a n i nverter, an d is th e f irst device installed in the c ontrol panel, on DIN rail . A t ypical circuit of a pow er supp ly is shown in Figu r e 26. Figure 26. Power supply circuit Figure 27. Power supply DIN rail AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 41 1.5. 9. PLC A pro gr ammable l ogic controller (PLC) or programmable contro ll er is a digit al computer used for automation of electromechanical p r ocesses, such as cont r ol of machiner y on fa c tory assembly lin es, amu se ment rid es, or lig ht fixture s. PLCs are used in many in d ust ri es an d ma chines. Unlike general-purpose computers, t he PLC is designed f or multiple input s and output arrangement s, extended t emperature ranges, immunity to e lectrical noise, and resist a nce to vibrat ion and imp act. P rograms to contro l mach i ne op erat i on are t ypically st ored in b attery-backed-up or non-volatile memory. A PLC is an example of a hard real time syste m since o utput re sult s must be produced in re s ponse to in put condition s wit hi n a li mited time, otherwise u nintende d operation will r es ult. For t he case of ten levels, t he P LC mod el ha s not b een selected, inasmuch as the program for the control h as not been designed, whereas that f or the sim ulation, the P LC chosen has been the Klockner Moeller´s P LC, mod el P S4-201-MM1, which is programm e d with SUCOSOFT. Figure 28. PS4-201-MM1 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 48 1.5. 13. Security One of the most im p ort a nt points of the cur rent p roject is everything rela ted to security t erms, du e to the f act tha t th e elevator is in tended to be used by p ersons. To this end, all E uropean rules in security terms related t o elevators h ave been taken into account . For that, several devices will be installed to p r event possible injuries to the users. Logic adopted for the implementation of the security system has been negative logic, i.e. all security devi ces are N C (normally closed) switches, in order to avoid a false security failu r e in case of malfun cti on of some s ensors or power supp ly failure. The foll owing de vices will be installed f o r secur i ty: EMERGENCY ST OP BUTTONS: Four em ergen cy st o p buttons will b e installed. Three of them will be 2 30V A.C. switches, insta lled in t he manual contro l panel, one in machine r oom, one in car´s ro of and one in the p i t, to st o p the car i n case of e mergency d uring repairs or mai ntenance. The fourth button will be installed in the machine room, next t o the control p anel, to stop the au tomatic contro l. It must be p r essed before ever y maint e nan ce or repair operations, or in case of em ergency. This device must work at 2 4 V D.C. insomuch as it is a PLC i np u t. SPEED LIMIT: The speed limit is a NC cont act 2 4V D .C. associate to the spe e d limit pulley installed on the elevator. Its function is to inform the automatic control in case the speed l i mit is activated . Figure 36. Emergency stop button Figure 37. Speed limit AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 49 WIRE SENSO R: The wire sensor is a device inst alle d alon g all t he tract io n cable of the car. It s function is to inform the con troller i n case of a low stra i n in the cable. Th e strain can be set in dif f erent values and the device´s volt age is 24V D.C. WEIGHT MET ER : In ord er to avoid an overload in the motor, t h e weigh t of the charge in si de the car i s measured by an electron ic de vice before it moves. If the charge is higher than a rated value, the device infor ms the controller abou t the failure. Fo r th e current elevato r, the maximum weight is 450 kg (6 persons). This device is installed unde r the car´s floor, and it works at a voltage of 24V D.C. Figure 39. Weight meter ENERGY SENSOR: As it was said in th e emergency batte ry se ctio n, th e battery is pro vided with a contact to inform the contr oll er when the installation is being su p plie d by the batte ry. This device a lso works at 24V D .C . Figure 38. Wire sensor AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 50 LIMIT SWITCHE S: Two limit switches will b e installed as securit y de vices: one at t he top of the car´s way and anothe r one at the bottom. The functi on of this limit switches is to stop the motor i n case th e ele vator re aches th e limit of t he way or a malfunction of the stop sensors. There a re two possibilities to stop the motor. The first one, and the most common is co nnecting the switches d irectly to the motor circuit , so when one of t h e switches is a ctiva ted , the power supply of th e motor is cu t. The se con d one is t o stop the moto r t hrough t he con troller. Although the first one is t he best option, the seco nd one h as b een chosen for the current p roject , prin cipally due to the interest of implement an autom a tic con trol th a t involves al l the security d evices. When the car is placed at flo or level in ext r eme f loors, t he exact p lace of t he switches mu s t be calibrated in case the car reaches a d istan ce of 5 or 6 cm of its way . Figure 40. Limit switches AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 51 1.6. MOT OR CONNECTI ON The go al o f this section is to make a de tailed expl anation of th e connection between the mo t or and the rest of the elect rical devices. The diagram of the connection is presented in “PLOT NUM.: 1 – POWERMOTOR”. The motor chosen f or t he elevator is a three p has e “ Dahlander” mo tor. It works in the same w ay t hat oth e r three phase sq uirrel c age motors, except that i n it s windings it h as intermediate connections to change the number of active poles, depend i ng on the way it is co nnected. By ch anging th e num b er of act i ve poles, the motor speed will change. Logically, h aving two ways of con nection, two d ifferent speed s are o b tained , one slow and one f as t. On its termin a l box, there are 9 connect i ons, corresponding to interme d iate terminals, instead of 6 like in th e rest of motor s. In this kind of motors is essential the use of two th e rmal protections, one per each sp e ed, due to the diff er ence of p ower fo r each one. These motors have the p articularity that their wind ings can be linked in th re e different ways: constant torque, variable torque, constant power. For the current installation the connection is for constant p owe r, as it is n e eded the same power to move the car in both speeds. The connect i on of motor terminals for a constant power in both speeds is a s follows: V2 U1 W1 U2 V1 W2 SLOW SPEED: U1 , V1, W1  to power s upply; U2, V2, W 2  joined FA ST SPEED: U2, V2, W2  to power su pp l y; U1, V1, W1  o pened AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 52 The electr ical characteristics of the necessary devices of control and protection for thi s configuration will b e as follows: - Contact o r K1 for slow speed down (SSD) connection . It will be for a rated current equal or highe r than the motor current in trian gle connection, and AC3 category. - Contact o r K2 for slow speed up (SSU) con n ection. It will be for a r a ted current equal o r h igher than the motor c urrent in triangle connection, and AC3 category. To in ver t the rotor di rec tion , two phases are i nverted . - Contact o r K3 for f ast speed down (FSD) con n ectio n. It will b e fo r a rated current e q ual or h igher than the m otor current i n d ouble star connection, and AC3 catego ry. - Contact o r K4 for fast speed up (FSU) conn ecti on. It will be for a rate d current equal or higher th a n the motor current in double star connection, a n d AC3 category. To in ver t the rotor di rec tion , two phases are i nverted . - Contact o r K5 for st a r connect io n in f as t speed . F or fast spe e d, th e motor s tart is made by a tri a ngle-star conn ection to redu ce the cu rrent intensity during the start. It will be for a rat ed current equal o r h ig her th a n th e m o tor cur r ent in double s tar conne c tion, and AC3 category. - Fuses F1 and F2 to protect the circ uit again st short-circuits. The y will be aM type (special f use type for el ectrical motor s) and eq ual current than t he mo tor current for each s peed . - Therma l relays Q1 and Q2 t o protect the motor a gainst overloads. Their curr e nt must be the sa me than the mo tor curr e nt for each sp e ed. The contactors ar e activ ate d or de activa ted by bot h manual and auto m atic con trol, as it is detailed in n ex t sections, making the e lev ato r go up and down in fast or slow speed . NOTE: It is m andatory for the in staller to ch e ck out the fast, slow, up a nd do wn movements o f the moto r be fore connectin g it to the elevato r, in order to b e sure o f each c onnection. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 53 1.7. MA NUAL CONTR OL Two man ual controls a re i nstalled, one in the machine room and the other o n e on car´s roof , to manually cont rol the elevator durin g repairs or maintenance. The m a nual c ontrol diagram is p resented i n “PLOT NUM.: 2 – MANUAL CONTROL”, and it is expl aine d in this sect i on. Basically, it is com posed of several NC and NO cont acts and buttons to activate or deactivate the co ntactors that man ag e the motor. Between th e two co nta c tors of each invest o r K1-K2 and K3-K4, interl ock s have been in s talled: one wit h auxiliary contact s of th e conta ct ors them selves (K1, K2 , K3 an d K4, 21-22 ) a nd the o ther one wit h button´s au xilia ry con tacts (S1, S2, S3 and S4, 21-22). These contacts coul d be re placed b y mechanical in terlocks b etween each pair of contactors: K1- K 2 and K3-K4, avoiding in th is case th e use of t riple contacts switches for sh i fting S3 and S4. There are also interlocking b e tween contactors used for low speed K3 and K4, and the remaining K3, K4 and K5, u se d f or high sp e ed, from the auxiliary contact s of the contactors (K1 , K 2, K3 and K4, 31-32) and (K5, 21-22). In ord er to make it ea s y to unde rstand, he re it is on ly exp lained one of the contro ls (machine r oom) . To ma k e t he othe r con trol (car´s r oof), other b uttons are simply added i n parallel with this circui t. Thus, we can find (S1, S2, S3 and S4, 13-14) for m ac hine room control an d (S5, S 8, S9 and S10, 13 - 14) for car´s roof contro l. One fuse F5 protects the circuit against short-circuits. In case a motor overload, the circuit is opened by NC contacts associa te to t hermal relays Q1 and Q2. Three emergency sto p b ut t ons ar e in stalled to stop the elevator wh en re qu ire d. One of the m is in s talled in the room machine, o ther i n car´s r o of and the th i rd one in the pit. The foll owing de sc ribes the circuit operation in each of the four movements: a) Start and stop s l ow speed d o wn (SSD): - Start by pu s hing S1 (13-14 and 2 3-24). - Contact o r K1 closing and motor start in low spe e d and down direction, triangle connect i on. - Interlo ck ed by (K1 , 13-14). - Stop by pu sh ing S0, S6 or S7 (21 -22 ). AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 54 b) Start and st o p slow speed up (SS U): - Start by pu s hing S2 - Contact o r K2 closin g a n d motor sta r ts in low speed and up direction, tr i angle connect i on. - Interlo ck ed by (K2 , 13-14). - Stop by pu sh ing S0, S6 or S7 (21 -22 ). c) Start and stop fast speed down (FSD): - Start by pu s hing S3 (13-14 and 2 3-24). - Contact o r K 5 closing. I t f orms the star connection of the mo to r by short- circuiting U 1, V1 and W 1. - Contact o r K3 closi ng b y (K5, 2 3-24), connecting the motor in fast s peed mode, down direct io n and double star co nnection. - Interlo ck ed by (K3 and K5, 1 3 -14 ). - Stop by pu sh ing S0, S6 or S7 (21 -22 ). d) Start and st o p f a st speed up (FSU): - Start by pu s hing S4 (13-14 and 2 3-24). - Contact o r K 5 closing. I t f orms the star connection of the mo to r by short- circuiting U 1, V1 and W 1. - Contact o r K4 closi ng b y (K5, 2 3-24), connecting the motor in fast s peed mode, down direct io n and double star co nnection. - Interlo ck ed by (K4 and K5, 1 3 -14 ). - Stop by pu sh ing S0, S6 or S7 (21 -22 ). NOTE: It is m andatory for the in staller to ch e ck out the fast, slow, up a nd do wn movements o f the moto r be fore connectin g it to the elevato r, in order to b e sure o f each c onnection. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 55 1.8. PLC C ONNECTION The goal of thi s sect io n is to expla in how the inputs and outputs con nec tion is made, as in t he diagram presented “PLOT NUM.: 3 – PLC CONN ECTION”, it is made t o summarize a ll the connection , as it is e xpl ained now. The PLC and all buttons, se nsors, contactors, e tc . conne cted to its inputs and outputs work with 2 4 V D.C. A generic connection has be en made, representing the PLC like a box w ith inputs and outputs, but mu st be taken into ac coun t the fact t hat once th e PLC i s chosen, inputs and outputs must b e sele cte d accordi ng to the PLC se lected, adding as many modu les as need . Thus, in the di agram, to make th e comprehension easier , for exte r nal butto ns is represented only one i nput , a lt hou g h ten inputs are needed (f rom P0 to P9), one p er level. Th e same representation is made for the i nternal keypad (from A0 to A9) a nd the sensors (L0- L9, U0 -U9 and D0-D9), while for t he ot her inputs and ou tp uts it is u se d only one slo t, li k e it is represented on th e diagr a m. To actu at e th e motor in fast speed it mu st be taken into accoun t that, as it was explained f or th e manual co ntrol, the connection must be double star, so contactor K5 must be actuated every time that K3 or K4 are act uat e d. For that, a para lle l connection must be made b etween co ntactors K3 an d K 4 with K5 , altho ugh K5 is n ot re presented in the diagr am, as far a s it is not a controller output . Several indicators are also inst a lled. When the lif t is b e en u sed, an e xt ernal button light is turned on t o i nd icat e the other users that the lift is busy and it won´t be ready until t he lig ht is off. In each floor a light indicator is i nst alle d to inform whether the lift is movin g up or down. In side the car two light and sound alarms are installed to infor m the u sers if the m aximum weight has been reached or a security failure has occurred. Button l ights and up an d down light s can be i ns talled in series connection for all levels. All input a nd output devices will be explai ned in next sections. Once all the ele c trical components, connecti o ns a nd main in s tallations have been exp lai ned , in next section is detail e d the automat ic control design, the main point of this pro j ect. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 56 A U TO M A T I C C O N TR O L D ES I GN AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 57 2. AUTOMATIC CONTRO L DESIGN First of all, t o understand the whole process, the simulation is described at the beginning. The algorithm designed is t h e same f or the simulation and the case for ten levels, so once the simulation h as be en understood, the autom ation p r ocess f or the elevato r with t e n levels is based on th e simulation model, b ut adding all related to security. The process is represented by “GRAFCETS”. A GRAFCET or SFC i n E nglis h (Sequentia l Function Chart) is a graphical p rogramming language u s ed f or PLCs. It is one of the five languages defined by IEC 6 1131-3standard. The S FC st and ard is de fine d in IEC 8 4 8, "Prepa r ation of fun c tion charts for co nt rol system s", a nd was ba sed on Petr i nets. It can be used to p rogram pr ocesses that can be spli t into steps. Main co mponents of SFC are:  Steps with associat e d actions  Transit i ons with a ssocia ted logic conditions  Directed li nks between ste ps and transitions Steps in an SFC d iagram can be active o r inactive. A ctions are only executed for active st e ps. A step can be active for one of two moti ves: (1) It is an i nitial step as specified b y the prog ram mer (2) It was a ctiva ted during a scan cycle and not deact ivated since Steps are act ivated when all st e ps above it are a ctive and t he connectin g transition is sup erable (i.e. it s associat ed condit io n is t rue). When a t ransition is p assed, all steps above a re deactivated at on ce and after all steps belo w are act iva ted at once. Actions associated with steps can be of se ve ral types, the most relevant ones being Continuous (N), Set (S) and Reset (R). A part from th e obviou s meaning of Set and Reset, an N a c tion ensures that its target variable is set to 1 as long as t he step is active. An SFC rule states t hat i f two st eps have an N acti o n on the same target , the variable mu s t never b e r eset t o 0. It is also possible to insert LD (Ladder Diagra m) actions inside an SFC program (and t his is the stan dard way, for instance, to work on integer variables). SFC is a n inhe r ently parallel language in t ha t mult i ple contro l flows (POUs in the stand a rd's parlance) can be activ e at once. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 64  = o perand: transfers t he value of the working m emory to the corresponding operand address. The o perand can be an output ( Q0.0.) or a mark er (M 0.0 .) LOGICAL INSTRUCT I ONS:  A operand: effectuates AND logic between t he accumulato r and t he operand, and t he re sul t is saved again in t he accumulator. Operand can be input, marker or output.  AN operand: effectuates AN D logic between accumu la tor and the negati ve valu e o f t he op erand and the result is saved again in the accumulat o r. Operand can be i nput , marker o r output .  O opera n d: effectuates OR logic betwee n the accumulat or and the operand, and t he re sul t is saved again in t he accumulator. Operand can be input, marker or output.  ON operand: effectuates OR logic bet wee n accum ulator and the negati ve valu e o f t he op erand and the result is saved again in the accumulat o r. Operand can be i nput , marker o r output .  EM: th is instruction marks the end of a p rogr am mod ul e  EP: r epresents the logical and physical end o f the p r ogram. T hi s instru c tion is located after the last step of the main p rogram, producing a jump to th e operat i ng system. JUMP INSTRUCTIONS:  JP lab e l: this instruction makes a no- co nditioned jump inside the program to the a ddress indicated i n the label  JC label: makes a condition e d jump , only if the co nt e nt of the accumulat o r is 1. In other case, next i nstruction i s execut e d.  JCN label: makes a cond it ioned jump, only i f the content of the accumulat o r is 1. In other case, next i nstruction i s execut e d. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 65 CONDITIONAL RAMIF IC ATIONS:  BLT lab el: makes a jump to the ad dress indicated in the label if the relation bet wee n compared term s by CP is lower (<).  BGT label: makes a jump to the addre ss indicated in t he lab el if th e relation bet wee n compared term s by CP is bi gge r (>).  BLE labe l: makes a jump to the ad dress indicated in the label if the relation bet wee n compared term s by CP is lower or equal (<=).  BGE label: makes a jump to the address indicated in the label if the relation bet wee n compared term s by CP is bi gge r or equal (>=).  BE labe l: m akes a jump to the address indicated in the label if the relation bet wee n compared term s by CP is equal (=). COMPARISON I NS TRUCTIO NS:  CP oper an d: compares the spe cifi ed o perand wit h the content of the work regist ry and sets the conditional o perators BE, BNE, BLT, BGT, BLE and BGE. These conditional operators are always use d together with CP. Condit i onal b its are cha nged immediately after comp arison. Operand can be con s tant, mar k er, input or output t h e type byt e or wor d. SEQUENTIAL CO N TROL BLOCK: This fun c tion uses GRAFCET r epresentation. Sequent i al contr ol makes possib le that different t asks are executed in order, as is repr esented in th e GRAFC ET. A ll actions p rovi ded in se q uentia l contr o l fu nction are executed step by step. T he seque nce of one step en su res the activat io n of next ste p only if the previous st ep has been deactivated. This allows the user to program complex seq u ences in simple and clear steps. All th e active steps are indicat e d t oo , thu s simplifying the er r or diagnostic. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 66 The pro s of sequential block (SK) are: - Clear structu r e in comp l ex sequen ces - Couplin g steps between stages d o not need to b e pro grammed - Simple c haracter is tic of set and reset steps - It is possible t o modify the fun cti ona l block SK w i t hout pro blems - Easy diagnostic o f errors tro ug h th e program, th a t indicates active step s - Fast processin g of s equence steps. The sequent ial control programming allows a graphical and structured represent i ng of stages. The fir s t stage def i nes the ini tial position, and content s start a nd initia li zation condit i ons of the process. One i m portant ch a racteri stic is that no m ore than on e step is active at the same time. Th e n ext step is not acti vat ed u ntil the next transition is executed. Only aft er t he t ransition is executed, the progr am continues pro cessing next step. With type OR ram ifications, onl y on e step can b e executed of several steps programm e d in parallel (only on e fe a the r line). With type AND ramifications, se vera l parallel step s are executed at the same time (doubl e f eather line). AN D ramif ication can be synchronized, which ensures that the last t ransition of the A ND sequence is not processed , it´s only to w ait for the rest of stages i n p a rallel finish at the same ti m e. Input SINO specifies w hat th e ne xt stage t o b e processed is. Before the sequent ial st e p is called f or th e first time, t hi s input must be in i tialized with the number of the next st ep to be p rocessed. The initia li zation is accomplished b y subprogram IN IT, which remain s active as long as RESET=1. The op e rand INB 0.0 (indicato r f or first cycle af ter Reset o r afte r pushing reset butt o n), can be used as RESET i nput for sequential con trol function. Reset input is set to 1 in the f irs t cycle, afte r program start s. The pro gra m INIT assign to i np u t S I NO the first step num b er. This init i alization ensu r es that the fun ctional b lock SK knows the number of the first step to b e p rocessed. The value of the step SIN O is ch anged depending on what step is goin g to be executed . A logical sequence o f the program can be easily written. To activate t h e funct i onal b l ock, SET input must be 1 . This activates simultaneously d e fined s tage input. The sequential control sy nt ax can be founded in the printed p r ogram created for the simu l ation, in section “ANNE XES”. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 67 2.1. 2. Four levels elevator application In this sect io n all t he ap plicat io n fo r t he sim ula t i on o f the elevator is described. The simulation consists basically o n an elevator wit h four levels. The device ha s f o ur sensors to d e tect the position of the car, and four button s to choose the level o f the car. BLOCK DIAGRAM F OR D EVICES CONNECTION: Figure 42. Simulation connection AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 68 The parts of the b lock diagram are: - Driver m otor (M1) - Prote c tion module and PS4 controller inte r face (M2) - Level di s play and relay control modu l e (M3) - Motor supp ly and prote c tion module (M4 ) - PS4-201-MM1 co ntro l ler - Contro ll er power source (S2) - Power source for drive r mo tor module, controll er interface, leve l display and motor prote ct ion (S1) DESCRIPTION OF THE APPLICATION: A lift must move between the ground floor and t he r est of the levels of a building. The positioning system i s based on fou r limit switches, one p er leve l. When one of t hese switche s is a ctiv ated , the level is marked i n a lit tle screen and a logic signal is generated (1 lo gic) . The senso rs activate inputs I0.0 , I0.1, I0.2 and I0 .3 o f the contro ll er. This operation is made by t h e intermediate assembly of modules M3 and M2. M3 contains two electronic assemblies that are commanded for the sign al created by the four sensors. Th e first assembly is to show the level wher e t he lift´s car is, and has as a main device an integral circuit latch/decoder/divider BCD-7 segments MMC 4511. The second assembl y ha s as m ain elem ent 4 NPN low power transistors and an integrated circuit CDB 400, which has f o ur lo gic N AND d oors. Th eir role is to adapt the signa l from the senso rs to the module M2 . M2 has the f u nction of tran smissio n the logic signal fr om the CDB 400 t o the contro ll er. Th is signal is applied o n the basis o f 4 low po wer transistors. This t ransistors contro l 4 low battery relays (24V). The t ransistors make the funct io n of a b u ff er b e tween logic outputs of the CDB 400, which can h ave a maxim level of 5V (1 logic), a nd the supply tension for relays windings (12 V). Fo r a visual r eview of the floors f unctionality, are inst all ed in parallel with the relays windings 4 LEDs to i n dicat e what the position of the lift is i n the system, i.e. the actual l evel. Relays make an ele ctrical i sol atio n bet wee n the controller tension (24V) and th e supply tension of the driver module (5V), thus p rotectin g the controller against s hort-circu i ts or vor tex currents. The mod ules ground is separated of t he contro ll er ground. AUTOM A T I O N P R O C E S S O F A N E L E V A T O R S Y S T E M 1. Supp ly and protecti o n m o d u l e ( M 1 ) 2. Motor – stepper mo t o r 2 4 V 3. Sensors 4. Driving be l t 5. Lift car 6. Met al guides 7. Driver m otor modu l e ( M 1 ) 8. Level di s play and co n t r o l r e l a y s 9. Contro ll er interface m o d u l e ( M 2 ) 10. But tons 11. Couplin g controller c o n t a c t s 12. Mobile conne c tion b a n d 13. P ressure sensor A U T O MATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez S u p p l y a n d p r o t e c t ion modu le (M1) s t e p p e r m otor 24V D r i v e r m o t o r m o d u le (M1) L e v e l d i s p l a y a n d c ontrol relays C o n t r o l l e r i n t e r f a c e module (M 2) C o u p l i n g c o n t r o l l e r contacts M o b i l e c o n n e c t i o n band Figure 43. Simulation model 69 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 70 INPUT A ND OUTPUT IDENTIF IC ATION: One of the most important steps for the simulat i on is t o identify the inputs and outputs of t he con troller , in or der to write t he program properly. Figu re 44 shows th e connect i on be tween se nsors, buttons, relays and the controller, as w ell as a brief descript i on of each one. NAME DESCRIPTION I/O & MARKERS L0 Sensor level 0 I0.0 L1 Sensor level 1 I0.1 L2 Sensor level 2 I0.2 L3 Sensor level 3 I0.3 P0 Button level 0 I0.4 P1 Button level 1 I0.5 P2 Button level 2 I0.6 P3 Button level 3 I0.7 MOTOR UP Motor drive up Q0. 1 MOTOR DOWN Motor drive do wn Q0. 2 LEVEL Selected level MB1 ALEVEL Actual level MB2 Figure 44 . I/O identification AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 71 In Figure 45, the con n ection bet wee n inputs outputs and controller is show n. Figure 45. I/O connection Now that all devices have been exp lained, in the n ex t section the de s igned algorithm to solve the prob lem o f t he lift is detailed through th e exp la nation of the GRAFCET. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 72 2.1. 3. Gr afcet for simulation The objective of this GR AFCET is to repre se nt in an easy way t he algori thm designed for th e simulation. On ce that is p rov ed that the algo r ithm works for the simulati o n, it can be accep ted that it works f or the case with ten levels. T he GRAFCET provide s the p rog rammer an easy comprehension of the p roblem and an easy way to write the pro gra m with the se quent ia l block function SK from S UC OSOFT. Two different GRAFCETS have been made for t he simulation, in tow levels: level one represents the GRAFCET with the nam e o f the variab les, while level t w o represent s the GRAFCE T w ith t he name of inputs and o utput s t o make a nearer diagram fro m the programming la ngua ge. Both GRAFCETS can b e found in t he section “GRAFCETS – NUMBER 5 AND 6”, and they are exp lai ned like follo w s. In the first stage, all markers and outputs are set to 0. This is the initial stage so the elevator m ust be stopp e d (Figu r e 46). Figure 46. First stage Next step is an OR ramifi cation w ith four different stages, dependin g on the level where the car is, i.e. depen ding on the activat ed sensor, a diff erent value is saved in t h e marker “ALEVEL-M B2”, startin g from value 0 for le vel 0 to value 3 for level 3 (Figu re 47). Figure 47. ALEVEL value AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 73 Afte r that a stage is represented where the program does not make any action. It is because an o ther stage i s needed to p ass f ro m the ramification abo v e to the next. Thus, after stage n umbe r 5, anothe r OR ra mifica tio n follows with the routine. In this ramificat i on, wit h 4 s tages too, a different value i s saved in the marker “LEVEL-MB1”, depend i ng o n the b utto n p ressed, starting from value 0 f or button P0 to value 3 for button P3. One problem that must b e solved is that once the b uttons h ave b e en pushed, they do not re m ain pu s hed, so we n eed to save so mewhere in the p rog ram the f ac t that the button has been pre sse d. For th is reason, so me m arkers are u se d. Every time a button is push e d, one dif fere nt marker is set to valu e 1, t hus, markers starting from M0.0 for button P0 to M0.3 for button P3 are used in these stages, as it can be seen in (Figure 48). Figure 48. LEVEL value Now th a t the markers LEVEL and ALEVEL have taken a valu e, we comp ar e b o th with the CP function of SUCOSOFT. If t he l evel req uired by the user is higher than the actual level of the car (LEVEL>ALEVEL), t he motor is driven up, and o bv iously, if the level required b y the user is lower than the actual le vel of t h e car (LEVE L< ALEVEL), the motor is d rive n down. If the level required by the u ser i s th e same level where the lift is (LEVEL=ALEVEL), it does not move, so th e pro gr am goes to the initial stage and wait s for next order (Figur e 49). Figure 49. LEVEL & ALEV EL comparisson AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 80 In the next stage, t he program comp ares t he value of the two variables LEVEL and ALEVEL. Figure 57. Compare LE V EL & ALEVEL Next step is an OR con dition. Depending o n the valu e o f the com p arison, t he program goes to a different way. If LEVEL<ALEVE L, the elevator must go down and if LEV EL>ALEVEL the elevator must go up . Up and down movements have several st ages. After the comparison made before, the program w aits 5 se conds for security. After thi s elapsed time, i f t here is not any security failure, the mo vement star ts in fast speed. When the d e sired level is reached by up or dow n sensors, the c ontroller changes to slow speed. To let the contro ll er know what the d esired level is, s everal m arkers are used. F or example, i f the desired le v el is level 1, it is saved M 0.1=1, then the n ext equation is used t o make the transition b e tween slow and fast sp e eds (D for down an d U for up sensors): D0*M0.0+D1* M0.1+D2*M0.2 +D3*M0.3+D4*M0. 4+D5*M0. 5+D6*M0.6+D 7*M0.7+D8*M 0.8+D9*M0.9 If LEVEL= ALEVEL, the car doe s no t move, the prog ram goes to the door control (stage 30), i.e. the door i s opened and then the p rogram s tarts a new cycle it goes to the fir s t stage and w aits for next order. All this p r ocess is shown in Figure 56. Figure 58. Up and down movement AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 81 The condition used to stop the elevator when it is in the d esired le vel is t he same than in t h e case before t o chan g e the speed of the m o tor: (L0*M0.0)+(L1*M0.1)+(L 2*M0.2) +(L3*M0.3)+(L4*M0.4)+(L 5*M0.5)+(L6*M0.6)+(L7*M0.7)+(L8*M0.8)+(L9*M0.9) Thus, when t he car arr i ves t o the r equired level, it is stopped. The program waits five secon ds for security an d aft er that the door control is activated , which is included in another macro-stage (M 3). Wh en the door is closed, the pro gr am waits fiv e seconds again and after that it goes t o the first stage t o r ese t all variables and wait for a new o r der (Figure 57). Figure 59. Car stop and door control This is the explanation for the main grafcet when all the in s tallation works right but , as it can b e see n in MAIN GRAFCET, t here are much more stages. All that stages are related t o security, an d they are e xplai ned n ext, step by step, t o complete the explanation of the wh ole grafcet . SECURITY: All secu rity transitions are repre se nted with red line, t o differentiate them clearly fr om main transitions and stages. T here are three d if fer e nt securities. One of them is activated when a securit y fail has o cc urred, i.e. one or several security sen so rs are activat e d (WIRE, SPLIMIT, BOTTOM , TOP, ENERGY, STOP). In this case, t he elevator is stopped and an acoustic and visual alarm is activated inside the car to inform the users. Th e door control can be activated inside t he car by pushi ng OPEN BUTTON, t o allow t he users get out of the car in case of securit y failure. The program remain s in this stage until the problem has been solved, i.e. the security sensors are n ot activated any more (Figur e 5 8). After the security failure is solved, the progr am goes t o t he f irs t AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 82 stage to start a ne w cycle. For all security sen so rs it is app lied ne gativ e logic, i.e. all security sensors are N.C. contacts, to avoid a false security signal in case t hat the sensors d o not work good. This security checking is done after a button is pu s hed, before th e movement starts. Figure 60. Security failure Another secu ri ty d evice is t he weight mete r. In case that the maximum rated weight is reache d, to avoid an overload in the mo tor, the movement is n ot allowed, the door is opened to all ow use rs to get out of the car and an acoustic and visu al alarm is activat ed to r e port t he event. T he program remains in this stage until th e weight is correct to start the mo v ement. Then, the d oor is closed and the program goes back t o the button contro l to wait for a ne w order (Figure 5 9). Figure 61. Weight control AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 83 During the m ovem ent, security checking is made in every transition, to stop th e elevato r in case of a secu rity failure . If th is o ccur s, the elevator stops in the ne x t floor and the progra m g oes to stage 36 , wh ich was e xp lained b e fore (Figu re 60 ) . Figure 62. Security fail during movement If d uring t he m ovement an e nergy failure occurs, E uropean st a ndards require that the lift go es to the first f l oor to allow the use rs get out of the car there, fo r a possible evacuation of the build i ng, as th e en ergy f ailures are caused for several reasons. This is called “ DOWN CORRECTION ”, and in t he main gra fcet corresponds to stages 40 and 41 (Fig ure 61). Figure 63. Down correction Now that the main gr afc et is explained, in next s ection we can see the diffe re nt macro-sta ges that form all the a utomatic pro cess . AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 84 2.2. 3. M1 – Leve l control The level control is easy to understand. Depending on the le vel where the car is, a value is saved in the var iable ALEVEL, f rom value 0 for level 0 to value 9 for level 9 (Figure 62). It can be found i n section “GRAFCETS – GRAFCET NUM.: 2 – LEVEL CONTROL”. Figure 64. Level control 2.2. 4. M2 – Butt o n control The button control is an OR disjun ction like t he le vel cont rol, but in this case a different valu e is saved in vari able LEVEL dependin g on the b utton p res sed. Wh en a button is pressed , it does not remain pressed, so t he program must save in a marker the fac t that a certa i n b u tt o n h as been pressed. Thi s action is m ade by setting d i ffe r ent markers, from M 0.0 for buttons level 0 t o M0.9 for button s level 9. Other important characteri s tic of t his control is that the internal keypad mu st take priority over t h e extern al butto ns, as if a u ser is inside the car, t h e pro gr am must respond first to t he user o r u sers in side the car th an the user s outsid e. T his is made by the n ext equation, for instance for l evel 0 , but i t is repeated for all l evels. This equation m eans that t he button P0 is only allo wed if the r e is not any internal button pressed. In (Figure 63) the grafcet for the first three levels is sho w n, and it is the same for the othe r levels. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 85 Figure 65. Button control Afte r a button ha s been p ressed, the extern al button s are lighted t o indicat e other u s ers that the lift is bein g used, a s well as the car l ight is turned on (Figure 64). Figure 66. Car and external lights Afte r this stage the program continues in m ai n grafcet . This graf ce t can be found in section “GRAFCETS – GRAFCET NUM.: 3 – BUTTON CONTROL”. 2.2. 5. M3 - Door control The last grafcet to be explained is the door control. Wh en the door control is activated, t h e motor that controls the door device is activate d in o pen directio n. T he door keeps o pening until t he limit switch D OOR OPE NED is reached, then t he motor stops opening the door. Af t er that the p rogram wait s ten seconds until t he motor starts closing the door, which keeps closing until the limit switch DOOR CLOSED is reached . If durin g the closing mo vem ent or be f ore it s tart s, an o bject is placed in the AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 86 door´s p ath the do or op ens again thanks t o the SECURITY li ght sensor. The same action is made if the butt o n OPENBUT p lace d i nside the car is pressed (Figure 65) . This grafcet can be found i n section “GRAFCETS – GRA FCET NUM.: 4 – LEVEL CONTROL”. Figure 67. Door control With the e xpla nation of this grafcet all t he au tomatic desig n process is completed, starting from the simulation to demonstrate that the algorithm designed is valid, and fin is hing with the gr a fcet design for th e case of a lift w ith ten levels. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 87 C A L C U L A T I O N S AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 88 3. CALCUL ATIONS In th is section all the calculati ons needed for t he electrical installation are deta il ed. The most important point in this chapter is to calculate th e necessary p owe r for t h e motor t o calculate after that all the de vi ces a nd conductors se cti ons f or each circuit. Circuit d is tribution and conductors s ections can be f ound in PLOT NUM.: 5. 3.1. COUN TERWEIGHT The power o f the motor i s dir ectly related with the counterweight insta lle d. The point of this coun t erweight is t o reduce the load o f the motor, thus reducing the power and dim ensions of the installation. In this case, the count erweight is calcu late d to balan ce the car weight and 50% of the loa d. Figure 68. Counterweight calculation AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 89 This equation is valid when the total t ravel of the car is not higher than 35 metre s, like in this case . If it is high er it is necessary to install a compensation cable. A general weight has b een considered for the car, 650Kg and for t h e load it is used th e maximum weight allowed for the European standard f or a n elevator with a capacity of six person s, 450Kg. Then, t h e counterweigh t is calculated as follo ws :  =  +  2 = 650 + 450 2 = 875 . 3.2. MOT OR POWER The motor power calculat io n is one of the most impor tant goals of the electrical installation, as t he rest of the install a tion is dimensioned de pe ndin g on that power. W ith the counterweight installed this po wer is con sid erab ly reduced, thus using a smalle r motor tha n if th is counterweight is n o t installed, so the n ecessary torque is lower and so is the cost of the installation. To calculate th e motor power ne xt formul a is used:  = 1 2   1000 ·  Where: • P is the motor po w er, i n kW. • ½ is be cause th e car´s weigh t and half of the payload are comp e nsated by the counterweight. • F is th e m aximum load allo w ed in the car i n Kgf. Fo r six persons th e maximum weight allowed is 450 K g. To change it i n to Kgf the for ce is multiplied b y 9.8. So F=450 · 9 ,8=4410 Kgf . • ν is t he car medium sp eed durin g the t ravel. E uropean standards establ is h that in lifts used by persons, lik e in th is case, the medium speed of the car must be 1m/s. • η is the mechanical p e rfor ma nce. I t is selected a mi nimu m d esire d performan ce of 85 % . AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 96 M A IN T E N A N C E AN D S E C U R IT Y AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 97 4. MAINTENANCE AND SECURITY 4.1. MAI NTENANCE The mai ntenance work is carried out once a month a t least to allow the elevator to work as eff icie ntly and sa fely as p ossible. Fu r th ermore, n ecessary r e pairs of the compon e nts are m ade if necessary. Th ere are two t ypes of maintenance: preventive and co rrective. 4.1. 1. Pr eventive maintena nce As the name suggests, this kind of maintenance is aimed at regular monthly review o f several elements of the elevator with th e consequent com f ort and safety improvem e nts. The review includ es:  Cleanliness: car, counterweight a nd motor.  Lubrication: rails, boxes and bala nces, h a nd l es and pulleys, speed limiter  Settings: rail, adjustments cont r ol and power l ifts, le vel sensors  Minor repairs: l ights and buttons re view  Overhaul: includes the entire operation of t he lift, includin g security methods s uch as brakes, doo r de vices, car´s s peed.  It w ill be checked the start and st op and the presence of a bnormal sounds.  Relay contact s and manual control ch ecking  Car roof and wall clea ning  Safety devices checking Once the preventive mai ntenance is f i nished, a report must b e prepare containing the follo wing inf ormation:  Date, start t ime and end o f each service, client name and technical and computer dat a.  Confirmation of the com plet i on o f e ach of the ac tivities re qu es ted in the Service De scri ption  General features of the materia ls and parts used  Observations and s uggest of the technician, and total tim e AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 98 4.1. 2. Corr ective maintena nce This service consist s of major rep a irs a nd/or lower based on t he emergency calls for damage or stops . Such faults ar e repaired on any day and t im e, so the el eva tor must have a maintenan c e service available 24 hours a day, 365 days a yea r. 4.2. SEC UR IT Y The eleva to r must be a safety in s tallation not on l y f or the user s, but a lso for the techn icia ns responsible for repair. For this r eas on , the machine room must have the next com ponents to prevent or resolve minor in ci dents:  Dielectric helmet to protect a gains t e lectrical contacts  Polyester cotton work clot hes  Anti dust glasses  Insulated gloves to p rotect against electrical conta c t voltage up to 5000V  Belt for tools  Emergency kit  Fire extinguisher type ABC AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 99 P LO T S A ND G R AFC E T S AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 100 5. PLOTS AND GRAF CETS 5.1. PL OTS 1. MOTOR 2. MANUA L CON TROL 3. AUTOMATIC CONT ROL 4. BRAKE AND LIGHT CONN ECTION 5. PROTECTIONS 6. SENSORS AND MEA SURE S 5.2. GRAFC ETS 1. MAIN CONTROL 2. LEVEL CONTROL 3. BUTTON CONTROL 4. DOOR CONTROL 5. SIMULATION LEVEL 1 6. SIMULATION LEVEL 2 AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 101 CO N C L U S IO N AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 102 6. CONCL USION As a f i nal conclusion of the proje ct , several po ssi ble im prove m ents are described . To con cl ude the work, major achi evements ar e highlighted. 6.1. IMP ROVEMENTS DATA BUS: The main advantage of the data bus is that all th e wirin g and car in s tallation (excluding secu ritie s) can be replaced by a industrial d a ta bu s that i m plements: - Data input of e xt erna l buttons and car to the PLC - Data input of posit io n se nsors to th e PLC The main goal of the data b us is t o simplify t he installation. On the other ha n d it allo ws an economical way to make an extensio n of the installation. The t o tal p rice o f the data bus in stallation, inclu ding the PC pro gra mming software is about 5 00€. FRECUENCY VARI A TOR: The double-speed motor with t wo windings can be rep laced by a frequenc y and voltage variation system. It is in s talled bef o re the motor supply. To control its operation, the con tactors must be replac ed and t he variat i on signals must be PLC inputs, a s up ward and downward, acceleration and d eceleration. A start-up data should be set as val ues of acceleration and slowd own etc. Such systems greatly in c rease the cost of the installation but gains in pass enge r comfort and considerable en ergy saving, and it reduces peak starting current and decreases frict io n and pote n tial energy when st o ppi ng. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 103 DECODER: To in dica te the users the le vel where they a re, a BCD decoder can be installe d to show in a screen inside the elevator the floor num b er. The installation can b e made like in the simu lation. A BCD de coder is conn ected to le vel sensors and depending on the floor, th e screen shows th e number of the level. MICROCONT ROLL ER: Instead o f u se sever al PLC input s t o control all secur ity devic es, a microcont r oller can be insta ll ed t o control the m. Thus, all security signals are processed by this contro ller an d only one input is used , to connect the microcontro l ler with the PLC. Then , if a securit y fail occurs, th e microcon troller informs t he PLC about it. A BCD scree n can be in stalled in t he control pan el, conne cted to the controlle r t o infor m the technician about the typ e of err o r occurred . AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 104 6.2. ACHIEV EMENTS The m ain achievement s of this project are:  Design the GRAFCET for an automatic contr ol for an elevator with ten leve ls.  The designed control operation ha s been demonstr a ted by programming a simulati o n with a model for a case of a n elevator with f our levels.  Then , it ca n be a cc epted t ha t the algorithm d esig ned is val i d for a general case of an e l evator with n levels.  Other imp orta nt a chiev ement is the fact t ha t all related t o se curi ty has been taken into accou n t in the current project , thus making the lift be a safety system to be u s ed by persons.  But not onl y is th e automatic contro l designed in the p roject. All the electrical installation and device d imensioning has been inclu ded, involving th e motor connect i on and all electrical p ro tect io n devices. AUTOMATION PROCESS OF AN ELEVATOR SYSTE M FINAL PROJECT DEGREE Samuel Noval Sán chez 105 A N N E XE S P AGE 1 K LOCKNER M OELLER PS 4 -2 01 Applic at ion N ote This document w as w ritten t o p rov ide assistance in configuring a G3 operator i nterf ace terminal to allow co mm unications with a Klockner Moeller PS4-201 PLC. Please read this document carefully before attem p t ing to configure communi c ations with thes e devices. K LOCKNER M OELLER PS4- 201 P AGE 2 K NOWLEDGE OF U NIT O PERAT ION I S A SSUMED In a ll case s, both fami liar ity with the contro l func tion s and k nowle dge of s yste m opera tion are assu med. C OMMUNICA TIONS Comm unicat ions with the Klockner Mo eller PS4- 201 is v ia an RS- 232 point- to-poi nt link. The defaul t serial comm unicati ons format is RS- 232, baud rate of 9600, 8 d ata bits , No parity , and 2 stop bi ts. RS- 485 multi- drop cannot be used due to a baud rate incompatibility . The Moeller K-Suconet RS- 485 port communi cates at eit her 187 .5K baud or 375K baud, whereas the current li ne of Red Li on HMI’s cannot com muni cate at either of t hose baud rates. The connecti on detai ls are descri bed in the table bel ow. RS2 32 1 7 4 8 3 5 2 6 RJ12 8P DIN CTS Rx COMM COMM Tx RTS Conne ctions Name 4 12 3 56 1 2 3 4 6 5 RLC UNIT CONNECTER PINOUT FROM RS232 PORT (FROM RLC UNIT) The abov e table d enote s the pi n names of th e RS232 po rt. When c onne cting, t he p in na me at the RS232 p ort is con necte d to t he o pposi te of that pi n na me at the d est inatio n devi ce. 1, 6 1, 6 5 - 2 3 - 2 3 - 5 - 1/10 A 06/01 AWA27-1589 Montageanweisung Installation Instructions Notice d’installa tion Istruz ioni per il mo ntaggio Instrucciones de montaje PS4-201-MM1 Abmessung en – Dimensi ons – Dimensio ni – Dimens iones [mm] UL/CSA 1) p. d. Pilot Duty/ Maximum operating temperature 55 °C/ Tightening torque 0.6 Nm/AWG 12-2 8 Power Supp ly # of channels and Input Rating # of c hannels and Output Rating 24 V DC 0.8 A 8 digi tal 24 V DC 2 analog 6 digi tal 24 V DC, 0.5 A 24 V DC, 0.5 A p. d. 1) 1 analog A AWB2 7-1184… AWB2 7-1287… h Das Gerät ist für den industriellen Einsatz geeignet ( l EN 55011/22 Klasse A). The device is suitable for use in industrial environments ( l EN 55011/22 Class A). L’appareil a été conçu pour l’emploi en milieu industriel ( l EN 55011/22 classe A). L’apparecchio è adatto per uso in ambienti industriali ( l EN 55011/22 Classe A). El aparato es adecuado para uso en am biente industrial ( l EN 55011/22 clase A). 79 86 45 134.5 85 87.5 1589 0601 .FM Seit e 1 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 2/10 06/01 AWA27-1589 Frontansicht – Fro nt view – Face avant – Vista frontale – Vista de frente Offene Gehäusek lappe Housing cover open Courvercle ouverte Calotta de lla custodia aperta Tapa abierta a Batterie b Re set-Taste c Stiftleiste für Lok ale Erweiterung d Be triebsarten-Vorwahlschalter S2 a 24-V- DC-Stromver s orgung b Eingang: „Sc hneller Zähler“, (3 kHz ) c Alar meingang d 8 Digital- Eingänge 24 V DC und 24-V-DC- Versorgung für die Ausgänge e Ste ckbare Schraubklemme f Statusanz eige der Eingänge g Statusanz eige der Ausgänge h 6 Digita l-Ausgänge 24 V DC/0,5 A; kurzschlussfest und überlastsicher 2 Analog-Eingänge (0 bis 10 V) 1 Analog-Ausgang (0 bis 10 V) i Suc onet-K-Schnittstelle/seriell transparent (RS 485) j So llwertg eber P1, P2 k Sc halter S1 für Busabschlus s - widerstände l Pr ogrammiergeräte- Schnitt - stelle (PRG)/seriell transparent ( RS 232) m Sp eichermodul n Statusanzeige der Steuerung S1 P ower Supply 24V 0V 1=Ready 2=Run 3=Not Ready 4=Battery Suconet K 1 2 1 2 3 4 Digital Input Digital Output Analog Input/Output PS4-201-MM1 .0 Output Power Supply .1 .2 .3 .4 .5 .0 .1 .2 .3 .4 .5 U 0 U 1 U 10 0V A .6 .7 24V Q 0V Q a bd g h j ki c PRG f e e n P1 P2 l m b c d a Reset 1 Halt/Diag. 2 Run 3 Run M-Reset + Battery 1 2 3 S2 Diag. 1589 0601 .FM Seit e 2 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 9/10 06/01 AWA27-1589 Montage – Fi tting – Montaggio – Mon taje auf Montageplatte mit 35-mm-Hutschiene a (senkrecht ohne LE oder waagerecht) on mounting plate with 35 mm top-hat rail a (vertical without LE or horizontal) sur plaque de montage avec profilé -support 35 mm a ( vertical sans LE ou horizontal) su piastra di montaggio con guida DIN 35 mm a (verticale senza LE o orizzontale) sobre placa de montaje con guía simétrica de 35 mm a (vertical sin LE ó horizontal) auf Montageplatte (senkrecht ohne LE oder waagerecht) on mounting plate (vertical wi t hout LE or ho rizontal) sur plaque de montage (verti cal sans LE o u horizontal) su piastra di montaggio (verticale senza LE o orizzontale) sobre placa de montaje (ve rtical s in LE ó horizontal) 35 42.5 45 42.5 a 1 2 3 ZB4-101-GF1 1589 0601 .FM Seit e 9 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 10/10 Moeller GmbH, In dustrieautomation, D-53115 Bonn © 1997 by Moel ler GmbH Änderungen vorbehalte n 06 /01 AWA27-1589 DE13 Doku/Eb Printed in Germany (0 1/07) 06/01 AWA27-1589 Bohrsch ablone M 1 : 1 Templa te for holes, scale 1 : 1 Gabarit de perçage, échelle 1 : 1 Dima di foratura, scala 1 : 1 Plantilla p ara taladros, escala 1 : 1 100 40.25 94.25 15.25 100 19.25 M4 EM4/PS4 1589 0601 .FM Seit e 1 0 M ont ag , 15. J a nuar 2007 3:2 2 15 For Immediate Delivery call KMParts.com at (866) 595-9616 M K/ockner /^f s OELLE R ® L Programmin g SUCOcontro l P S 4-201-M M 1 suco s Automatio n 4/9 4 AW B 27-1186-G B IBM i s a registere d trademar k o f Internationa l Busines s Machine s Corporation . Al l othe r bran d an d produc t name s ar e trademark s o r registere d trademark s o f th e owne r concerned . 1s t editio n 4/9 4 © Klockner-Moeller , Bon n Authors : Ola f Duda , Jiirge n Herrmann , Ral f Stan g Editor : Barbar a Petric k Translators : Kari n Weber , Terenc e Osbor n Al l right s reserved , includin g thos e o f th e translation . N o par t o f thi s manua l ma y b e reproduce d i n an y for m (printed , photocopy , microfil m o r an y othe r process ) o r processed , duplicate d o r distribute d b y mean s o f electroni c system s withou t th e writte n permissio n o f Klockner-Moeller , Bonn . Subjec t t o alteratio n withou t notice . Printe d o n bleache d cellulose . 10 0 % fre e fro m chlorin e an d acid . Klockner-Moelle r GmbH , 5310 5 Bonn , German y s " b i e , c " ° * ffl 3 * WB j?-" f "° B D FLS ' K I , r ' alteration s Printe d i n th e Federa l Republi c o i German y (8/94 ) Programmin g o f th e SUCOcontro l PS4-201-MM 1 Content s Abou t thi s Manua l II I 1 Programming : Procedur e 1- 1 2 Programming : Element s an d Rule s 2- 1 3 Structurin g Program s 3- 1 4 Commissionin g 4- 1 5 I L Instruction s 5- 1 6 Functio n Block s 6- 1 7 S K Sequentia l Contro l Functio n Bloc k 7- 1 8 Indirec t Addressin g 8- 1 9 Programmin g Example s 9- 1 Appendi x A- 1 Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4/9 4 AW B 27-1186-G B Klockner-Moelle r Programmin g o f th e SUCOcontro l PS4-201-MM 1 Abou t thi s Manua l Th e documentatio n fo r th e PS4-201-MM 1 i s divide d int o thre e sections : - Hardware , operation , documentatio n - Programmin g - Hardwar e an d engineerin g Th e manua l AWB27-1185-G B explain s i n whic h wa y yo u ar e supporte d b y th e SUCOsof t S30- S 4-200 : wit h th e creatio n o f th e use r progra m i n I L (Instructio n List) , wit h th e devic e configuratio n an d th e commissionin g o f th e controller . Thi s manua l als o contain s th e installatio n instruction , th e documentatio n o f use r programs , a chapte r whic h describe s th e "Operatio n o f SUCOsof t S30- S 4-200 " wit h emphasi s o n th e "I L editor " an d th e "Devic e configurator" . Thi s manual , AWB27-1186-G B "Programming" , contain s informatio n require d fo r programmin g th e P S 4-201-M M 1 . Th e procedur e fo r creating , structurin g an d commissionin g th e progra m i s describe d firs t o f all . Als o include d ar e overview s o f al l I L instruction s an d functio n blocks . Th e manua l als o include s practica l example s o f programming . Th e manua l AWB27-1184-GB , "Hardwar e an d Engineering" , explain s ho w th e PL C i s t o b e mounte d an d designed . I t describe s th e element s o f th e P S 4-201-MM 1 an d thei r functions . Th e chapte r "Addressing " describe s th e genera l synta x rule s fo r addressin g th e station s i n a SUCOne t K/K 1 network . Thi s i s als o describe d i n th e chapte r "Networkin g wit h SUCOne t K/K1 " an d i s illustrate d wit h examples . Klockner-Moelle r 4/9 4 AW B 27-1186-G B II I Programmin g o f th e SUCOcontro l PS4-201-MM 1 Abou t thi s manua l Th e followin g tabl e give s a n overvie w o f th e topic s describe d i n th e documentatio n an d wher e the y ca n b e found . Th e topic s ar e liste d i n th e orde r the y ar e normall y required . Step s 1 . Installin g SUCOsof t S 30- S 4-20 0 2 . Operatio n o f SUCOsof t S 30- S 4-20 0 3 . Writin g program s 3. 1 Settin g syste m parameter s 3. 2 Configurin g station s 3. 3 Introductio n t o th e I L edito r 3. 4 Introductio n t o progra m element s an d programmin g rule s 3.4. 1 Structurin g program s 3. 5 Incorporatin g th e configuratio n fil e i n th e progra m 3. 6 Enterin g progra m cod e 4 . Compilin g program s 5 . Transferrin g program s t o th e PL C 6 . Commissionin g th e PL C 7 . Error/diagnostic s descriptio n 8 . Progra m documentatio n Describe d i n AW B 27-1185-GB , Chapte r 1 AW B 27-1185-GB , Chapte r 2 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 2 , Devic e configurato r AW B 27-1185-GB , Chapte r 2 , I L edito r AW B 27-1186-GB , Chapte r 2 AW B 27-1186-GB , Chapte r 3 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 1 AW B 27-1186-GB , Chapte r 4 , AW B 27-1184-GB , Chapte r 7 AW B 27-1186-GB , Chapte r 4 , AW B 27-1184-GB , Chapte r 7 AW B 27-1185-GB , Chapte r 3 I V 4/9 4 AW B 27-1186-G B Klockner-Moelle r 1 Programming : Procedur e Content s Genera l Settin g syste m parameter s - Progra m tes t i n RU N - Star t afte r NO T READ Y - Maximu m cycl e tim e i n m s - Activ e marke r rang e - Retentiv e marke r rang e (als o afte r col d start ) - Retentiv e marke r rang e - Forcin g marke r rang e i n RU N - Passwor d - Sav e version s o f functio n block s - Creat e a utilisatio n tabl e - Versio n numbe r fo r use r progra m Creatin g a devic e configuratio n Writin g a progra m - Incorporatin g th e configuratio n fil e 1- 3 1- 5 1- 6 1- 7 1- 7 1- 7 1- 7 1- 8 1- 8 1- 8 1- 9 1- 9 1- 9 1-1 1 1-1 3 1-1 4 Compilin g a progra m 1-1 5 - Backu p copie s 1-1 6 Transferrin g a progra m t o th e PL C 1-1 7 Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1- 1 r 1- 2 4/94AWB27-1186-G B Klockner-Moelle r Programming : Procedur e Settin g syste m parameter s - Forc e settin g - Onlin e programmin g - Compar e P S < —> Driv e - Transfe r P S «— > Driv e - Transfe r Driv e < — > P S - Se t dat e i n P S Th e followin g function s ca n b e execute d withou t statin g a passwor d sinc e th e dat a involve d i s onl y rea d an d no t modified : - Statu s indicatio n - Displa y rang e - Devic e statu s - I/ Q indicatio n I f n o passwor d o r th e wron g on e i s entered , th e functio n i s no t execute d an d th e erro r messag e "Incorrec t password ! Functio n canno t b e executed " i s output . I f yo u canno t remembe r you r password , yo u ca n fin d i t i n you r backu p cop y i n th e sourc e fil e (name).q4 2 i n th e Syste m paramete r entr y menu . Se e als o sectio n Compil e programs/backu p copies . Whoeve r i s abl e t o acces s th e sourc e fil e wit h th e syste m parameters , ca n execut e al l passwor d protecte d functions . Sav e version s o f Th e versio n o f th e use d functio n block s i s save d wit h functio n block s Ye s = 1 . Thi s considerabl y facilitate s a possibl e troubleshootin g sinc e differen t version s o f functio n block s ca n exis t fo r th e sam e function . Th e defaul t settin g i s " 0 = No t save" . Thi s allow s yo u t o sav e i n th e utilisatio n tabl e th e correspondin g physica l addresse s fo r th e use d logi c addresse s (marker , etc. ) i n th e PL C memory . Se e als o AW B 27-1185-GB , Chapte r 3 . Versio n numbe r fo r Th e defaul t settin g i s 0 . Us e thi s fiel d t o identif y specifi c use r progra m progra m versions . Creat e a utilisatio n tabl e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1.- 9 1-1 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Programming : Procedur e Creatin g a devic e configuratio n I n orde r t o creat e th e devic e configuration , procee d a s follow s startin g fro m th e mai n menu : [F1 ] Programmin g [F4 ] Devic e configuratio n Ente r a nam e fo r th e configuratio n fil e o r selec t a fil e fro m th e existin g file s [F2 ] Configur e PS4-201-MM 1 116-DX 1 116-DX 1 116-DX i PS3-D C EM4-201-DX 2 EM4-201-DX 1 -[EM4 - 201-DX 1 RMQ-16 I - MAI N MEN U —>PROGFfiMflIN G F 1 Retur n F 2 Ad d statio n F 3 Ad d nodul e ->DEUIC E CONFIGURATIO N F 4 Replac e modul e F 5 Zoon/Norma l F & Paramete r edito r F 8 Delet e F1 0 Hel p c:e4000am.k4 2 Figur e 1-2 : Devic e configuratio n men u Thi s men u i s use d fo r creatin g th e devic e configuration . Us e "Ad d station " t o expan d th e configuratio n vertically . Us e "Ad d module " t o expan d th e configuratio n horizontally . Afte r pressin g on e o f thes e a selectio n bo x appear s containin g th e stations/module s t o b e selected . Pres s [F3 ] SAV E PROGRAM S t o sav e th e fil e (name).k42 . Th e (name).k4 2 configuratio n fil e mus t alway s b e incorporate d a t th e beginnin g o f th e use r program , als o i f th e PS4-201-MM 1 i s use d o n it s own . Yo u ca n fin d detaile d informatio n o n th e devic e configuratio n i n AW B 27-1185-GB , Chapte r 2 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1-1 1 1-1 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Programming : Procedur e Writin g a progra m Th e use r progra m ca n als o b e considere d a s a jo b specificatio n fo r th e programmabl e controlle r whic h contain s a complet e descriptio n o f al l contro l sequences . Procee d a s follow s t o creat e th e use r program , startin g fro m th e mai n menu : - [F1 ] Programmin g - [F2 ] Programmin g I L - Entr y o f th e sourc e an d referenc e fil e vi a selectio n boxe s - [F2 ] Edi t progra m fil e 0000 0 00 1 00 2 0000 1 00 1 00 2 00 3 0000 2 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 CONFI G INPU T STR T - MftI N MENU — F 1 Retur n " ttinclu.d e "e4000an . "readin g inpu t L IB1.2.0. 0 = MB3 2 s "Star t o f DEMO-Pr o L K 1 S M 10. 0 S n 18. 0 L K 1 A N M 11. 1 = M 11. 2 L K 1 - 1 1 11. 1 L M 11. 2 JC N PROGRA M L KH B 1 k42 " gra n ->PR O F 2 Ope n bloc k F 3 Selec t blo c F 4 F 5 k F 6 Ad d Fin d Cop y lin e STRT_SK 0 Master-Mod e F / Replac e blo c k s F 7 8 9 Delet e Delet e Delet e inser t block s curren t lin e rang e Figur e 1-3 : Progra m edito r men u Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1-1 3 Programming : Procedur e Writin g a progra m Th e followin g overvie w show s th e topic s whic h yo u shoul d kno w befor e enterin g th e progra m code : A knowledg e o f programmin g I L edito r Programming : element s an d rule s Structurin g program s I L instruction s Functio n block s Th e ste p sequence r functio n bloc k (fo r advance d users ) Indirec t addressin g (fo r advance d users ) Describe d i n AWB27-1185-GB , Chapte r 2 AWB27-1186-GB , Chapte r 2 AWB27-1186-GB , Chapte r 3 AWB27-1186-GB , Chapte r 5 AWB27-1186-GB , Chapte r 6 AW B 27-1186-GB , Chapte r 7 AWB27-1186-GB , Chapte r 8 Incorporatin g th e Incorporatin g th e configuratio n fil e i s necessar y fo r th e configuratio n fil e compile r run . Sinc e thi s configuratio n contain s informatio n o n th e typ e o f expansio n modules , slav e controllers , etc . an d o n whic h location s the y ar e used , th e compile r ca n thu s chec k whethe r th e addressin g an d othe r specification s ar e correct . Th e correc t synta x fo r thi s instructio n i s th e following : •includ e "configuratio n file.k42 " Thi s instructio n mus t alway s b e th e firs t on e i n th e program . Thi s als o applie s i f th e P S 4-201-M M 1 i s use d o n it s own , otherwis e a n erro r messag e i s outpu t whe n compilin g th e use r program . 1-1 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Programming : Procedur e Compilin g a progra m Th e I L instruction s mus t b e compile d i n orde r t o obtai n a n executabl e program . Note ! Pleas e rea d th e sectio n Backu p copie s o n th e nex t pag e befor e yo u star t th e compile r run . Selec t fro m th e Programmin g men u [F5 ] Compile r i n orde r t o compil e th e program . Specif y th e sourc e an d referenc e fil e require d vi a th e tw o selectio n boxe s displaye d i n succession . Yo u ar e the n aske d whethe r Includ e file s ar e alway s rea d i n b y th e sam e drive . I f yo u answe r wit h Yes , yo u wil l b e aske d fo r th e standar d driv e (A , B , C,...) . I f yo u ente r No , yo u ar e aske d t o stat e a n appropriat e driv e fo r eac h Includ e instructio n foun d durin g th e compile r run . Answerin g wit h N o woul d thu s onl y b e useful l i f th e correspondin g Includ e file s ar e save d o n differen t drives . Selec t th e driv e vi a F 1 i n th e selectio n boxes . Th e compile r ru n the n starts . I f th e ru n i s execute d withou t errors , th e executabl e progra m ca n b e transferre d int o th e controller , otherwis e th e error s whic h ar e liste d accordin g t o bloc k an d lin e number s mus t b e rectified . A n executabl e progra m i s onl y generate d i f al l error s hav e bee n rectified . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1-1 5 Programming : Procedur e Compilin g a progra m Backu p copie s Afte r th e use r progra m ha s bee n compiled , i t canno t b e discompile d int o th e origina l progra m code . W e therefor e advis e yo u t o mak e backup s and/o r creat e documentatio n o f th e followin g files : - .q4 2 sourc e fil e - .z4 2 referenc e fil e - .k4 2 configuratio n fil e Thi s measur e i s als o recommende d i f yo u canno t remembe r you r passwor d anymore . Yo u ca n fin d i t i n you r backu p cop y o f th e sourc e fil e (name).q4 2 i n th e Syste m paramete r entr y menu . 1-1 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r Programming : Procedur e Transferrin g a progra m t o th e PL C Selec t [F2 ] Test/Commissionin g i n th e Programmin g men u an d [F6 ] Transfe r driv e — > P S i n orde r t o transfe r th e progra m t o th e controller . Afte r yo u hav e selecte d th e fil e (name.p42 ) t o b e transferre d vi a th e selectio n box , th e fil e i s transferre d t o th e controller . I f ther e i s alread y a use r progra m i n th e PLC , i t i s overwritte n b y th e ne w program . I f th e previou s progra m i s protecte d wit h a password , thi s passwor d mus t b e entere d befor e th e progra m ca n b e overwritten . Afte r th e transfe r ha s bee n carrie d ou t successfully , a messag e i s outpu t whic h inform s yo u o n ho w man y byte s (siz e o f th e fil e (name).p42 ) hav e bee n transferre d an d o n th e siz e o f th e remainin g memor y i n th e PLC . Yo u ca n fin d furthe r informatio n o n othe r transfe r operations , o n Test/Commissionin g function s an d th e onlin e modificatio n i n Chapte r 4 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 1-1 7 1-1 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g P S 4 20 0 Statu s Tabl e 4-1 : Diagnostic s statu s wor d DS W Th e firs t lette r stand s fo r categor y Eor D Bi t 1 5 EC T Bi t 1 4 ED C Bi t 1 3 EW D Bi t 1 2 EP M Bi t 1 1 ED R Bi t 1 0 ER T Bi t 9 EN R Bi t 8 Bi t 7 DA C Bi t 6 DB M Bi t 5 DM C Bi t 4 DL K Bi t 3 DL S Bi t 2 DD K Bi t 1 DD S Bit O Meanin g Cycl e tim e exceede d D C failur e i n th e basi c uni t CP U failur e Erro r i n th e progra m memor y Retentiv e dat a i n operatin g syste m RU N TIM E erro r Ne w star t onl y wit h retentiv e marke r rese t no t assigne d Inpu t voltag e dro p Batter y monitorin g Backu p no t present Loca l configuratio n erro r Input/outpu t erro r Remot e configuratio n erro r SB I o r networ k statio n erro r no t assigne d Th e diagnostic s bi t 0 t o 7 ar e scanne d vi a th e use r progra m wit h th e L I S O. X ( X = 0-7 ) instruction . Th e error message s o f th e bit s 8 t o 1 5 caus e a sto p o f th e controlle r s o tha t thes e bit s mus t no t b e read . Afte r th e erro r ha s bee n rectifie d th e diagnostic s bit s o f categor y D ca n b e rese t vi a th e Rese t butto n o n th e fron t pane l o f th e P S 4 20 0 serie s o r vi a th e programmin g devic e (PC) . Eac h diagnostic s bi t ha s bee n assigne d a counte r i n orde r t o provid e informatio n o n th e frequenc y o f th e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4- 9 Commissionin g P S 4 20 0 Statu s Diagnosti c statu s errors . Thes e counter s ca n b e rea d and , i f required , b e wor d DS W rese t b y th e programmin g device . I f a categor y E erro r occurs , th e controlle r switche s t o th e HAL T statu s an d ca n b e starte d agai n afte r th e erro r ha s bee n rectified . A col d star t i s alway s carrie d ou t wit h th e switc h i n th e M-RESE T position . Th e restar t behaviou r wit h th e switc h i n RU N i s prese t vi a th e entr y i n th e Syste m parameter s submen u o f th e Programmin g mai n menu . Dependin g o n thi s configuratio n SUCOsof t initiate s a warm/col d star t a s required . Th e standar d settin g HAL T mean s tha t i t i s necessar y t o col d star t th e controlle r vi a M-RESET . Al l retentiv e dat a i s lost . Descriptio n o f error s an d reaction s EC T Cycl e tim e exceede d Th e maximu m cycl e tim e (standar d setting : 6 0 ms/max . 25 5 ms ) se t i n th e Syste m parameter s men u ha s bee n exceede d durin g programmin g executio n Reactio n o f th e runnin g controller : Indicatio n an d sto p ED C D C failur e i n th e basi c uni t Short-circui t o r overloa d i n th e basi c unit . Reactio n o f th e runnin g controller : Indicatio n an d sto p EW D Failur e o f th e CP U CP U hardwar e watchdo g indicate s th e failure . Reactio n o f th e runnin g controller : Indicatio n an d sto p 4-1 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g P S 4 20 0 Statu s EP M Erro r i n th e progra m memor y A n erro r ha s bee n detecte d durin g th e checksu m tes t o r th e plausibilit y chec k o f th e use r program . Th e progra m mus t b e loade d again . Reactio n o f th e runnin g controller : Indicatio n an d sto p ED R Retentiv e dat a destroye d i n th e operatin g syste m Importan t operatin g syste m contro l dat a i s destroye d o r doe s no t exis t afte r a RA M chang e o r i n a ne w controller . Reactio n o f th e controller : Doe s no t start ; als o overal l rese t o f al l memor y range s an d a re-initialisation . ER T Ru n tim e erro r Th e controlle r detect s a n erro r durin g operation . Reactio n o f th e runnin g controller : Indicatio n an d sto p EN R Restar t onl y wit h retentiv e marke r rese t Thi s messag e onl y occur s i f th e controlle r ha s bee n configure d t o HAL T (0 ) i n th e "Star t afte r NO T READY " optio n o f th e Syste m parameter s men u an d i f th e use r ha s trie d t o carr y ou t a war m star t afte r a categor y E error . DA C Inpu t voltag e dro p Th e suppl y voltag e o f th e basi c uni t ha s droppe d temporarily . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RESE T o r M-RESET . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-1 1 Commissionin g P S 4 20 0 Statu s DB M Batter y monitorin g Th e batter y voltag e i s belo w th e toleranc e threshold . Th e batter y modul e mus t b e change d i f th e PL C i s operate d wit h a RA M modul e o r i f retentiv e dat a range s o r th e real-tim e cloc k wer e used . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RESE T o r M-RESE T DM C N o backu p Th e backu p whic h i s automaticall y configure d i n th e memor y modul e i s faulty . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RU N o r M-RESET . DL K Erro r i n th e loca l configuratio n Th e configuratio n o f th e P S 4 20 0 serie s i s no t correc t o r a loca l expansio n (L E module ) connecte d t o th e basi c uni t i s faulty . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RU N o r M-RESE T DL S Input/outpu t erro r Short-circui t o r overloa d o f th e digita l output s o r th e valu e rang e o f analogu e output s o f th e basi c uni t o r it s loca l expansio n module s (L E module ) i s exceeded . Reactio n o f th e runnin g error : Indicatio n Restar t wit h RU N o r M-RESET . 4-1 2 4/94AWB27-1186-G B Klockner-Moelle r Inbetriebnahm e P S 4 20 0 Statu s DD K Remot e configuratio n erro r Th e configuratio n o f on e o r severa l networ k station s i s faulty , i.e . th e entere d typ e designatio n doe s no t agre e wit h th e existin g device . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RU N o r M-RESET . DD S SB I erro r o r networ k statio n erro r A n erro r o f a networ k statio n ha s bee n detecte d vi a th e interna l seria l interfac e o f th e basi c unit . Th e exac t locatio n o f th e erro r i s possibl e vi a th e diagnostic s byte s o f th e individua l networ k stations . Reactio n o f th e runnin g controller : Indicatio n Restar t wit h RU N o r M-RESET . Note ! Th e diagnostic s bit s describe d abov e onl y appl y t o th e P S 4 20 0 series . Othe r device s (LE , EM , P S 3 ) hav e othe r statu s informatio n whic h i s describe d i n th e manual s concerned . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-1 3 Commissionin g P S 4 20 0 Statu s IN B informatio n Th e informatio n byt e inform s th e use r o n th e statu s o f byt e th e controller , th e image s o f th e networ k stations , star t behaviou r o f th e controlle r etc . Th e operatin g syste m o f th e P S 4 20 0 serie s generate s thi s IN B informatio n byte . It s informatio n bit s ca n b e evaluate d i n th e use r progra m bu t no t b e written . Th e followin g bit s ar e assigne d i n th e informatio n byte : Tabl e 4-2 : IN B informatio n byt e Bi t INBO. O INB0. 1 INB0. 3 INB0. 4 INB0. 5 Meanin g 1 s t cycl e afte r Rese t o r Rese t butto n 1 s t cycl e afte r Rese t butto n Informatio n bi t fo r th e remainin g cycl e Informatio n fo r th e restart : 0 = war m star t 1 = col d star t Informatio n o n ne w dat a i n th e imag e o f th e 1s t networ k lin e IN B 0. 0 Th e IN B 0. 0 bi t i s Hig h durin g th e firs t cycl e afte r th e PL C i s starte d u p wit h th e toggl e switc h i n position s RU N an d RU N M-RESET . IN B 0. 0 ca n b e use d i n th e use r progra m fo r applicatio n relate d initializatio n routines , e.g . L INBO. O J C STAR T IN B 0. 1 IN B 0. 1 i s Hig h durin g th e firs t cycl e i f th e programmabl e controlle r i s starte d vi a th e Rese t butto n o n th e CPU . IN B 0. 1 ca n b e use d fo r initializatio n routines , e.g . L IN B 0. 1 J C STAR T 4-1 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g P S 4 20 0 Statu s INB0. 3 I f a use r progra m ha s bee n stoppe d i n th e middl e o f th e cycle , th e INB0. 3 bi t remain s se t afte r th e restar t unti l th e remainin g cycl e an d th e updatin g o f th e outpu t imag e ar e completed . I f required , a specia l handlin g o f th e dat a range s ca n b e initialize d b y scannin g th e INB0. 3 bi t whe n th e use r progra m start s again . Example : L INB0. 3 J C DATRESE T INB0. 4 Thi s bi t indicate s ho w th e controlle r wa s las t started . Wit h INB0. 4 = 0 a war m star t wa s las t carrie d out . Wit h INB0. 4 = 1 a col d star t wa s las t carrie d ou t an d al l dat a range s ar e initialized . Thi s informatio n i s onl y vali d durin g th e firs t cycl e afte r th e restart . Th e bi t i s the n automaticall y reset . INB0. 5 Thi s bi t i s se t fo r exactl y on e cycl e i f a networ k statio n ha s sen t ne w dat a t o th e basi c unit . Thi s INB0. 5 bi t ca n b e use d i n simpl e sequenc e t o determin e whe n ne w dat a ha s bee n receive d sinc e th e progra m cycl e an d th e communication s proces s ar e no t synchronized . Thi s dat a ca n the n b e processe d directl y a s required . Example : L INB0. 5 J C NEWDAT A Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-1 5 4-1 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g Device , l/ Q Statu s Thi s functio n particularl y support s commissionin g whe n checkin g cable s on-site . A dynami c displa y o f th e digita l an d analogu e inpu t state s i s provide d fo r thi s purpos e withou t th e use r progra m bein g run . Th e cable s t o th e contro l device s ar e checke d b y actuatin g th e contro l device s concerned , an d th e relevan t signa l chang e i s displaye d o n screen . Th e analogu e inpu t variable s fo r analogu e input s ar e converte d internall y an d displaye d a s decima l values , thu s allowin g analogu e transducer s t o b e balance d easily . Whe n selectin g F 3 DEVICE , l/ Q STATU S i n th e TEST / COMMISSIONIN G men u th e se t devic e configuratio n i s rea d ou t o f th e connecte d P S 4 20 0 serie s device . Thi s configuratio n whic h ha s bee n transferre d t o th e controlle r togethe r wit h th e use r progra m i s displaye d graphicall y o n th e screen . PS4-201-MM 1 116-XD l 116-DX 1 EM4-201-DX 1 PS3-A C PS3-D C EM4-101-DD1/10 6 - MAI N MENU—>TEST/COMMISSIONING—>DEUICES,I/ Q STATU S F 1 Retur n F 4 Devic e statu s on/of f F 2 PL C - Star t F 5 l/Q displa y on/of f F 3 PL C - Sto p F 6 Forcin g on/of f F1 0 Hel p Figur e 4-3 : Displa y o f th e devic e configuratio n an d th e l/ Q statu s Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-1 7 Commissionin g Device , I/ Q Statu s Th e curren t statu s o f th e connecte d device s i s indicate d t o th e use r b y clickin g th e F 4 Devic e statu s o n functio n key . Th e messag e "OK " o r "DIAG " i s indicate d i n th e abov e righ t corne r o f th e graphica l display . I116-XD l 116-DX 1 EM4-201-DX 1 HJJJEE l PS3-A C -am i PS3-D C -aEE i r 4 M3Sl EM4-101-DD1/10 6 - MAI N MEN U —>TEST/COMM I SS I ON I NG—>DEUICES,I/ q STATU S aiMHU J F 1 Retur n F 4 Deuic e statu s on/of f F 2 PL C - Star t F 5 I/ Q displa y on/of f F 3 PL C - Sto p F 6 Forcin g on/of f FI B Hel p ntHm-rarre w Figur e 4-4 : Devic e statu s Yo u ca n selec t th e desire d devic e vi a th e curso r key s an d th e error s ca n b e displaye d b y pressin g Return . 116-XD l 116-DX 1 EM4-201-DX 1 oaai i PS3-A C -MM I —Diagnostic s displa y Bi t 2 : DDK - Remot e configuratio n erro r Bi t 4 : DLK - Erro r i n loca l configuratio n Bi t 6 : DBM - Batter y nonito r | P S 3-D C GffiE h ^ EM4-101-DD1/10 6 -MAI N MEN U — >TEST/COMM I SS I ON I NG—>DE U ICES , I/ Q STATU S • UJ'MJ J F 1 Retur n F 4 Devic e statu s on/of f F 2 PL C - Star t F 5 I/ Q displa y on/of f F 3 PL C - Sto p F 6 Forcin g on/of f F1 0 Hel p BEB^BBE i Figur e 4-5 : Diagnostic s displa y fo r individua l device s 4-1 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g Statu s Displa y I L Pres s th e functio n ke y F 4 an d ente r th e require d marke r (M ) areas . Th e followin g typ e o f men u wil l the n appea r o n scree n showin g th e operan d area s previousl y selected . Se e Figur e 4-11 . Thi s displa y i s particular y usefu l whe n checkin g th e functio n o f th e IC P an d ICP Y functio n block s fo r indirec t addressing . MB 0 00000000000 0 MB1 2 0000000 0 MB5 0 MB6 2 MB7 4 MB8 6 MB9 8 0 0 0 0 0 0 0 0 0 0 0 M 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a 0 0 0 0 0 0 0 0 0 0 0 - DISPLA Y RANG E Decima l Dat a transfe r erro r F 1 Retur n F 4 Doubl e rang e F V Decimal/he x displa y F 2 Displa y rang e F 5 Selec t windo w F 8 * / - displa y F 3 LIFO/FIF O F 6 UARIABL E WINDO W F 9 Binar y displa y Figur e 4-10 : Doubl e rang e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-2 5 Commissionin g Statu s Displa y I L I t i s als o possibl e i n th e DISPLA Y RANG E men u vi a F 3 t o chec k th e statu s o f th e First-in-First-ou t an d Last-in - First-ou t register s (LIF O an d FIFO) , se e Figur e 4-11 . Dynami c forcin g Yo u ca n forc e byt e an d wor d marker s dynamicall y durin g th e RU N operatio n o f th e controlle r vi a th e F 6 Displa y rang e functio n ke y i n th e VARIABL E WINDO W men u o f th e I L statu s displa y (Figur e 4-9) . Onl y operand s ca n b e forc e se t dynamicall y whic h hav e bee n release d fo r thi s b y th e Syste m parameter s men u (se e chapte r 1) . 0 190 3 290 6 80 3 2 809 2 809 2 3 11 3 110 0 111 1 122 2 122 2 122 2 223 2 1 2 3 10 3 110 5 100 0 200 0 Interrup t 2 0 122 2 223 2 1 2 3 10 3 110 5 100 0 200 0 190 3 290 6 80 3 2 809 2 809 2 3 11 3 110 0 111 1 122 2 122 2 wit h an y 4 0 100 0 200 0 190 3 290 6 80 3 2 809 2 809 2 3 11 3 functio n ke y 6 0 8 0 10 0 12 0 LIFOU0-5 0 CF : 1 CE : 1 R : 0 I : 0 F : 0 E : 1 Q : 0 ^^7^*^*7^TTTT7T^^TTr?^^^^^^^^^^ M Figur e 4-12 : UF0/FIF 0 statu s displa y 4-2 6 4/94AWB27-1186-G B Klockner-Moelle r Commissionin g Statu s Displa y I L Yo u ca n ad d a n entr y i n th e I L vi a th e F 2 Ad d lin e functio n key . Th e operan d type , th e operan d number , th e inpu t typ e an d th e inpu t valu e ar e assigne d t o th e entr y i n succession.Th e operan d typ e (M B o r MW ) an d th e inpu t typ e ca n b e modifie d wit h th e PgUp/PgD n keys . Th e forma t o f th e inpu t valu e displa y agree s wit h th e selecte d inpu t typ e automatically . Operan d typ e M B M B M U Ml ) Operan d numbe r 0 4 1 0 2 H Curren t valu e 2 0 0 000 0 0 Inpu t Inpu t typ e valu e Decima l 3 0 Hexadecima l fft t Binar y 001000101011100 0 Decima l */ - B - UARIABL E UINDO U F 1 Retur n F 2 Ad d lin e —HBHHBBBfflim B F 6 Forc e operan d M-l«4J.I,»i4».U4UfJ - F 8 Delet e curren t lin e F1 0 Hel p Figur e 4-12 : Dynami c forcin g Danger ! Th e forcin g o f marker s ma y lea d t o unexpecte d reaction s o f th e controlle d machine/plant . Befor e forcin g ensur e tha t person s an d object s ar e no t i n th e endangere d area . Th e inpu t valu e selecte d wit h th e curso r i s transferre d t o th e correspondin g operan d b y pressin g th e F 6 Forc e operan d functio n key , an d the n processe d i n th e use r program , i.e . th e valu e onl y need s t o b e force d once . Th e valu e o f th e marke r afte r th e dynami c forcin g i s complete d thu s onl y depend s o n th e progra m logic : Th e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-2 7 Commissionin g Statu s Displa y I L marker s ar e no t rese t t o th e previou s valu e o r t o zer o whe n yo u exi t th e menu . Th e displa y "Curren t value " i n th e variabl e lis t enable s a chec k o f th e curren t dat a value . Th e curren t valu e i s displaye d i n th e forma t selecte d unde r "Inpu t type" ; onl y dat a entere d a s binar y value s i s displaye d i n hexadecima l format . Dynami c forcin g ca n b e use d t o initiat e a desire d progra m sequenc e o r certai n action s b y settin g certai n dat a values . Th e VARIABL E WINDO W men u ca n als o b e use d t o displa y u p t o 1 8 marker s i n th e lis t a s require d i n orde r t o monito r thei r states . 4-2 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g Onlin e Progra m Modificatio n Genera l Thi s functio n (Figur e 4-13 ) i s particularl y usefu l whe n commissioning . I t allow s progra m modification s wit h th e P S 4 20 0 serie s i n "Run " mode . Th e followin g modification s ca n b e carrie d out : - Ope n ne w block s - Inser t instruction s an d allocation s - Delet e instruction s an d allocation s - Alte r jump s an d jum p target s - Alte r functio n bloc k inpu t parameter s Pres s F 5 i n th e Test/Commissionin g men u an d ente r th e fil e nam e an d th e driv e specification . Th e progra m wil l b e displaye d a s i n th e exampl e below . m m INI T 00 1 !lsl5l:I I PRO G 00 1 00 2 00 3 00 4 00 5 '!l!l!l! W 1 1 00 1 •sTsTsTs M 1 2 00 1 SBBi a Mfini n F 00 1 00 2 00 3 •JlsIslS H EN D 00 1 smsRi a SPB I 00 1 - MAI N MENU — F 1 Retur n "Initialisatio n device-configuratio n ttinclud e "doku.k42 " "Min i Progra m 1 , I 0. 0 A I 0. 1 - Q 0. 1 L K B 2 0 = MB 1 "Includ e 1 ttinclud e <incll.q42 > "Includ e 2 ttinclud e <incl2.q42 > " C M $PB 1 C M $PB 2 C M SSTATI C " E P " L I 0. 0 >ONLIN E MODIFICfiTIO N $MAI N - F 4 Sav e progra m fil e F 2 EDI T PROGRA I d:doku.q4 2 — JMmr m F 8 Selec t F 9 STATU S incli.q4 2 incl2.q4 2 d:doku.z4 2 — fcfiiiu»T;v;nm progra m modul e DISPLA Y I Figur e 4-13 : Onlin e modificatio n I n th e Onlin e men u (figur e 4-13) , selec t EDI T PROGRA M FIL E F 2 an d mak e an y modification s i n block s t o th e progra m tha t ar e necessary . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-2 9 Commissionin g Onlin e Progra m Modificatio n Genera l Pres s th e Activat e ke y F 6 (Figur e 4-14 ) whic h transfer s th e modification s t o th e P S 4 20 0 series . I n orde r t o cance l modification s befor e activation , us e th e Und o modificatio n ke y F7 . ™iT= l INI T 00 1 •ililils n PRO G 00 1 00 2 00 3 00 4 00 5 'slsIffi W i i 00 1 'JBJ5S M I a 00 1 ilililsE ! Mfinill F 00 1 00 2 00 3 •sTsTJTs H FN1 ) 00 1 liJHsK H SPR 1 00 1 - M B I N MEN U — > C F 1 Retur n F 2 Ope n bloc k F 3 Selec t blo c "Initialisatio n device-configuratio n ttinclud e "doku.k42 " "Min i Progra m L I 0. 0 A I 0. 1 = Q 0. 1 L K B 2 0 = MB 1 "Includ e 1 ttinclud e <incll.q42 > "Includ e 2 ttinclud e <incl2.q42 > " C M $PB 1 C M 5PB 2 C M SSIATI C " E P " L I 0. 0 F 4 Ad d lin e F B Fin d strin g k F 6 ftctiuate $MAI N — Inser t — F 7 Und o modificatio n F 8 Delet e curren t lin e F 9 STATU S DISPLA Y Availabl e P C memory:204.00 0 Byt e Availabl e PL C memory:23.55 6 Byt e Status:RU N Figur e 4-14 : Onlin e modificatio n Onlin e modification s involv e intentiona l modification s t o progra m instruction s o f a machin e o r plan t whic h i s i n operation . Danger ! Befor e startin g wit h th e onlin e modifications , ensur e tha t ther e ar e n o person s an d object s i n th e endangere d are a sinc e Onlin e modification s ma y caus e unexpecte d reaction s o f th e controlle d machine/system ! 4-3 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Commissionin g Onlin e Progra m Modificatio n Handlin g SUCOsof t S 3 0 programmin g softwar e an d late r version s featur e th e Onlin e modificatio n functio n integrate d i n th e Tes t an d Commissionin g menu . Thi s men u i s calle d u p fro m th e mai n men u vi a F2 . Onc e i n th e Tes t an d Commissionin g menu , pres s th e ONLIN E PROGRAMMIN G I L functio n key . Th e P S 4 20 0 serie s mus t b e connecte d wit h th e programmin g devic e i n orde r t o us e thi s function . Onlin e modification s ar e possibl e wit h th e programmabl e controlle r i n eithe r RU N o r HAL T mode . Th e las t vali d progra m an d referenc e file s ar e require d fo r th e nex t operation , includin g al l Includ e file s tha t ma y b e used . Ente r th e relevan t driv e specificatio n fo r you r progra m file s followin g th e prompt s o n screen . Note ! I t i s advisabl e t o stor e thes e progra m th e har d dis k i n orde r t o ensur e faste r processin g a s wel l o n accoun t o f th e volume s tha t ar e possibl y involved . file s larg e o n dat a Afte r enterin g th e driv e specification , selec t on e o f th e followin g function s fro m th e men u F 1 RETUR N Leav e Onlin e men u F 2 EDI T Onlin e programmin g an d PROGRA M modificatio n functio n FIL E Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-3 1 Commissionin g Onlin e Progra m Modificatio n Handlin g Functio n ke y F 2 EDI T PROGRA M FIL E F 4 Sav e Sav e th e progra m fil e unde r th e progra m fil e curren t nam e I f th e PL C ha s a memor y modul e wit h Flas h EEPRO M memory , yo u wil l b e aske d i f th e progra m fil e i s als o t o b e update d i n th e Flas h EEPRO M memor y (backup) . I f yo u answe r wit h "No" , th e progra m modificatio n i s los t whe n switchin g of f th e PLC . Whe n switchin g i t o n again , th e previou s progra m i s loade d ou t o f th e Flas h EEPRO M memory . F 7 F 8 F 9 Selec t sourc e fil e Selec t progra m modul e STATU S DISPLA Y F1 0 HEL P Selec t fro m a lis t al l PROGRA M an d Includ e file s i n th e mai n program . Selec t fro m a lis t al l progra m module s whic h ar e linke d t o th e mai n program . Activat e th e I L statu s display . Supplementar y hel p text s Thi s men u enable s th e followin g operation s t o b e carrie d out : - Modifyin g use r program s bloc k b y bloc k - Modifyin g instruction s an d allocation s — > operand s an d existin g symboli c name s - Deletin g instruction s an d allocation s - Insertin g instruction s an d allocation s - » operand s an d existin g symboli c name s - Insertin g commen t text s - Alterin g jump s an d jum p target s - Deletin g jum p instruction s - Insertin g jump s - Modifyin g functio n bloc k parameter s - Openin g ne w block s b y assignin g ne w bloc k label s 4-3 2 4/94AWB27-1186-G B Klockner-Moelle r Commissionin g Onlin e Progra m Modificatio n Restriction s o f th e ONLIN E modification : Th e followin g function s canno t b e carrie d ou t vi a th e ONLIN E EDITOR : - Assignin g ne w symboli c name s - Simultaneou s modificatio n i n severa l block s - Onlin e modification s i n block s mixe d wit h progra m instruction s an d # Includ e < q42 > - Re-programmin g o f functio n block s Note ! Onlin e modification s ma y no t b e carrie d ou t wit h subprogram s whic h ar e calle d u p b y alar m functio n block s (CALARM , FALARM , TALARM) . I n certai n circumstance s thi s ma y lea d t o progra m failure , e.g . i f th e even t signa l require d t o activat e th e alar m functio n bloc k occur s whe n th e onlin e modificatio n i s activated . Th e followin g canno t b e deleted : - Functio n block s En d o f progra m modul e instructio n (EM ) - En d o f progra m instructio n (EP ) Th e followin g canno t b e modifie d o r deleted : - Existin g bloc k label s - Operan d comment s - Pre-processo r instruction s Th e functio n ke y F 6 o f th e ONLIN E MODIFICATIO N men u (Figur e 4-14 ) activate s th e modifie d program . Thi s compile s th e modifie d bloc k an d transfer s i t t o th e PLC . Th e progra m file s <.. . .p42 > an d <.r42 > an d th e sourc e fil e <.. . .q42 > ar e modifie d a t th e sam e time . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 4-3 3 Commissionin g Onlin e Progra m Modificatio n Functio n ke y F 2 PROGRA M ENTR Y Th e progra m fil e i s store d i n th e for m o f a n auxiliar y progra m fil e wit h th e extension s 00 0 00 1 etc. , an d modified , dependin g o n th e numbe r o f onlin e modification s involved . Whe n th e Onlin e modificatio n men u i s left , thes e auxiliar y file s ar e automaticall y transferre d t o th e curren t progra m fil e an d the n deleted . Caution ! D o no t therefor e switc h of f you r P C befor e th e Onlin e edito r ha s bee n lef t vi a RETURN . Otherwis e you r progra m wil l n o longe r correspon d wit h th e progra m fil e o n th e disk . Th e amoun t o f use r progra m memor y availabl e i n th e PL C i s reduce d wit h ever y onlin e modificatio n made . Kee p th e block s i n you r use r progra m a s shor t a s possible . Th e memor y capacit y a s wel l a s th e remainin g memor y i s indicate d wit h ever y onlin e modificatio n made . I f you r progra m memor y capacit y i s use d u p o n accoun t o f to o man y onlin e modifications , yo u ca n transfe r you r optimize d (i.e . shortened ) progra m afte r th e ne w compile r ru n wit h th e CP U i n Hal t mod e (offline) . Danger ! I f activ e output s se t b y th e previou s progra m cycl e ar e edite d onlin e s o tha t the y the n n o longe r hav e a n allocatio n withi n th e program , the y wil l remai n Hig h unti l th e nex t POWE R OF F i n th e P S 4 20 0 series . 4-3 4 4/94AWB27-1186-G B Klockner-Moelle r 5 I L Instruction s Content s Genera l - Abbreviation s - Conditiona l bi t = A AD D B.. . CM.. . C P DI V E M E P GO R JC , JC N J P L MU L NO P NO T 0 R RE T RETC , RETC N ROT L ROT R S SH L SHL C SH R SHR C SU B X O Allocatio n AN D Additio n Conditiona l branche s Possibl e progra m modul e call-up s Compar e Divisio n En d o f modul e En d o f progra m Loa d auxiliar y registe r Conditiona l jump s Unconditiona l jum p Loa d Multiplicatio n N o operatio n Negatio n O R Rese t Retur n Conditiona l return s Rotat e lef t Rotat e righ t Se t Shif t lef t Shif t lef t wit h carr y Shif t righ t Shif t righ t wit h carr y Subtractio n Exclusiv e O R 5- 3 5- 4 5- 4 5- 6 5- 8 5-1 0 5-1 2 5-1 4 5-1 6 5-1 8 5-2 1 5-2 2 5-2 3 5-2 4 5-2 5 5-2 6 5-2 8 5-3 0 5-3 1 5-3 2 5-3 4 5-3 6 5-3 7 5-3 8 5-4 0 5-4 2 5-4 4 5-4 6 5-4 8 5-5 0 5-5 2 5-5 6 Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5- 1 5- 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Genera l Thi s manua l give s a comprehensiv e descriptio n o f th e instruction s fo r th e P S 4 20 0 serie s a s wel l a s a n overvie w o f th e modifie d conditiona l bit s fo r eac h instruction . The y ar e liste d i n alphabetica l order . Th e followin g tabl e show s al l operand s whic h ca n b e use d wit h th e instructions . Pleas e ensur e tha t th e dat a typ e (bit , byte , word ) state d i n eac h instructio n i s th e sam e a s th e dat a typ e o f th e operands . Tabl e 5-1 : Operan d overvie w Designatio n Inputs 1 ) Output s Marker s Constants 1 ) Real-tim e clock 1 ) Periphera l acces s Status/diagnosi s Communicatio n dat a Informatio n BI T I Q M K - IP 1 ) , Q P IS 1 ) - IN B x.y 1 ) BYT E IB , IAB , IC B QB , QA B M B KB , KH B CKx x IPB 1 ) , QP B ISB 1 ) RDB , SD B - WOR D IW , IAW , IC W QW , QA W M W KW , KH W - - ISW 1 ) - - 1 ) Thes e operand s canno t b e use d fo r th e followin g operations : - Allocatio n (= ) - Retur n (R ) - Se t (S ) Specia l feature s o f eac h instructio n ar e explaine d i n example s i f required . Pressin g (RETURN ) afte r th e vali d I L synta x ha s bee n entere d automaticall y cause s th e instructio n concerne d t o b e writte n i n th e correc t forma t thu s ensurin g a standar d displa y format . Thi s i s particular y useful , fo r example , whe n usin g th e FIND/REPLAC E functio n i n th e I L progra m editor . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5- 3 I L Instruction s Genera l Note ! Whe n entrie s ar e mad e i n hexadecima l form , th e synta x chec k canno t distinguis h th e followin g points : e.g . KHBB 1 KHBC 1 KHBE 1 Entrie s lik e th e on e abov e mus t b e mad e wit h a spac e a s follows : KHBuB I KHBuC I KHBuE l Th e descriptio n i n th e heade r show s i n whic h sequence s (bit , byte , word ) th e instruction s ma y b e used . Bi t Byt e Wor d Abbreviation s Th e followin g abbreviation s ar e used : R A Bi t workin g registe r ( 1 bi t wide ) RA b Byt e workin g registe r ( 8 bi t wide ) RA w Wor d workin g registe r (1 6 bi t wide ) RH w Wor d auxiliar y registe r (1 6 bi t wide ) R S Bi t stac k registe r ( 1 bi t wide ) RS b Byt e stac k registe r ( 8 bi t wide ) RS w Wor d stac k registe r (1 6 bi t wide ) Conditiona l bi t C Z P/ M V Carr y bi t Zer o bi t Plus/minu s bi t Overflo w bi t 5- 4 4/94AWB27-1186-G B Klockner-Moelle r Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5- 5 I L Instruction s Allocatio n Bi t Byt e Wor d Descriptio n Th e content s o f th e workin g registe r ar e allocate d t o th e operan d indicated . Th e origina l valu e o f th e operan d i s overwritten . I n a n allocatio n t o a negate d operand , th e negate d content s o f th e workin g registe r ar e allocate d t o th e operand . Whe n a n allocatio n i s mad e t o a periphera l output , th e correspondin g outpu t i s writte n i n th e imag e registe r onl y i n th e progra m sectio n "Operatin g syste m activities" . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h a n allocation , excep t th e operand s marked 1 ) . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e workin g registe r an d th e auxiliar y registe r ar e no t altere d b y th e allocation . Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 No t altere d No t altere d Otherwis e No t altere d Otherwis e No t altere d 5- 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Allocatio n Bi t Byt e Wor d Exampl e I L L I 0. 0 A 10. 1 = M0. 1 Statu s 1 0 0 Remark s Th e state s o f input s 0. 0 an d 0. 1 ar e ANDe d an d th e resul t i s store d i n th e workin g register . Th e conten t o f th e workin g registe r i s transferre d t o marke r 0.1 . I Klockner-Moelle r 4/94AWB27-1186-G B 5- 7 I L Instruction s AN D Bi t Byt e Wor d Descriptio n AN D sequencin g o f th e operan d concerne d wit h th e content s o f th e workin g register . Th e resul t i s store d i n th e workin g register . Th e origina l content s o f th e workin g registe r ar e overwritten . Th e operan d i s no t altered . Wit h AN D sequence s o f wor d operands , th e correspondin g bi t o f ever y operan d involve d i s sequenced . A n AN D sequenc e i s adde d t o th e las t valu e store d i n th e stac k registe r i n th e sam e way . I f a negatio n i s entere d the n thi s wil l influenc e th e content s o f th e workin g register , i.e . th e las t valu e store d i n th e stac k registe r i s combine d i n a n AN D functio n wit h th e negate d content s o f th e workin g register . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h a n AN D sequence . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e auxiliar y registe r i s no t altere d b y th e AN D function . 5- 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s AN D Bi t Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 1 0 1 0 No t altere d Se t i f workin g registe r equal s zer o Otherwis e Se t i f th e resul t i s negative , i.e . th e mos t significan t bi t i s set ; Otherwis e No t altere d Exampl e I L LI B 0.0.0. 0 AMB O = Q B 0.0.0. 0 Statu s 1000101 0 0100101 1 0000101 0 Remark s Loa d inpu t byt e 0.0.0. 0 i n th e workin g registe r RAb . Th e bit s o f marke r byt e 0 ar e the n ANDe d wit h th e bit s i n th e workin g register . Th e resul t i s se t i n th e workin g register . Th e content s o f th e workin g registe r ar e the n allocate d t o outpu t byt e 0.0.0.0 . Klockner-Moelle r 4/94AWB27-1186-G B 5- 9 AD D I L Instruction s Additio n Byt e Wor d Descriptio n Th e operan d concerne d i s adde d t o th e conten t o f th e workin g register , wher e th e resul t i s the n stored . Th e origina l conten t o f th e workin g registe r i s overwritten . Th e operan d i s no t altered . A n operan d i s adde d i n th e sam e wa y t o th e las t valu e store d i n th e stac k register . Note ! Th e value s involve d i n th e additio n ar e interprete d a s integer s (whol e numbers ) wit h plus/minu s symbols . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Additio n instruction . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e auxiliar y registe r i s no t influence d b y th e addition . 5-1 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Compariso n C P Byt e Wor d Update d conditiona l bit s Th e conditiona l bit s ar e altere d immediatel y vi a th e comparison . The y cannot , however , b e use d fo r evaluation . Onl y th e followin g ar e possibl e whe n use d i n conjunctio n wit h CP : BE BI T BG T BL E BG E (equal ) (les s than ) (greate r than ) (les s equal ) (greate r equal ) Exampl e LES S CONTINU E I L LMB 2 CPMB 3 BL T LES S J P CONTINU E Statu s 1010001 1 0110111 0 Remark s Loa d marke r byt e 2 an d compar e wit h M B 3 i n workin g registe r b y subtraction . I f M B 2 i s < M B 3 , branc h t o LESS . Thi s progra m sectio n i s processe d i f M B 2 i s > 3 . Thi s progra m sectio n i s processe d i f M B 2 i s < M B 3 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-1 7 DI V I L Instruction s Divisio n Byt e Wor d Descriptio n Divisio n vi a workin g register : Th e conten t o f th e workin g registe r (dividend ) i s divide d b y th e indicate d operan d (divisor ) an d th e resul t i s store d i n th e workin g register . An y remainde r i s store d i n th e auxiliar y register . Th e origina l conten t o f th e workin g registe r i s overwritten . Th e operan d i s no t altered . Divisio n vi a th e stac k registe r i s a s follows . Th e conten t o f th e stac k registe r (dividend ) i s divide d b y th e conten t o f th e workin g registe r (divisor) . Th e resul t i s writte n int o th e workin g register , th e remainde r int o th e auxiliar y register . Note ! Th e value s interprete d involve d i n th e divisio n ar e a s unsigne d integer s (i.e . withou t plus/minu s symbols) . Divisio n ca n produc e on e o f th e followin g tw o type s o f results . Dependin g o n th e dividen d an d divisor : 1 . I f th e quotien t i s withi n th e rang e o f 0 t o 6 5 53 5 inclusive , i.e. , constitute s a vali d number , th e quotien t an d th e remainde r ar e store d a s vali d result s i n th e relevan t registers . Th e zer o bi t i s se t dependin g o n th e quotient ; th e overflo w bi t i s deleted . 2 . I f th e diviso r equal s zero , th e value s i n th e workin g an d auxiliar y register s ar e invalid . Thi s can , i n thi s case , b e indicate d b y th e overflo w bi t whic h i s set . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Divisio n instruction . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Reminder : Dividen d Diviso r Quotien t 5-1 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Divisio n DI V Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t M 1 0 1 0 1 0 No t altere d Se t i f th e resul t equal s zer o Otherwis e I f th e resul t i s negative , i.e. , i f th e mos t significan t bi t i s se t I f th e resul t i s positiv e Se t i f th e diviso r equal s zer o Otherwis e Exampl e T o divid e th e content s o f M W 0 b y MW 2 an d stor e th e resul t i n MW6 . Th e decima l par t o f th e answe r i s store d i n MW8 . MW O Remainde r - MW 4 R A MW 2 MW 4 KW1 0 MW 2 MW 6 R A MW f Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-1 9 DI V I L Instruction s Divisio n Byt e Wor d Exampl e I L DIVZER O E P LMW O DI V M W 2 = MW 6 GO R B V DIVZER O = MW 4 LMW 4 MULKW1 0 DI V M W 2 = MW 8 JPE P LKW O = MW 6 = MW 8 E P Remark s Divisio n o f M W 0 b y M W 2 Stor e resul t i n M W 6 Th e auxiliar y registe r i s loade d int o th e workin g register . I f th e diviso r i s equa l t o zer o the n th e divisio n i s invalid . Branc h t o th e labe l "DIVZERO" . Th e remainin g intege r i s store d i n MW4 . T o calculat e th e valu e o f th e firs t decima l plac e o f th e remainde r firs t multipl y b y 1 0 an d the n divid e b y divisor . Th e resul t i s th e firs t decima l place . I t i s store d i n MW8 . En d o f calculatio n Diviso r i s zero ; th e resul t i s invali d an d i s deleted . 5-2 0 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s En d o f Modul e E M Bi t Byt e Wor d Th e en d o f modul e comman d E M mark s th e en d o f a progra m module . I t mus t alway s b e writte n a s th e las t instructio n a t th e en d o f eac h progra m module . Exampl e $BP 1 L I 0. 0 A I 0. 1 0 1 0. 2 =Q0. 3 E M I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-2 1 E P I L Instruction s En d o f Progra m Bi t Byt e Wor d Descriptio n Th e E P instructio n i s th e logica l an d physica l en d o f th e program . Thi s instructio n mus t b e place d a t th e las t ste p i n th e mai n progra m an d cause s a jum p t o th e operatin g system . Register s an d dat a ar e no t altered . Exampl e 0000 1 1 L I 0. 0 2 A I 0. 1 3 0 1 0. 2 4 = Q 0. 3 5 E P 5-2 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Loa d Auxiliar y Registe r GO R Byt e Wor d Descriptio n Exampl e Th e conten t o f th e auxiliar y registe r i s loade d int o th e workin g register . Th e operatio n i s permissibl e onl y i n wor d an d byt e sequence s an d i s use d onl y afte r a multiplicatio n o r division . Th e conten t o f th e auxiliar y registe r i s no t altered . Th e statu s register s ar e no t affected . Divisio n o f MW O b y MW 2 wit h rounding . I f th e firs t decima l plac e i s greate r tha n 5 , i t i s rounde d up . Th e resul t i s store d i n MW6 . I L ROUNDU P E P LMW O DI V M W 2 = MW 6 GO R = MW 8 LMW 8 MU L K W 1 0 DI V M W 2 CPKW 5 BLTE P LMW 6 ADDKW 1 = MW 6 E P Remark s Divisio n o f M W 0 b y M W 2 Stor e resul t i n M W 6 Loa d auxiliar y registe r i n workin g register . Stor e remainin g intege r i n MW8 . Calculatio n o f th e firs t decima l plac e (Res t x 10) : M W 2 I f th e firs t decima l plac e i s les s tha n 5 , roun d off . Th e resul t i n M W 6 i s therefor e correct . Continu e wit h E P Th e firs t decima l plac e i s greate r tha n 4 ; i t mus t b e rounde d up . Se e als o exampl e fo r MU L an d DIV . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-2 3 JC , JC N I L Instruction s Conditiona l Jump s Bi t Descriptio n Th e curren t sequenc e resul t i s compare d wit h 1 o r 0 . I f the y agree , th e progra m i s continue d a t th e locatio n whic h i s indicate d a s th e jum p target . I f th e conditio n i s no t fulfilled , n o jum p occurs . Th e jum p targe t mus t alway s b e th e beginnin g o f a bloc k ( a bloc k label) . Conditiona l jump s ar e permissibl e onl y i n bi t sequences . Th e workin g an d th e auxiliar y register s ar e no t affecte d b y th e conditiona l jumps . Exampl e Puls e generato r I L CONTINU E LK O = Q1. 0 TP O [ ] S : L N Q 1. 0 []R : [W ] I : K W 500 0 []P : [W]Q : LTPO P JC N CONTINU E LK 1 = 0.1. 0 • Remark s Rese t outpu t 1. 0 Generat e a 5 s cycl e puls e I f th e time r T 5 ha s no t ye t time d out , th e progra m jump s o n th e labe l "CONTINUE" . Thi s progra m sectio n i s ru n fo r on e cycl e i f th e time r T 5 time s out . 5-2 4 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s Unconditiona l Jum p J P Bi t Byt e Wor d Descriptio n Th e progra m wil l continu e whereve r th e jum p wa s targette d to . Th e targe t mus t b e th e beginnin g o f a block . Thi s comman d i s a sequenc e consistin g o f on e instruction . Unconditiona l jump s shoul d therefor e onl y b e use d a t th e en d o f a sequence . Th e auxiliar y an d statu s register s ar e unchange d b y thi s jum p instruction . Exampl e TARGE T 1 TARGE T 2 CONTINU E I L LMB O CPMB 1 BG T TARGE T 1 BL T TARGE T 2 J P CONTINU E J P CONTINU E Remark s B y comparin g th e value s o f th e marker s th e progra m i s eithe r branche d t o TARGE T 1 i f greate r tha n o r TARGE T 2 i f les s than . I f th e marke r value s ar e equa l the n bot h TARGET S mus t b e jumped . Th e greate r tha n compariso n i s valid . Th e les s tha n compariso n i s valid . Furthe r progra m Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-2 5 I L Instruction s Loa d Bi t Byt e Wor d Descriptio n Th e valu e o f th e indicate d operan d i s loade d int o th e workin g register . Th e origina l conten t o f th e registe r i s overwritten . I f th e Loa d instructio n i s withi n a sequence , i.e. , th e conten t o f th e workin g registe r ha s no t ye t bee n allocate d t o a n operand , th e origina l conten t o f th e workin g registe r i s store d i n a stac k register . Th e operan d i s no t altered . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Loa d instruction . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e auxiliar y registe r i s no t altere d b y th e Loa d instruction . Th e statu s register s hav e n o meaning . Exampl e I L L I 0. 0 0 10. 1 L I 0. 2 A = Q0. 0 Statu s 1 0 1 1 Remark s Inpu t 0. 0 i s ORe d wit h inpu t 0. 1 an d th e resul t i s store d i n th e workin g register . Th e resul t store d i n th e workin g registe r i s shifte d t o th e botto m o f th e stac k registe r an d th e stat e o f inpu t 0. 2 i s store d i n th e workin g register . Th e valu e store d i n th e botto m o f th e stac k registe r i s ANDe d wit h th e valu e i n th e workin g register . Th e valu e i n th e workin g registe r i s transferre d t o outpu t 0.0 . 5-2 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s O R Bi t Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 No t altere d I f th e sequenc e resul t equal s zer o Otherwis e I f ther e i s a negativ e resul t wit h byt e o r wor d operations , i.e . th e mos t significan t bi t i s se t Otherwis e No t altere d Exampl e I L LM3. 0 OM3. 1 0M3. 2 OM3. 3 = M6. 0 Statu s 1 0 1 0 1 P F Remark s Th e marker s 3. 0 t o 3. 3 ar e ORe d togethe r an d th e resul t allocate d t o marke r 6.0 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-3 3 I L Instruction s Rese t Bi t Descriptio n Th e indicate d bi t o f th e operan d i s delete d i f th e conten t o f th e workin g registe r equal s "1" . I f thi s rese t conditio n i s no t fulfilled , th e operan d i s no t altered . Th e operatio n i s permissibl e onl y i n bi t sequences . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Rese t instruction , excep t th e operand s marked 1 ) . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e workin g an d auxiliar y register s ar e no t altered . Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 No t altere d I f th e workin g registe r equal s zer o Otherwis e No t altere d No t altere d Exampl e I L L I 0. 0 A N I 0. 1 SQ0. 4 L I 0. 1 RQ0. 4 Statu s 1 0 1 0 PF * 1 1 1 1 1 R I f th e inpu t 0. 0 i s Hig h an d inpu t 0. 1 i s Lo w outpu t 0. 4 wil l b e se t High . Th e self-holdin g functio n i s stoppe d a s soo n a s th e inpu t 0. 1 i s set . *P F sequence s resul t (Powe r Flow ) 5-3 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-3 5 RE T I L Instruction s Retur n Bi t Byt e Wor d Descriptio n Thi s instructio n cause s a retur n fro m th e curren t progra m leve l t o th e nex t highe r level , e.g . fro m th e sub - progra m t o th e mai n progra m o r fro m th e mai n progra m t o th e operatin g system . Th e RE T comman d i s a sequenc e whic h consist s o f a n instruction . Th e retur n ma y thu s onl y b e programme d afte r a sequenc e i s completed . Exampl e I L L I 0. 3 = M3. 5 RE T Commen t Sub-progra m Instructio n Retur n t o th e mai n progra m 5-3 6 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s RETC , RETC N Conditiona l Return s Bi t Descriptio n Th e curren t sequenc e resul t i s compare d wit h 1 o r 0 . I f the y agree , a retur n t o th e nex t highe r leve l i s carrie d out . I L L I 0. 0 A M 3. 4 RETC N Commen t AN D sequenc e o f I 0. 0 an d M 3. 4 Retur n t o th e nex t highe r leve l i f AN D sequenc e i s no t fulfilled . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-3 7 ROT L I L Instruction s Rotat e t o th e Lef t Byt e Wor d Descriptio n Th e conten t o f th e workin g registe r i s shifte d t o th e left . I n th e process , th e mos t significan t bi t move s t o th e leas t significan t locatio n o f th e workin g registe r an d simultaneousl y int o th e carr y bi t o f th e statu s register . Wit h byt e sequence s 8 rotatio n step s ar e possibl e an d wit h wor d sequence s 1 6 rotatio n steps . 0 0 L 7 RA b 0 -4 , 1 5 RA w ( •4 Th e operatio n i s permissibl e i n byt e an d wor d sequences . Th e conten t o f th e auxiliar y registe r i s no t altered . Synta x Datatyp e Byt e Wor d Instructio n ROT L ROTL n ROT L ROTL n Actio n rotat e RA b lef t n = 1... 8 rotat e RA w lef t n-1...1 6 5-3 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Rotat e t o th e lef t ROT L Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t 1 0 1 0 1 0 Se t i f th e las t rotate d bi t wa s se t Otherwis e Se t i f th e workin g registe r equal s zer o Otherwis e Se t i f th e resul t o f rotatio n i s negative , i.e. , th e mos t significan t bi t i s se t Otherwis e No t altere d Exampl e I L LMB 4 ROT L = MB 4 Statu s 0101101 1 1011011 0 Remark s Th e bit s i n marke r byt e 4 ar e shifte d t o th e lef t an d th e mos t significan t bi t wil l b e shifte d t o th e leas t significan t bit . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-3 9 ROT R I L Instruction s Rotat e t o th e Righ t Byt e Wor d Descriptio n Th e conten t o f th e workin g registe r i s shifte d t o th e right . I n th e proces s th e leas t significan t bi t move s t o th e mos t significan t locatio n o f th e workin g registe r an d a t th e sam e tim e int o th e carr y bi t o f th e statu s register . Wit h byt e sequence s 8 rotatio n step s ar e possibl e an d wit h wor d sequence s 1 6 rotatio n steps . — • 7 RA b C RA w Th e operatio n i s permissibl e i n byt e an d wor d sequences . Th e conten t o f th e auxiliar y registe r i s no t altered . Synta x Dat a typ e Byt e Wor d Instructio n ROT R ROTR n ROT R ROTR n Actio n rotat e RA b righ t n = 1... 8 rotat e RA w righ t n = 1...1 6 5-4 0 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s Rotat e t o th e Righ t Byt e Wor d Update d conditiona l bi t Carr y bi t ( Q Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 1 0 1 0 Se t i f th e las t rotate d (mos t significant ) bi t wa s se t Otherwis e Se t i f th e workin g registe r equal s zer o Otherwis e Se t i f th e resul t o f rotatio n i s negative , i.e. , th e mos t significan t bi t i s se t Otherwis e Se t i f th e plus/minu s symbo l ha s altere d afte r rotatio n Otherwis e Exampl e I L LMB O ROTR 2 = MB 0 Statu s 0110111 0 1001101 1 1001101 1 Remark s Th e bit s o f marke r byt e 0 ar e rotate d t o th e righ t twice . Th e stat e o f bi t 8 i s transferre d t o bi t 1 an d th e stat e o f bi t 7 i s transferre d t o bi t 0 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-4 1 S I L Instruction s Se t Bi t Descriptio n Th e indicate d bi t o f th e operan d i s se t i f th e conten t o f th e workin g registe r equal s "1" . I f thi s settin g conditio n i s no t fulfilled , th e operan d i s no t altered . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Se t instruction , excep t th e operand s marked 1 ) . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e workin g an d th e auxiliar y register s ar e no t altered . 5-4 2 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s Shif t t o th e Righ t SH R Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 1 0 I f th e las t shifte d (mos t significant ) bi t wa s se t Otherwis e Se t i f th e workin g registe r equal s zer o afte r th e shif t operatio n Otherwis e Se t i f th e resul t o f th e shif t operatio n i s negative , i.e. , th e mos t significan t bi t i s se t Otherwis e No t altere d Exampl e I L L I B 0.0.0. 1 SH R 4 = MB2 0 Statu s 0010100 1 0000001 0 0000001 0 Remark s Th e valu e o f inpu t byt e 0.0.0. 1 i s t o b e divide d b y 1 6 an d store d i n make r byt e 20 . An y remainde r i s t o b e ignored . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-4 9 SHR C I L Instruction s Shif t Righ t wit h Carr y Byt e Wor d Descriptio n Update d conditiona l bi t Th e valu e i n th e workin g registe r i s shifte d t o th e right . I n thi s cas e th e statu s o f th e carr y bi t i n th e statu s registe r move s t o th e mos t significan t bi t o f th e workin g registe r an d th e leas t significan t bi t move s t o th e carr y bit . o RA b 1 5 SH I RA w - 0 H E Th e operatio n i s permissibl e i n byt e an d wor d sequences . Th e conten t o f th e auxiliar y registe r i s no t altered . Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 1 0 Se t whe n bi t 0 (th e leas t significan t bit ) i s se t Otherwis e Se t whe n content s o f workin g registe r i s zer o Otherwis e Se t whe n conten t o f workin g registe r i s negative , th e mos t significan t bi t i s se t Otherwis e No t altere d 5-5 0 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s Shif t Righ t wit h Carr y SHR C Byt e Wor d Exampl e Cascad e 4 marke r byte s t o construc t a 3 2 bi t shif t registe r I L LMB 9 SH R = MB 9 LMB 8 SHR C = MB 8 LMB1 0 SHR C = MB1 0 LMB 9 SHR C = MB 9 Statu s 1010100 1 C = 1 0101010 0 1110100 0 c = o 1111010 0 1110010 1 C = 1 0111001 0 0000111 0 c = o 1000011 1 Remark s Th e content s o f M B 9 i s shifte d t o th e righ t an d th e stat e o f th e leas t significan t bi t i s store d i n th e carr y bit . Th e stat e o f th e carr y bi t wil l b e transferre d t o th e mos t significan t bi t o f M B 8 an d th e content s wil l b e shifte d t o th e right. Th e valu e o f th e leas t significan t bi t i s shifte d t o th e carr y register . Th e valu e o f th e carr y bi t i s shifte d t o th e mos t significan t locatio n an d th e marke r byt e 1 0 i s shifte d t o th e right . Th e stat e o f th e leas t significan t bi t i s store d i n th e carr y bit . Th e stat e o f th e carr y bi t i s transferre d t o th e mos t significan t bi t an d th e marke r byt e 9 i s shifte d t o th e right. Th e stat e o f th e leas t significan t bi t i s shifte d t o th e carr y bit . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-5 1 SU B I L Instruction s Subtractio n Byt e Wor d Descriptio n Subtractio n vi a workin g register : Th e indicate d operan d (subtrahend ) i s subtracte d fro m th e conten t o f th e workin g registe r (minuend ) an d th e resul t i s store d i n th e workin g register . Th e origina l conten t o f th e workin g registe r i s overwritten . Th e operan d i s no t altered . Subtractio n vi a stac k register : Th e conten t o f th e workin g registe r (subtrahend ) i s subtracte d fro m th e conten t o f th e stac k registe r (minuend) . Th e resul t i s writte n int o th e workin g register . Note ! Th e value s involve d i n th e subtractio n ar e interprete d a s integer s wit h plus/minu s symbols . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Subtractio n instruction . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e auxiliar y registe r i s no t influence d b y th e subtraction . Remember : Minuen d - Subtrahen d = Differenc e 5-5 2 4/94AWB27-1186-G B Klockner-Moelle r I L Instruction s Subtractio n SU B Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 1 0 1 0 Se t i f a so-calle d "borrowe d bit " wa s required , i.e. , th e minuen d wa s smalle r tha n th e subtrahen d Delete d i f ther e i s carry-ove r fro m th e mos t significan t bi t (thi s i s ignore d wit h th e subtraction ) Se t i f th e resul t equal s zer o Otherwis e Se t i f th e resul t i s negative , i.e. , i f th e mos t significan t bi t i s se t Otherwis e Se t i f a n arithmetica l overflo w ha s take n place , i.e. , i f th e resul t exceed s th e permissibl e rang e (-12 8 t o +12 7 fo r byt e operations , -3276 8 t o +3276 7 fo r wor d operations ) Otherwis e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-5 3 SU B I L Instruction s Subtractio n Byt e Wor d Exampl e o f Cascadin g 1 5 MB 1 1 5 M B 3 + m 7 7 MB O M B 2 0 0 1 5 M B 5 M B 4 I L SUBTR A CARR Y CONTINU E 1 ERRO R CONTINU E 2 LMB O SU B M B 2 B V ERRO R = MB 4 B C CARR Y J P CONTINU E 1 LMB 3 AD D K B 1 B V ERRO R = MB 3 LMB 1 SU B M B 3 = MB 5 B V ERRO R J P CONTINU E 2 Statu s 0010101 1 0001011 0 0001010 1 C = 0 0101110 1 0011011 1 0010011 0 Remark s Subtrac t th e lowe r orde r byte s an d stor e th e resul t i n M B 4 . I f thi s calculatio n result s i n a n overflow , branc h t o th e CARR Y routine . I f a carry-ove r (borro w bit ) i s present , a 1 i s adde d t o th e subtrahen d o f th e highe r orde r byte . Subtrac t th e highe r orde r byte s an d stor e th e resul t i n M B 5 . ERRO R routin e i f a n overflo w occur s i n a n arithmeti c operation . 5-5 4 4/9 4 AWE S 27-1186-G B Klockner-Moelle r I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-5 5 x o I L Instruction s Exclusiv e O R Bi t Byt e Wor d Descriptio n Exclusiv e O R sequencin g o f th e indicate d operan d wit h th e conten t o f th e workin g register , wher e th e resul t i s the n stored . Th e origina l conten t o f th e workin g registe r i s overwritten . Th e operan d i s no t altered . I n exclusiv e O R sequencin g o f byt e o r wor d operand s th e correspondin g bit s o f eac h operan d involve d ar e sequenced . Th e operan d i s parallele d i n a n exclusiv e O R sequenc e wit h th e las t valu e store d i n th e stac k registe r i n th e sam e manner . I f a negatio n i s inserte d here , i t wil l affec t th e conten t o f th e workin g register , i.e. , th e las t valu e store d i n th e stac k registe r i s parallele d (XOred ) wit h th e negate d conten t o f th e workin g register . Al l operand s o f Tabl e 5- 1 ca n b e use d wit h th e Exclusive-O R sequence . Pleas e ensur e tha t th e dat a typ e mentione d abov e (Bit , Byte , Word ) i s th e sam e a s th e dat a typ e o f th e operands . Th e auxiliar y registe r i s no t altere d b y th e exclusiv e O R sequencing . Trut h Table : W 1 0 0 1 1 W 2 0 1 0 1 W 1 e W 2 0 1 1 0 5-5 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r I L Instruction s Exclusiv e O R X O Bi t Byt e Wor d Update d conditiona l bi t Carr y bi t (C ) Zer o bi t (Z ) Plus/minu s bi t (P/M ) Overflo w bi t (V ) 1 0 1 0 1 No t altere d Se t i f th e sequencin g resul t equal s zer o Otherwis e Se t i f th e resul t i s negativ e wit h byt e an d wor d operations , i.e. , th e mos t significan t bi t i s se t Otherwis e No t altere d Exampl e I L L I 0. 1 X O I 0. 2 = 0 0. 2 Statu s 1 0 1 Remark s Th e outpu t 0. 2 wil l onl y b e se t whe n inpu t 0. 1 o r 0. 2 ar e Hig h bu t no t whe n bot h are . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 5-5 7 5-5 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Up/Dow n Counte r Wor d Thi s mean s tha t th e valu e 0 appear s afte r th e valu e 6 5 53 5 an d -3 2 76 8 appear s afte r 3 2 767 . Thi s progressio n mus t b e take n int o accoun t i n th e use r program . Whe n th e R-inpu t i s High , th e counte r i s rese t int o it s initia l positio n an d th e content s deleted . Th e Z-outpu t o f th e counte r i s High , whe n th e conten t o f th e counte r equal s 0 . Th e Q-outpu t alway s show s th e counte r actua l value . Note ! Th e puls e mus t a t leas t b e a s lon g a s on e cycle , s o tha t th e counte r ca n recogniz e ever y countin g pulse . Th e counte r mus t b e abl e t o recogniz e a subsequen t Lo w o f th e signa l i n orde r t o ensur e automati c edg e formation . Th e maximu m countin g frequenc y i s therefor e F - 1 tcycl e Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6- 7 Functio n Block s Up/Dow n Counte r Wor d Exampl e Th e counte r 1 1 i s t o coun t on e ste p furthe r eac h tim e I0. 5 closes . I0. 6 reset s th e counter . Th e actua l coun t i s indicate d vi a th e marke r wor d MW12 . Revers e countin g an d settin g i s no t used . Th e program : C1 1 10. 5 Forwar d puls e (Up ) 1 0. 6 MW1 2 Rese t Actua l valu e Cycl e 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25 . 10. 5 U . I 0. 6 R . MW1 2 D ' r i X o 6- 8 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s Counte r Alar m Functio n Bloc k Counte r Alar m CALAR M Synta x Representatio n Call - up : CALAR M 0 Executio n time : 2 0 \ns withou t subprogra m (UP ) I L CALAR M 0 [ ] [W ] [W ] [B ] [W ] [$ ] E N V T SOL L ER R CN T A C 24 0 \is + S P tim e wit h subprogra m Enable/disabl e interrup t ( 0 = disable , 1 = enable ) Predivide r counte r Setpoin t valu e counte r Erro r outpu t Alar m counte r (numbe r o f modul e call-ups ) Addres s o f th e subprogra m whic h i s t o b e calle d u p Descriptio n Thi s functio n bloc k i s assigne d th e I 0. 0 hardwar e inpu t i n th e basi c uni t (P S 4-201-MM1) . Th e E N inpu t control s th e star t o f th e counter . Th e counte r i s starte d i f th e inpu t i s 1 . Whe n switchin g fro m 1 t o 0 , th e counte r i s stoppe d an d reset . Th e V T inpu t (values : 1 - 65535 ) indicate s ho w man y signal s occu r o n th e hardwar e inpu t unti l th e counte r i s incremente d b y 1 . Th e SOL L inpu t ( 1 - 65535 ) indicate s afte r ho w man y counte d signal s th e alar m i s t o b e enable d o r th e functio n bloc k i s t o b e calle d up . Th e ER R oupu t contain s th e cod e o f th e errors : 0 = n o erro r 1 = setpoin t valu e i s 0 2 = predivide r i s 0 Th e CN T outpu t ( 0 - 65535 ) indicate s ho w ofte n th e setpoin t valu e SOL L ha s bee n reached . Th e A C inpu t allow s a n event-drive n progra m t o b e implemented . Fo r thi s i t i s necessar y t o defin e th e addres s ( $ name ) o f th e subprogra m tha t i s t o b e execute d whe n reachin g th e event . I f n o addres s i s stated , onl y th e CN T counte r i s incremented . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6- 9 CALAR M Functio n Block s Counte r Alar m Functio n Bloc k Counte r Alar m Descriptio n Th e followin g point s mus t b e observe d fo r th e event - drive n program : - Afte r th e even t ha s occurred , th e use r progra m i s interrupted , th e registe r statu s i s save d an d th e subprogra m state d unde r th e A C addres s i s executed . Th e alar m functio n bloc k canno t b e interrupte d b y othe r alar m functio n block s (al l alar m functio n block s hav e th e sam e priority) . - Th e max . executio n tim e o f alar m functio n block s i s restricte d b y th e use r progra m t o 5 m s (approx . 1 K I L instructions ) sinc e th e alar m functio n block s canno t b e interrupte d eve n b y th e operatin g syste m i n th e even t o f a voltag e drop . I f th e executio n tim e i s exceeded , a n ED C erro r ma y occu r whe n switchin g of f th e powe r supply . - Th e executio n tim e o f th e alar m functio n bloc k i s adde d t o th e executio n tim e o f th e cyclica l use r progra m an d als o monitore d b y th e cycl e tim e monitorin g function . - Sinc e th e event-drive n progra m processin g enable s acces s t o th e entir e imag e register , acces s t o dat a tha t i s use d b y th e event-controlle d an d cyclica l use r progra m mus t b e disabled . Bi t accesse s ma y no t occu r o n th e sam e byt e i n th e cyclica l use r progra m an d i n th e Alar m functio n block . - Sinc e a n Alar m functio n bloc k requires , du e t o it s fas t reactions , a high-spee d periphera l acces s (direc t output) , th e QB , QP B periphera l operand s availabl e i n th e basi c uni t shoul d b e used . - A n alar m functio n bloc k ca n b e use d severa l time s (multipl e instantiation ) althoug h thi s shoul d normall y b e avoide d sinc e eac h functio n bloc k grou p ha s th e sam e even t sourc e (hardwar e inpu t I 0.0.0.0.0 ) an d onl y th e las t functio n bloc k instanc e i n th e progra m i s valid . - B y multipl e instantiatio n i s mean t th e reservatio n o f severa l dat a range s fo r eac h paramete r se t o f a particula r functio n bloc k type . 6-1 0 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s CALAR M Counte r Alar m Functio n Bloc k Counte r Alar m Exampl e I n th e followin g exampl e th e signal s o f a rotar y encode r ar e counted . Th e tim e betwee n th e signal s i s shorte r tha n th e cycl e tim e o f th e PLC . Th e encode r output s 100 0 signal s pe r rotatio n degree . Th e divide r rati o o n th e functio n bloc k i s t o b e se t t o 10 0 s o tha t th e rotatio n positio n i s 1/1 0 degre e o n th e CN T output . Printou t o f th e c:cala.q4 2 fil e Dated : 6 . 4 . 9 4 0000 0 00 1 00 2 00 3 0000 1 00 1 0000 2 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 0000 3 00 1 00 2 BLOCK 0 BL0CK 1 BL0CK 2 [ ] "Incorporat e configuratio n fil e #includ e "config.k42 " "Star t o f progra m "Cal l u p CALARM 0 functio n bloc k i n orde r "th e signal s vi a I 0. 0 counte r inpu t CALARM 0 EN : I 0. 5 Se t functio n bloc k [w ] VT:KW10 0 [w ] S0L L K W 1 [b ] [w ] [$ ] EN D H P ERR : MB2 5 CNT : MW1 0 AC : "En d o f progra m I Klockner-Moelle r 4/9 4 AWE S 27-1186-G B 6-1 1 C K Functio n Block s Time/Dat e Comparato r Cloc k Synta x Call-up : C K < Bloc k No . > A s operand : C K < Bloc k No . >u < Input/Outpu t > Numbe r range s TIME : DAY : DATE : VDAT : VTIM : 1 ) Hour s (0...23 ) 2 ) Poin t 3 ) Minute s (0...59 ) (0...6 ) 0 = Sunda y (SU ) 1 = Monda y (MO ) 2 = Tuesda y (TU ) 3 = Wednesda y (WE ) 4 = Thursda y (TH ) 5 = Frida y (FR ) 6 = Saturda y (SA ) 1 ) Mont h ( 1 ...12 ) 2 ) Poin t 3 ) Da y (1...31 ) Day . Mont h (1...3 1 .1...12 ) h . mi n (0...2 3 . 0...59 ) Performanc e time : 20 0 |i s Representatio n I L CK1 0 [ ] [X ] [X ] [X ] [W ] [W ] [ ] [ ] [ ] [ ] S : TIM E DAY : DAT E VDA T VTI M GT : EQ : LT : ERR : Trut h tabl e tRE F < tAC T tRE F = tAC T tRE F < tAC T tRE F invali d L T 1 0 0 0 E Q 0 1 0 0 G T 0 0 1 0 ER R 0 0 0 1 6-1 2 4/9 4 AWE S 27-1186-G B Klockner-Moelle r Functio n Block s C K Time/Dat e Comparato r Cloc k Descriptio n Th e time/dat e comparato r functio n bloc k scan s th e interna l real-tim e cloc k whic h i s battery-backe d fo r whe n th e controlle r i s switche d off . Tim e an d dat e ca n b e se t o r correcte d b y mean s o f th e SUCOsof t "Time/date " menu . Whe n i n operation , th e functio n bloc k compare s th e prese t values , suc h a s tim e (hours , minutes) , da y (week - day) , dat e (day , month ) wit h th e runnin g real-tim e clock . Th e value s ca n b e prese t i n tw o ways : 1 . Vi a functio n bloc k input s TIME , DAY , DATE . Th e dat a i s entere d vi a P C durin g programming . Thes e constan t value s canno t b e change d durin g processing . The y ar e onl y vali d whe n th e input s VDA T an d VTI M hav e n o define d operands . Th e ER R outpu t i s Low . Possibl e paramete r settings . TIME : 20.3 5 DAY : - DATE : - TIME : 20.3 5 DAY : 1 , DATE : - TIME : 20.3 5 DAY : - DATE : 3.2 8 Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-1 3 C K Functio n Block s Time/Dat e Comparato r Cloc k Descriptio n 2 . Vi a functio n bloc k input s VDAT , VTiM . Whe n VTI M o r VTI M an d VDA T hav e bee n set , th e input s TIME , DAY , DAT E ar e n o longe r active . Th e setting s i n wor d forma t i s carrie d out , a s usual , b y mean s o f a functio n bloc k call-u p o r i n th e use r program . e.g . LKB3 5 = MB1 0 LKB1 7 = M B 1 1 LKB 3 = MB1 2 LKB1 8 = MB1 3 CK1 0 [ ] [X I [X I [X ] [W ] [W ] [ 1 [ ] [ ] [ 1 etc . S : 1 0. 0 TIME : DAY : DATE : VDAT : M W 1 2 VTIM : M W 1 0 GT : EQ : Q 0. 0 LT : ERR : Q 0. 1 o r L I 0. 0 = CK10 S LKB3 5 = MB1 0 LKB1 7 = M B 1 1 LKB 3 = MB1 2 LKB1 8 = MB1 3 LMW1 0 = CK10VTI M LMW1 2 = CK10VDA T LC K 1 0 E Q = 0.0. 1 LC K 1 0 ER R = Q0. 1 CK1 0 etc . < 1 Wor d • 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 Bi t 000 1 0001)00 1 000 1 1 | |17|35|VTI M Hou r Minut e h min . 000 1 00 1 0| 0 00000 1 1 | |18|3 | VDA T Da y Mont h da y mont h 6-1 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s C K Time/Dat e Comparato r Cloc k Al l possibl e value s ar e acceptabl e fo r th e marke r words . I f invali d value s ar e given , e.g . 2 5 hours , th e ER R outpu t i s High . Functio n Th e functio n bloc k i s activate d whe n th e S inpu t i s High . A Lo w signa l set s al l th e output s Low . Exampl e 1 : S _ J I L T I L ? E Q n l G T _ J i r 2 ) fsE T t A C T 1 ) E Q remain s Hig h fo r on e minut e whe n th e se t tim e ha s bee n reached . 2 ) Chang e fro m "greate r than " t o "les s than " depend s o n tim e preselec t o f TIM E o r VTI M a t 2 4 hours , o f DA Y o n Sunda y 2 4 hours , o f DA T o r VDA T a t th e en d o f th e yea r a t 2 4 hours . Exampl e 2 (Dat a chang e S VDAT , VTI M L T E Q G T wit h t l l e progra m running) : l_ l 1 ) m X W 2 — i _ _r ~ n _ | | _ fc. tsE T tAC T 1 ) Chang e o f value : ol d = W1 , ne w = W 2 Th e ne w valu e i s accepte d i n th e nex t processin g cycl e o f th e functio n bloc k i n th e use r program . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-1 5 C P Functio n Block s Comparato r Wor d Synta x Call-up : C P < Bloc k No . > A s operand : C P < Bloc k No . >u < Input/outpu t > Numbe r ranges : -32768...0...+3276 7 decima l Performanc e time : 10 5 u s Representatio n I L CP1 0 [W ] [W ] [ ] [ ] [ ] 12 : GT : EQ : LT : Valu e 1 Valu e 2 1 1 <I 2 1 1 = 1 2 1 1 >I 2 Trut h tabl e 1 1 < 1 2 1 1 = 1 2 1 1 > 1 2 L T 1 0 0 E Q 0 1 0 G T 0 0 1 Descriptio n Th e functio n bloc k compare s th e value s a t th e wor d input s 1 1 an d 12 , the n set s th e output s accordin g t o th e trut h table . 6-1 6 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s Firs t I n - Firs t Ou t FIFO B Byt e Example s 7 01 9 6 25 5 5 03 5 4 09 5 3 2 1 0 C F I 01 4 C E 7 01 9 6 25 5 5 03 5 4 09 5 3 01 4 2 1 0 C F I Firs t i n - firs t ou t registe r A n inpu t byt e i s take n fro m I t o th e topmos t fre e locatio n wit h th e risin g edg e a t "CF " 7 25 5 6 03 5 5 09 5 4 01 4 C E Q X 5 7 01 9 6 25 5 5 03 5 4 09 5 3 01 4 2 1 0 C F I X C F Firs t i n - firs t ou t registe r Th e lowes t byt e i s transferre d fro m th e firs t i n - firs t ou t t o memor y outpu t Q wit h th e risin g edg e a t "CE" . I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-2 3 FIFO W Functio n Block s Firs t I n - Firs t Ou t Wor d Synta x Trut h tabl e Descriptio n Call-up : FIFO W < Bloc k No . > - < Registe r lengt h > - R - R onl y i f retentiv e operatio n i s required . A s operand : FIFO W < Bloc k No . >u < Input/outpu t > Registe r length : Optiona l 1 ...12 8 Performanc e time : 26 5 |.t s Representatio n I L FIFO W 57-60- R [ [ [ [ W [ [ [ W CF : CE : R : I : F : E : Q : Fil l puls e Rea d ou t puls e Rese t Dat a inpu t Registe r ful l Registe r empt y Dat a outpu t Input/outpu t Typ e Functio n Fil l Rea d ou t Rese t C F Bi t _ r 0 X C E Bi t 0 _ r X R Bi t 0 0 1 I Wor d valu e X X Q Wor d X valu e 0 Wit h a risin g edg e a t th e "CF " input , an y valu e a t th e "I " inpu t i s entere d a t th e beginnin g o f th e FIFO . A risin g edg e a t th e "CE " inpu t copie s th e firs t valu e int o th e outpu t Q an d al l th e value s i n th e registe r ar e shifte d forwar d one step . Th e output s "E " an d "F " us e a Hig h signa l t o indicat e i f th e FIF O memor y i s eithe r empt y o r full . Th e FIF O memor y i s rese t int o th e initia l stat e an d delete d whe n th e R-inpu t i s High . 6-2 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Firs t I n - Firs t Ou t FIFO W Wor d Example s Q 7 6 5 4 3 2 _ X 0019 7 0255511836 7 0002 3 1365 7 •*— 1 0 C E Q X C E 7 6 5 4 0019 7 0255 5 1836 7 0002 3 3 2 1 0 C F I 1365 7 C F Firs t i n - firs t ou t registe r A n inpu t wor d i s take n fro m I t o th e topmos t fre e locatio n whe n th e risin g edg e i s a t "CF" . Q 00197 - 7 0255 5 6 1836 7 5 0002 3 4 1365 7 3 2 1 0 C E Q X C E 7 0019 7 6 0255 5 5 1836 7 4 0002 3 3 1365 7 2 1 0 C F I X C F Firs t i n - firs t ou t registe r Th e lowes t wor d i s transferre d fro m th e firs t i n - firs t ou t t o th e memor y outpu t Q whe n th e risin g edg e i s a t "CE" . I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-2 5 IC P Functio n Block s Bloc k Compariso n Byt e Synta x Call-up : IC P < Bloc k No . > - R - R i f retentiv e operatio n i s required . A s operand : IC P < Bloc k No . >u < Input/outpu t > Numbe r o f elements : 1...25 5 Performanc e time : Th e performanc e tim e o f thi s functio n bloc k heavil y depend s o n th e typ e o f sourc e an d destinatio n operand s involved . Standar d values : MOD0:(24 4 + 7xn ) u s MO D 1 : (26 4 + 2 0 x n ) u s n = numbe r o f element s Representatio n I L IC P 5 [ ] MOD : [& ] SADR : [& ] DADR : [B ] NO : [ ] GT : [ ] EQ : [ ] LT : [B ] Q : [B ] ERR : Note ! A detaile d descriptio n o f th e functio n bloc k "ICP " i s give n i n Chapte r 8 , Addressing . Indirec t 6-2 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s IC P Bloc k Compariso n Byt e Descriptio n Inputs : MO D Operatin g mod e = 1 Compar e dat a field s = 2 Searc h fo r dat a valu e SAD R Sourc e addres s Star t addres s o f th e sourc e dat a bloc k fro m whic h th e compariso n i s t o b e mad e DAD R Destinatio n addres s Destinatio n addres s fro m whic h th e compariso n i s t o b e mad e N O Numbe r o f element s 1-25 5 t o b e compare d (dependin g o n dat a typ e O f SADR/DADR ) Outputs : Note : Comparison s ar e no t signe d G T Greate r tha n = 1 Dat a valu e i n SAD R > dat a valu e i n DAD R E Q Equa l = 1 Dat a value s ar e identica l L T Les s tha n = 1 Dat a valu e i n SAD R < dat a valu e i n DAD R Q Outpu t indicate s th e relativ e offse t addres s o f th e unequa l valu e (comparison ) o r o f th e foun d dat a valu e (dat a valu e search) . Th e offse t i s determine d fro m th e beginnin g o f th e bloc k (DADR ) an d i s dependen t o n th e dat a typ e i n DADR . Th e calculatio n o f th e offse t i s restricte d t o th e followin g limits : 0 < Q < NO . ER R = 0 Dat a limit s ar e permissibl e = 1 N O i s 0 = 2 SAD R ha s no t bee n define d = 3 DAD R ha s no t bee n define d = 4 SAD R i s th e sam e a s DAD R Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-2 7 IC P Functio n Block s Bloc k Compariso n Byt e Descriptio n Th e functio n bloc k ha s a dat a searc h o r bloc k compar e mode . Th e codin g o n th e MO D inpu t determine s whethe r a compariso n o r a dat a valu e searc h i s t o b e carrie d out . Searc h mod e Searc h mod e i s use d t o searc h fo r a particula r valu e i n a dat a block . Th e compare d valu e i s locate d a t addres s SAD R (sourc e address) . Th e star t o f th e dat a bloc k t o b e examine d i s specifie d b y DAD R (dat a address) . Th e addres s i s prefixe d b y th e addres s operato r "&" . I f th e valu e define d unde r SAD R i s foun d withi n th e N O element s startin g fro m th e DAD R address , th e locatio n i s indicate d vi a outpu t Q an d th e outpu t E Q i s se t (=1) . Th e followin g applie s whe n a characte r i s found : Q = 0...NO-1 ; E Q = 1;LT=G T = 0 ; I f th e dat a valu e i s no t foun d i n th e block , th e outpu t Q i s equa l t o NO . Th e E Q outpu t i s se t t o 0 an d th e output s L T an d G T ar e se t accordin g t o th e las t comparison . Th e followin g applie s whe n a characte r i s no t found : Q = NO ; E Q = 0 ; LT , G T accordin g t o th e las t compariso n I n th e followin g exampl e th e valu e 7 D i n M B 2 3 i s searche d fo r i n th e marke r fiel d fro m M B 2 7 t o M B 32 . Functio n bloc k ICP O Marke r field : [ ] l& l M I I [ti l [B ] Resul t Q = 3 L T = 0 E Q = 1 L T = 0 MOD : K O SADR:&M B 2 3 DADR:&M B 2 7 NO : KB 6 GT : EQ : IT : 0 : ERR : M B 2 3 M B 2 4 M B 1 3 M B 2 6 M B 2 7 M B 2 8 M B 2 9 M B 3 0 M B 3 1 M B 3 2 M B 3 3 M B 3 4 7! ) 0 0 0 0 0 0 3 D 7 D 4 D 7 D 7 D 7 0 0 0 0 0 Searc h Found : therefor e searc h routin e aborte d Th e dat a valu e 7 D wa s foun d a t th e addres s DAD R + Q (here : MB2 7 + 3 ) an d th e searc h wa s terminated . 6-2 8 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s Bloc k Compariso n IC P Byt e Compar e mod e Th e bloc k compar e mod e i s use d t o compar e tw o dat a block s wit h eac h other . Th e star t o f bot h block s i s define d b y SAD R an d DADR . Th e siz e o f th e bloc k i s specifie d b y th e numbe r o f element s NO . I f bot h dat a block s ar e foun d t o b e equal , th e Q outpu t equal s N O an d th e E Q outpu t i s se t t o 1 . Th e followin g applie s whe n th e compare d dat a block s ar e equal : Q = NO ; E Q = 1;L T = G T = 0 ; I f th e compare d dat a block s ar e no t equal , outpu t Q indicate s th e locatio n o f th e unequa l data . Th e E Q outpu t i s se t t o 0 an d th e L T an d G T outpu t ar e se t accordin g t o th e resul t o f th e compariso n (eithe r 1 o r 0) . Th e followin g applie s whe n th e compare d dat a block s ar e no t equal : Q = 0...NO-1 ; E Q = 0 ; LT , G T dependin g o n th e resul t o f th e las t comparison . I n th e followin g exampl e th e marke r fiel d fro m M B 2 3 t o M B 2 6 i s compare d wit h th e marke r fiel d fro m M B 3 0 t o M B 33 . CP O MOD : K 1 SADR:&M B 2 3 DADR:&M B 3 0 NO : KB 4 GT : E0 : LT : Q : FRR : Resul t G T = 0 E Q = 1 L T = 0 Q = 4 Marke r field : M B 2 3 M B 2 4 M B 2 5 M B 2 6 M B 2 7 M B 2 8 M B 2 9 M B 3 0 M B 3 1 M B 3 2 M B 3 3 M B 3 4 7 D 3 B 6 4 A 6 0 0 0 0 0 0 7 D 3 B 6 4 A 6 0 0 — + ™ « ^ Th e tw o dat a block s ar e identical . Thi s i s indicate d b y E Q = 1 an d Q = N O (ru n completed) . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-2 9 ICP Y Functio n Block s Bloc k Transfe r Indirec t Cop y Byt e Synta x Cal l up : ICP Y < Bloc k No . > - R - R , i f retentiv e operatio n i s required . A s operand : ICP Y < Bloc k No . >u < Input/outpu t > Numbe r o f elements : 1...25 5 Performanc e time : Th e executio n tim e o f thi s functio n bloc k heavil y depend s o n th e typ e o f sourc e an d destinatio n operand s involved . Standar d values : MODO : (35 5 +2 5 x n ) \is MO D 1 : (355 + 1 0 x n ) [us n = Numbe r o f element s Representatio n I L ICP Y 6 3 [ ] MOD : [& ] SADR : [& ] DADR : [B ] NO : [B ] ERR : Note ! A detaile d descriptio n o f th e functio n bloc k "ICPY " bloc k transfe r i s give n i n Chapte r 8 , Indirec t Addressing . 6-3 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Bloc k Transfe r Indirec t Cop y ICP Y Byt e Descriptio n Inputs : MO D SAD R DAD R N O Outputs : ER R Initialize/Cop y mod e = 1 Cop y dat a field s = 2 Initializ e dat a field s Sourc e addres s o f sourc e dat a bloc k fro m whic h th e transfe r i s t o begi n Destinatio n addres s Destinatio n addres s t o whic h th e sourc e dat a i s t o b e transferre d o r fro m wher e initializin g i s t o begi n Numbe r o f element s t o b e transferre d 1-25 5 (dependin g o n dat a typ e SADR/DADR ) 0 Dat a limit s ar e permissibl e 1 NOis O 2 SAD R ha s no t bee n define d 3 DAD R ha s no t bee n define d 4 SAD R i s th e sam e a s DAD R Th e ICP Y functio n bloc k support s th e transfe r o f dat a block s withi n th e system . A transfe r i s alway s mad e fro m a "source " t o a "destination" . Marker s M , communication s dat a RD/S D an d th e addres s input s o f othe r functio n block s ar e permitte d a s operand s fo r th e addres s operato r "&" . Th e functio n bloc k ca n b e use d i n th e cop y mod e an d th e initializ e mod e whic h ar e selecte d b y settin g a 1 o r a 0 a t th e MO D inpu t ( 1 o r 0) . Th e differentiatio n betwee n addres s an d dat a i s importan t wit h thi s functio n block . Wit h typica l operation s suc h a s L M 2.2 , i t i s alway s th e dat a tha t i s stored , i n thi s cas e i n th e marke r cell , whic h i s accessed . I n th e cas e o f th e bloc k transfer , th e sourc e addres s SAD R fro m whic h th e copyin g i s t o b e mad e an d th e destinatio n addres s DAD R mus t b e specified . Th e addres s operato r "& " mus t b e use d here . Thi s signifie s tha t th e operan d behin d i t i s a n addres s an d no t a dat a value . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-3 1 ICP Y Functio n Block s Bloc k Transfe r Indirec t Cop y Byt e Cop y mod e Th e numbe r o f dat a cell s specifie d b y th e N O valu e ar e copie d fro m th e sourc e addres s specifie d b y SAD R t o th e destinatio n addres s specifie d b y DADR . I n th e followin g exampl e th e dat a fro m th e marke r field s M B 2 3 t o M B 2 6 i s copie d t o marke r fiel d M B 3 0 t o M B 33 . I L ICP Y 0 I ] MOD : K 1 [& ] SADR:&M B 2 3 [& ] DADR:&M B 3 0 [B ] NO : KB 4 [B ] ERR : Marke r field : M B 2 3 M B 2 4 M B 2 5 M B 2 6 M B 2 7 M B 2 8 M B 2 9 M B 3 0 M B 3 1 M B 3 2 M B 3 3 M B 3 4 ?0 3 B 6 4 A 6 0 0 0 0 0 0 7 D 3 B 6 4 A 6 0 0 Exampl e o f th e cop y mod e o f th e ICP Y functio n bloc k 6-3 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Reloa d Dat a RDA T Exampl e RDA T 1 2 I & f W I B I B S : DADR : SGNO : LEN : ERR : I 0. 3 &MB2 3 KW 5 K B 12 7 M B 1 2 I f I 0.0.0.0. 3 change s t o 1 , th e dat a store d i n th e memor y modul e o n segmen t numbe r 5 i s rewritte n t o th e marke r rang e startin g fro m th e addres s M B 23 . Error s ar e save d i n marke r byt e 12 . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-3 9 SC K Functio n Block s Se t Real-Tim e Cloc k Se t Cloc k Synta x Call-up : SC K < Bloc k No . > Executio n time : 79 0 u s Representatio n Descriptio n Erro r message s I L SCK O [ ] S : [& ] SADR : [B ] ERR : Se t Dat a addres s (indirect ) Erro r byt e I f th e inpu t S change s t o 1 , th e cloc k i s se t agai n wit h th e value s state d unde r SADR . Th e cloc k settin g informatio n i s state d indirectl y vi a th e SAD R addres s operand . Th e lengt h o f th e bloc k mus t no t b e state d sinc e a standar d 7 byte s (year , month , day , wee k day , hour , minute , second ) ar e transferred . Thi s mean s tha t th e cloc k wil l onl y functio n i f al l cloc k parameter s ar e defined . Th e SC K functio n bloc k i s designe d fo r programmin g wit h indirec t addressing . Se e Chapte r 8 , Indirec t Addressing . Th e ER R outpu t contain s th e cod e o f possibl e errors : 1 = SAD R parameter s incorrectl y se t 2 = Incorrec t yea r state d (0-99 ) 3 = Incorrec t mont h state d (1-12 ) 4 = Incorrec t da y state d (1-31 ) 5 = Incorrec t wee k da y state d (0-6 , 0 = Sunday ) 6 = Incorrec t hou r state d (0-23 ) 7 = Incorrec t minut e state d (0-59 ) 8 = Incorrec t secon d state d (0-59 ) 6-4 0 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s SC K Se t Real-Tim e Cloc k Se t Cloc k Exampl e 0000 0 BL0CK 1 "Defin e ne w parameter s fo r th e SCK O functio n 00 1 "bloc k t o se t th e real-tim e clock . 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 01 3 01 4 01 5 01 6 01 7 01 8 01 9 02 0 02 1 02 2 02 3 02 4 0000 1 BL0CK 2 "Se t real-tim e cloc k wit h SC K 0 functio n bloc k 00 1 00 2 00 3 00 4 SCK O 00 5 [ ] S:M0. 0 Se t SCK O 00 6 [& ] SADR:&MB1 0 00 7 [b ] ERR:MB2 0 00 8 0000 2 EN D "En d o f progra m 00 1 00 2 E P LKB9 4 = MB1 0 LKB 3 = MB1 1 L K B 27 = MB1 2 LKB 0 = MB1 3 LKB 3 = MB1 4 LKB 0 = MB1 5 LKB 0 = MB1 6 Yea r (19)9 4 Month : Marc h Day : 27 . Weekday : (Sunday ) Hour : 3 Minute : 0 Second : 0 Thi s exampl e show s ho w a marke r rang e i s define d wit h th e require d dat a fo r settin g th e real-tim e cloc k an d ho w th e cloc k i s se t wit h th e SCK O functio n block . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-4 1 SDA T Functio n Block s Sav e Dat a Synta x Representatio n Call-up : SDA T < Bloc k No . > Executio n time : I L SDAT 1 [ ] S : [& ] SADR : [W ] SGNO : [B ] LEN : [B ] ERR : (33 0 + 2 5 x n ) |x s n = numbe r o f element s Se t inpu t Sourc e addres s (addres s operator ) Segmen t numbe r (0-511 ) Segmen t lengt h (1-128 ) Erro r outpu t Descriptio n An y dat a ca n b e save d i n th e memor y modul e o f th e P S 4 20 0 serie s i f thi s memor y modul e ha s 6 4 Kbyte s fo r th e cold-star t retentiv e range . Thi s memor y i s logicall y divide d int o 51 2 segment s o f 12 8 byte s each . Th e dat a ca n b e reloade d t o th e dat a rang e concerne d vi a th e RDA T functio n block . Anothe r importan t applicatio n fo r th e RDA T an d SDA T functio n block s i s th e require d savin g o f th e retentiv e marke r rang e (wit h col d start ) befor e modifyin g th e devic e configuration . Yo u wil l fin d furthe r informatio n i n Chapte r 1 , Syste m Parameters . Th e SDA T functio n bloc k i s designe d fo r programmin g wit h indirec t addressing . Se e Chapte r 8 , Indirec t Addressing . Erro r message s Th e ER R outpu t contain s th e cod e o f possibl e errors : 1 2 3 4 5 6 n o memor y modul e presen t acces s no t possibl e du e t o onlin e connectio n acces s no t possibl e du e t o simultaneou s us e o f RDA T SGN O i s greate r tha n 51 1 LE N i s greate r tha n 12 8 SAD R parameter s incorrectl y se t 6-4 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Sav e Dat a SDA T Exampl e SDA T 1 2 [ & f W f B [ B S : SADR : SGNO : LEN : ERR : I 0. 3 &MB2 3 KW 5 K B 12 7 M B 1 2 I f I 0. 3 change s t o 1 , th e dat a store d i n th e memor y modul e o n segmen t numbe r 5 i s rewritte n t o th e marke r rang e startin g fro m th e M B 2 3 address . Error s ar e save d i n marke r byt e 12 . I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-4 3 S K Functio n Block s Sequentia l Contro l Functio n Bloc k Synta x Descriptio n Call-up : S K < Bloc k No . > - < Numbe r o f step s > - R - R onl y i f retentiv e operatio n i s required . A s operand : S K < Bloc k No . Ste p numbe r Nestin g depth : Executin g time : io n I L S K 3-1 4 [ B [ B [ B [ S [ $ [ $ [ S S : R : SINO : ERR : SQNO : TG : INIT : AC1 : AC2 : AC3 : > < Input/outpu t > 1...9 9 8 wit h SE T = RESE T = wit h RESE T = 1 wit h SE T = 1 wit h invali d SIN O Se t Rese t Ste p inpu t numbe r Erro r outpu t Ste p numbe r displa y Ste p chang e indicatio n Ste p call-u p afte r rese t Ste p 1 (actio n progra m 1 ) Ste p 2 (actio n progra m 2 ) Ste p 3 (actio n progra m 3 ) • 0 approx . approx . approx . approx . 130u. s 24 0 n s 25 0 [is 15 0 u. s [ S ] AC14 : Ste p 1 4 (actio n progra m 14 ) Note : Refe r t o Chapte r 7 fo r a detaile d descriptio n o f th e sequentia l contro l functio n block . Th e sequentia l contro l functio n bloc k enable s th e use r progra m t o b e structure d simpl y an d clearly . Eac h S K functio n bloc k ca n contro l u p t o 9 9 steps . Eac h ste p ca n itsel f activat e othe r sequences , allowin g a nestin g dept h o f 8 . Th e individua l step s ar e forme d b y mean s o f subprogram s whic h contai n th e action s t o b e executed . Th e logica l structur e o f th e ste p sequenc e contro l ca n therefor e b e incorporate d directl y i n th e use r progra m vi a th e functio n block . 6-4 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s S K Sequentia l Contro l Functio n Bloc k Th e input s an d output s o f th e functio n bloc k hav e th e followin g meaning : S Se t Activat e th e sequentia l contro l functio n bloc k R Rese t Thi s reset s th e functio n bloc k an d th e initialisatio n progra m i s activate d vi a th e INI T input . SIN O Ste p Inpu t Numbe r Th e numbe r o f th e curren t ste p i s assigne d t o thi s input . ER R Erro r Displa y o f fault y conditions . Erro r number : Binary : 0000000 1 o r decimal : 1 Binary : 0000001 0 o r decimal : 2 Binary : 0000010 0 o r decimal : 4 Caus e o r error : Th e SIN O inpu t show s th e valu e 0 (S=1 ) Ste p numbe r exceed s th e maximu m possibl e ste p numbe r N o subprogra m o n selecte d A C outpu t Erro r behaviour : Th e functio n bloc k i s passive . N o ste p i s processed . Erro r outpu t i s set . Th e functio n bloc k remain s i n it s curren t status . Erro r outpu t i s set . Th e selecte d ste p i s transferred . Nothin g i s processe d sinc e ther e i s n o actio n progra m present . SQN O Ste p Outpu t Numbe r Th e SQN O outpu t indicate s th e numbe r o f th e ste p currentl y bein g processed . T G Toggl e output s Th e T G outpu t indicate s th e transitio n t o a ne w step . I n norma l operatio n thi s outpu t i s High , onl y i n th e firs t cycl e i s i t Lo w afte r a change . INI T Initialisatio n Nam e o f th e initialisatio n subprogra m whic h run s o n activatio n o f a reset . Example : "$INIT " AC . Actio n Nam e o f th e curren t ste p subprogram . Example : "$STEP1 " Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-4 5 S R Functio n Block s Shif t Registe r Bi t Synta x Call-up : S R < Bloc k No . > - < Registe r lengt h > - R - R onl y i f retentiv e operatio n i s required . A s operand : S R < Bloc k No . >u < Input/outpu t > Registe r length : Optiona l 1...12 8 Performanc e time : typ. : 14 8 u. s + (n-1 ) x 2 0 (i s n = registe r lengt h Representatio n I L S R 54-13- R [ ] [ ] [ ] [ ] [ ] [ ] [ ] U : D : R : IU : ID : QO : Q12 : Puls e inpu t forwar d Puls e inpu t revers e Rese t Dat a inpu t forwar d Dat a inpu t revers e Outpu t 0 Q (n-1 ) Las t outpu t t — Registe r lengt h Trut h tabl e Input s Typ e Functio n Shift , forwar d Shift , revers e Delet e U Bi t _ r 0 X D Bi t 0 _ r X R Bi t 0 0 1 I U Bi t Valu e X X I D Bi t X Valu e X 6-4 6 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s Shif t Registe r S R Bi t Descriptio n Whe n th e risin g edg e i s a t th e "U " input , th e valu e o f th e "IU " inpu t i s entere d i n th e firs t registe r fiel d afte r al l othe r registe r field s hav e bee n shifte d i n th e positiv e directio n b y on e step . D I D X D I D X 7 1 7 1 6 1 6 0 5 0 5 0 4 0 4 1 3 1 •4 3 1 2 1 1 0 0 1 Shif t directio n 2 0 1 1 0 1 « u I U 1 u I U Bi t shif t registe r eigh t step s long ; on e forwar d puls e an d acceptanc e o f a n inpu t bi t fro m IU . A risin g edg e a t th e D inpu t cause s th e entr y o f th e "ID " valu e int o th e las t registe r fiel d afte r th e content s o f al l othe r register s field s hav e bee n shifte d i n th e negativ e directio n b y on e step . D I D 0 D I D 7 1 6 0 5 0 Shif t directio n 7 0 6 1 5 0 4 1 • 4 0 3 1 3 1 2 0 2 1 1 0 1 0 0 1 0 1 u I U X u I U X Bi t shif t registe r eigh t step s long ; on e revers e puls e an d acceptanc e o f a bi t fro m I D int o th e las t registe r field . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-4 7 S R Functio n Block s Shif t Registe r Bi t Descriptio n Th e content s o f al l registe r field s ar e externall y displaye d vi a th e Q outputs . Whe n th e "R " inpu t i s High , th e shif t registe r i s rese t t o th e initia l state , an d al l th e registe r field s ar e cleared . I f ther e i s a risin g edg e a t U an d D simultaneously , a forwar d shif t i s performe d firs t befor e a revers e shift . Th e registe r lengt h i s restricte d t o 12 8 registe r fields . Severa l shif t register s ca n b e linke d togethe r i f mor e tha n 12 8 shif t step s ar e required . Exampl e S R 14- 8 U : D : R : IU : ID : 0 0 0 1 0 2 0 3 0 4 0 b 0 6 0 7 S R U : D : R : IU : ID : 0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 / 10. 1 I 0. 2 I 0. 3 I 0. 4 SR15Q 0 : = M 100. 0 : = M 100. 1 : = M 100. 2 : = M 100. 3 : = M 100. 4 : = M 100. 5 : = M 100. 6 : = M 100. 7 15- 8 10. 1 I 0. 2 I 0. 3 S R 1 4 Q 7 = M 101. 0 = M 101. 1 = M 101. 2 = M 101. 3 = M 101. 4 = M 101. 5 = M 101. 6 = M 101. 7 Puls e forwar d Puls e revers e Rese t Dat a inpu t forwar d Dat a inpu t revers e Shif t registe r outpu t Shif t registe r outpu t Puls e forwar d Puls e revers e Rese t Dat a inpu t Shif t registe r outpu t • Shif t registe r outpu t 6-4 8 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s TALAR M Tim e Alar m Functio n Bloc k Time r Alar m Th e ER R outpu t contain s th e cod e o f errors : 0 = n o erro r 1 = SOL L = 0 2 = V T les s tha n 51 2 3 = MO D ma y onl y b e 1 o r 2 Th e A C inpu t allow s a n event-drive n progra m t o b e implemented . Fo r thi s i t i s necessar y t o defin e th e addres s ( $ name ) o f th e subprogra m tha t i s t o b e execute d whe n reachin g th e event . I f n o addres s i s stated , onl y th e CN T counte r i s incremented . Th e followin g point s mus t b e observe d fo r th e event - drive n program : - Afte r th e even t ha s occurred , th e use r progra m i s interrupted , th e registe r statu s i s save d an d th e subprogra m state d unde r th e A C addres s i s executed . Th e alar m functio n bloc k canno t b e interrupte d b y othe r alar m functio n block s (al l alar m functio n block s hav e th e sam e priority) . - Th e max . executio n tim e o f alar m functio n block s i s restricte d b y th e use r progra m t o 5 m s (approx . 1 K I L instructions ) sinc e th e alar m functio n block s canno t b e interrupte d eve n b y th e operatin g syste m i n th e even t o f a voltag e drop . I f th e executio n tim e i s exceeded , a n ED C erro r ma y occu r whe n switchin g of f th e powe r supply . - Th e executio n tim e o f th e alar m functio n bloc k i s adde d t o th e executio n tim e o f th e cyclica l use r progra m an d als o monitore d b y th e cycl e tim e monitorin g function . - Sinc e th e event-drive n progra m processin g enable s acces s t o th e entir e imag e register , acces s t o dat a tha t i s use d b y th e event-controlle d an d cyclica l use r progra m mus t b e disabled . Bi t accesse s ma y no t occu r o n th e sam e byt e i n th e cyclica l use r progra m an d i n th e Alar m functio n block . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-5 5 TALAR M Functio n Block s Tim e Alar m Functio n Bloc k Time r Alar m Descriptio n - Sinc e a n Alar m functio n bloc k requires , du e t o it s fas t reaction , a high-spee d periphera l acces s (direc t output) , th e QB , QP B periphera l operand s availabl e i n th e basi c uni t shoul d b e used . - A n alar m functio n bloc k ca n b e use d severa l time s (multipl e instantiation ) althoug h thi s shoul d normall y b e avoide d sinc e eac h functio n bloc k grou p ha s th e sam e even t sourc e (hardwar e inpu t I 0.0.0.0.0 ) an d onl y th e las t functio n bloc k instanc e i n th e progra m i s valid . - B y multipl e instantiatio n i s mean t th e reservatio n o f severa l dat a range s fo r eac h paramete r se t o f a particula r functio n bloc k type . 6-5 6 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s TALAR M Tim e Alar m Functio n Bloc k Time r Alar m Exampl e Th e followin g exampl e show s th e call-u p o f th e time r alar m functio n bloc k a s a signa l generato r (MO D = 2) . Th e time/signa l lengt h i s 1 m s (V T = 1000) . Th e outpu t o n Q 0. 0 i s show n belo w ( a tota l o f 5 0 signal s ar e output) : QO. O 1 m s 1 m s 1 m s Printou t o f th e c:tala.q4 2 fil e Dated : 7 . 4 . 9 4 0000 0 00 1 00 2 00 3 0000 1 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 0000 2 00 1 00 2 BLOCK 0 "Incorporat e configuratio n fil e #includ e "config.k42 " BL0CK 1 "Call-u p th e time r alar m functio n bloc k TALARM 0 [ ] EN : I 0. 3 Se t functio n bloc k [b ] MOD : K B 2 [w ] VT:KW100 0 [w ] SOU : K W 10 0 [b ] ERR:MB2 5 [w ] CNT:MW1 2 [$ ] AC : EN D "En d o f progra m E P Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-5 7 T F Functio n Block s Off-delaye d Time r Synta x * Representatio n Call-up : T F < Bloc k No . > - R - R onl y i f retentiv e operatio n i s required . A s operand : T F < Bloc k No . Tim e ranges : > Performanc e time : Basi c time : I L T F 7-ms- R [ ] S : [ ] R : [ ] STOP : [W ] 1 : [ ] EQ : [W ] Q : < Input/outpu t > 1...6 5 53 5 m s 10...6553 5 m s 30 0 ^ s - m s millisecond s - s fo r second s Star t an d se t Rese t Interruptio n fo r time r Se t tim e valu e Contro l outpu t Actua l tim e valu e Descriptio n ( D S__j— i STO P EQr - (2 ) (3 ) (4 ) (5 ) W Wit h th e risin g edg e o f "S " th e dela y facto r a t "I " i s accepte d an d th e "EQ " outpu t i s se t High . I f th e "S " inpu t i s Low , th e "EQ " outpu t follows , delaye d b y th e tim e "T " (1) . T = dela y facto r x tim e bas e 6-5 8 4/94AWB27-1186-G B Klockner-Moelle r Functio n Block s Off-delaye d Time r T F Th e se t tim e shoul d alway s b e greate r tha n th e cycl e tim e t o ensur e tha t th e dela y i s alway s detected . Th e outpu t "Q " show s th e tim e elapse d i n unit s o f th e selecte d tim e base . Th e tim e coun t ca n b e interrupte d vi a a n "H " signa l a t th e "STOP " input ; i.e . th e dela y tim e "T " i s extende d b y th e tim e fo r whic h th e "STOP " inpu t i s Hig h (2) , (3) . Th e E Q outpu t onl y follow s th e S outpu t i f th e STO P inpu t i s Lo w (4) , (5) , whe n th e se t inpu t i s High . Th e time r i s rese t int o th e initia l stat e i f th e "R " inpu t i s High . Exampl e Th e time r 5 6 i s t o indicat e th e dropping-ou t o f inpu t 10. 2 - delaye d b y th e tim e constan t T = 5 0 00 0 - t o th e outpu t Q 0. 3 I n orde r t o ente r value s greate r tha n 3 2 767 , calculat e th e correspondin g HE X o r signe d value . I t shoul d b e possibl e t o sto p th e measuremen t o f th e dela y tim e vi a I 0. 3 i f ther e i s a n externa l event . Th e elapse d tim e i s indicate d vi a th e marke r wor d M W 10 . Th e dela y tim e i n progres s mus t b e continue d eve n afte r a powe r loss , o r afte r switchin g of f th e syste m an d subsequen t restarting . Th e time r therefor e ha s t o b e retentive . Th e program : Optio n T F 56-S- l S : R : STOP : I : EQ : 0 : 1 1 10. 2 10. 3 KW- 1 Q0. 3 MW1 0 Optio n T F 56-S- l S : R : STO P I : EQ : Q : 2 1 10. 2 10. 3 KH W C35 0 Q0. 3 MW1 0 Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-5 9 TGE N Functio n Block s Generato r Functio n Bloc k Synta x Call-up : TGE N < Bloc k No . > A s operand : TGE N < Bloc k No . >u < Input/outpu t > Cycl e time : 2 x 1 ... 2 x 6553 5 m s Performanc e time : 5 0 \iS Tim e base : ms , n o specificatio n require d Representatio n I L TGE N 6 3 [ ] S : [W ] I : [ ] P : Star t an d se t Perio d T Puls e outpu t Descriptio n Whe n th e "S " inpu t i s High , th e perio d i n milliseconds , a t th e "I " input , i s transferred . Th e "P " outpu t generate s pulse s wit h a pulse/paus e rati o o f 1: 1 fo r a s lon g a s th e "S " inpu t carrie s a "H " signal . Th e tim e perio d shoul d alway s b e a t leas t twic e th e cycl e tim e s o tha t th e Hig h an d Lo w signal s ca n b e recognize d clearly . I f th e tim e perio d a t th e "I " inpu t i s changed , a risin g edg e mus t b e generate d a t th e "S " inpu t i n orde r tha t th e ne w valu e ca n b e accepted . 6-6 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s Puls e Transmitte r T P Synta x Call-up : TP<Bloc k No.>- R - R onl y i f retentiv e operatio n i s required . A s operand : T P < Bloc k No . >u < Input/outpu t > Tim e range : 1 ...6553 5 m s Performanc e time : 30 0 \is Basi c time : ms , n o specificatio n require d Representatio n I L TP5- R [W ] [ ] [W ] S : R : I : P : 0 : Star t an d se t Rese t Puls e tim e Puls e outpu t T Actua l tim e valu e < T Descriptio n Whe n th e risin g edg e i s a t th e "S " input , th e "P " output - i s se t High , an d th e puls e tim e a t th e "I " inpu t (alway s h V milliseconds ) i s transmitted . Irrespectiv e o f th e statu s o f th e "S " inpu t th e "P " outpu t remain s Hig h fo r th e duratio n o f th e pulse , an d the n goe s bac k t o Low . Th e se t tim e shoul d alway s b e greate r tha n th e cycl e tim e s o tha t th e puls e ca n b e recognize d clearly . Th e Q outpu t indicate s th e runnin g tim e i n milliseconds . Th e time r ca n b e rese t t o th e initia l stat e wit h a Hig h signa l a t th e "R " input . Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-6 1 T R Functio n Block s On-Delaye d Time r Synta x Call-up : T R < Bloc k No . > - R - R onl y wit h retentiv e operation . A s operand : T R < Bloc k No . >u < Input/outpu t > Tim e ranges : 1...6 5 53 5 m s 1...6 5 53 5 s Performanc e time : 30 0 \is Basi c time : - m s fo r millisecond s - s fo r second s Representatio n I L T R 7-s- R [ ] S : [ ] R : [ ] STOP : [W ] I : [ ] EQ : [W ] Q : Star t un d se t Rese t Interruptio n o f time r Se t tim e valu e Contro l outpu t Actua l tim e valu e Descriptio n (1 ) S _ j L _ R STO P E Q : J w : n i T i (2 ) i I I ! : n I : T STO P | | ' T+TSTOP : (3 ) I I I I (4 ) I— I c (5 ) I I J L _ : : i n ; T : Th e dela y facto r a t "I " i s accepte d wit h th e risin g edg e a t th e "S " inpu t an d th e "EQ " outpu t i s se t t o th e "H " level , delaye d b y th e tim e "T " T = dela y facto r x tim e bas e Th e se t tim e shoul d alway s b e greate r tha n th e cycl e tim e t o ensur e tha t th e dela y i s alway s detected . Th e outpu t "Q " indicate s th e tim e elapse d i n unit s o f th e selecte d tim e base . 6-6 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Functio n Block s T R On-Delaye d Time r Th e tim e coun t ca n b e interrupte d b y settin g th e "STOP " inpu t High ; i.e . th e dela y tim e "T " i s extende d b y th e tim e fo r whic h th e "STOP " inpu t i s Hig h (2) . Th e STO P inpu t shoul d onl y b e se t i n th e tim e betwee n th e settin g o f th e S inpu t an d tha t o f th e E Q output . I f th e STO P inpu t i s alread y Hig h whe n th e S inpu t i s rese t (3 ) o r se t (4) , th e E Q outpu t wil l respon d a s show n i n th e signa l diagram . Th e time r ca n b e rese t t o th e initia l stat e wit h a "H " signa l a t th e R input . I f th e R inpu t i s se t fro m 0 t o 1 whil e th e S inpu t i s High , th e E Q outpu t wil l b e se t wit h a dela y (5) . Exampl e Afte r a tim e dela y o f T ms , th e time r 1 2 i s t o transmi t a signa l receive d fro m I 0. 3 t o th e Q 0.3 . Th e tim e T i s variabl e an d i s obtaine d b y addin g t o th e basi c tim e o f 20 0 m s (K W 200) , a tim e determine d b y th e process , whic h i s containe d i n M W 28 . Th e progra m 10. 3 S KW20 0 MW2 8 KW20 0 + MW2 8 I Q 0. 3 E Q X X X I 20 0 I 4 8 I 24 8 [ I -I — I I T T R 12-m s S : 10. 3 R : STOP : I : LKW20 0 AD D M W 2 8 EQ : Q0. 3 Q : ~L_ Xx X x i Xx X x i n = 24 8 m s I I l 20 0 I X 15 0 I X 35 0 I I I I I Inpu t signa l Constan t basi c tim e Variabl e tim e rati o Outpu t signa l X x X x r T = 35 0 m s i X X X Klockner-Moelle r 4/9 4 AW B 27-1186-G B 6-6 3 6-6 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Progra m Example s TR : Two-poin t Controlle r wit h Hysteresi s 0000 5 00 1 00 2 00 3 00 4 00 5 0000 6 00 1 00 2 00 3 00 4 00 5 0000 7 00 1 002 . 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 01 3 01 4 0000 8 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 0000 9 00 1 oo; : 00 3 BL0CK 5 BL0CK 6 BL0CK 7 BL0CK 8 BL0CK 9 "Rea d i n setpoin t valu e (0-1 0 volt ) vi a setpoin t potentiomete r P I r I "(0-102 3 increments ) LIAW 0 = MW10 4 Setpoin t valu e x(t ) Digita l setpoin t valu e w(t ) "Rea d i n actua l valu e (0-1 0 volt ) vi a analogu e inpu t "(0-102 3 increments ) LIAW 4 = MW10 6 Actua l valu e w(t ) Digita l actua l valu e x(t ) "+/ - sig n calculatio n an d calculatio n o f th e "syste m deviatio n xd(t ) LMW10 0 DI V K W 2 = MW10 8 LMW10 6 AD D MW10 8 = MW11 0 LMW10 4 SUBMW11 0 = MW11 2 Hysteresi s X u Auxiliar y marke r byt e 1 Digita l actua l valu e x(t ) Auxiliar y marke r byt e 1 Auxiliar y marke r 2 Digita l setpoin t valu e w(t ) Auxiliar y marke r byt e 2 Syste m deviatio n a t t = xd(t ) "Two-poin t controlle r calculatio n LMW11 2 B C BL0CK 9 LK 0 = M0. 1 JPBLOCK1 0 " LK 1 = M0. 1 Syste m deviatio n a t t = xd(t ) Auxiliar y marke r 1 Auxiliar y marke r 1 9-2 8 4/94AWB27-1186-G B Klockner-Moelle r Progra m Example s TR : Two-poin t Controlle r wit h Hysteresi s 0001 0 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 01 3 01 4 0001 1 00 1 00 2 00 3 00 4 0001 2 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 0001 3 00 1 00 2 BLOCK1 0 BL0CK1 1 BL0CK1 2 BL0CK1 3 "Compar e hysteresi s an d syste m deviatio n L KH W FFF F SUBMW11 2 AD D K W 1 = MW11 4 LMW10 0 CPMW11 4 BLTBL0CK1 1 LK 0 = M0. 2 JPBL0CK1 2 " LK 1 = M0. 2 " LM0. 2 A M 0. 1 SM0. 3 LM0. 2 A N M 0. 1 RM0. 3 LM0. 3 = N Q 0. 0 "En d o f progra m F P Syste m deviatio n a t t = xd(t ) Remainde r o f syste m deviatio n xd(t ) Hysteresi s X u Remainde r o f syste m deviatio n xd(t ) Auxiliar y marke r 2 Auxiliar y marke r 2 Auxiliar y marke r 2 Auxiliar y marke r 1 Auxiliar y marke r 3 Auxiliar y marke r 2 Auxiliar y marke r 1 Auxiliar y marke r 3 Auxiliar y marke r 3 Manipulate d variabl e "ON " o r "OFF " Klockner-Moelle r 4/9 4 AW B 27-1186-G B 9-2 9 Progra m Example s FALARM : Bottlin g Plan t A ligh t barrie r i s t o b e use d i n a bottlin g plan t fo r checkin g whethe r th e bottle s ar e fille d a s required . I f mor e tha n thre e bottle s ar e no t fille d correctly , th e moto r o f th e conveyo r bel t whic h transport s th e bottle s mus t b e stoppe d a s soo n a s possible . Th e conveyo r bel t ca n onl y b e stoppe d i f i t i s requeste d b y th e user . Thi s i s implerente d if , fo r example , th e inpu t I 0. 5 o f th e P S 4 20 0 serie s i s connecte d wit h a switc h whic h send s a Hig h signa l t o th e PLC . Printou t o f file : c:examplen.q4 2 Date : 6.4.9 4 0000 0 BL0CK 0 00 1 no; ' 00 3 0000 1 00 1 0000 2 BL0CK 2 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 01 2 01 3 01 4 01 5 01 6 0000 3 BL0CK 3 00 1 00 2 00 3 'Incorporat e configuratio n fil e #lnclude"examplen.k42 " BL0CK 1 "Star t o f progra m "Cal l FALARM 0 functio n bloc k i n orde r t o obtai n th e "messag e vi a th e alar m inpu t 10. 1 whethe r th e bottle s ar e "fille d correctly . "Th e positiv e edg e o f th e alar m inpu t I 0. 1 i s evaluated . Enabl e alar m functio n bloc k FALARM 0 [ ] EN : 10. 1 [ ] ACT : K 0 [w ] SOU : KW 4 [b ] ERR : [w ] CNT : [$ ] AC : SUP 0 "Wit h th e fourt h edg e o n th e alar m inpu t I 0. 1 th e SP 0 "subprogra m i s called . "En d o f mai n progra m E P 9-3 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Progra m Example s FAL7\RM : Bottlin g Plan t 0000 4 $UP 0 "Subprogra m i n orde r t o sto p th e conveyo r bel t i f requeste d 00 1 "b y th e user . 00 2 00 3 L I P 0. 5 Comman d sto p conveyo r bel t 00 4 = Q P 0. 4 Conveyo r bel t stop s 00 5 0000 5 BLOCK A "En d o f subprogra m 00 1 00 2 E M I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 9-3 1 9-3 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Progra m Example s CALARM : Encode r Th e signal s o f a positionin g devic e ar e t o b e counted . Th e tim e betwee n th e signal s i s shorte r tha n th e cycl e tim e o f th e P S 4 20 0 series . Th e divisio n rati o o n th e CALARM O functio n bloc k shoul d b e 5 0 s o tha t th e fee d rat e valu e i s 1/1 0 m m o n th e ALAR M counte r (CN T output ) o f th e functio n block . Printou t o f file : c:exampleo.q4 2 Date : 6.4.9 4 0000 0 00 1 00 2 00 3 0000 1 00 1 0000 2 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 0000 3 00 1 00 2 BLOCK 0 "Incorporat e configuratio n fil e #lnclude"exampleo.k4 2 BL0CK 1 "Star t o f progra m " BL0CK 2 "Cal l CALARM O functio n bloc k i n orde r t o coun t th e signal s "vi a th e I 0. 0 inpu t CALARM O [ ] EN : I 0. 6 [w ] VT : KW5 0 [w ] SOLL : KW 1 [b ] ERR : [w ] CNT : MW1 0 [$ ] AC : BL0CK 3 "En d o f progra m F P Se t functio n bloc k Fee d rat e valu e i n 1/1 0 m m , Klockner-Moelle r 4/9 4 AW B 27-1186-G B 9-3 3 Progra m Example s TALARM : Encode r 20 0 squar e wav e signal s ar e t o b e outpu t b y th e P S 4 20 0 serie s fo r a positionin g device . Th e signa l lengt h i s 1 m s an d th e pulse/paus e rati o i s 1 : 1 . 1 m s 1 m s h—-h—• ! 1 Figur e 9-13 : Signa l sequenc e fo r positionin g devic e Th e outpu t o f th e signal s i s starte d vi a th e digita l inpu t 1 0. 3 an d th e signal s ar e outpu t b y th e digita l outpu t Q0.0 . Printou t o f file : c:examplep.q4 2 Date : 11.4.9 4 0000 0 BL0CK 0 "Incorporat e configuratio n fil e 00 1 00 2 #lnclude"examplep.k42 " 00 3 0000 1 BL0CK 1 "Star t o f progra m 00 1 0000 2 BL0CK 2 "Fleetin g mak e contac t fo r se t conditio n an d 00 1 "rese t conditio n o f th e TALARM 0 functio n bloc k 00 2 00 3 L10. 3 Star t TALARM 0 00 4 A N M 3. 0 00 5 = M 3. 1 00 6 00 7 L10. 3 Star t TALARM 0 00 8 = M 3. 0 00 9 01 0 LM3. 1 01 1 S M 2. 0 Se t conditio n fo r TALARM 0 01 2 01 3 LMO. O 01 4 R M 2. 0 Se t conditio n fo r TALARM 0 01 5 9-3 4 4/9 4 AW B 27-1186-G B Klockner-Moelle r Progra m Example s TALARM : Encode r 0000 3 00 1 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 01 0 01 1 0000 4 00 1 00 2 BL0CK 3 BL0CK 4 "Cal l TALARM O i n orde r t o outpu t th e 20 0 signal s "( = 40 0 edges ) vi a th e digita l outpu t Q 0. 0 TALARM O [ ] EN : M2. 0 Se t conditio n fo r TALAR N [b ] MOD : K B 2 [w ] VT : KW100 0 [w ] SOLL : KW40 0 [b ] ERR : [w ] CNT : MW O [$ ] AC : "En d o f progra m E P I Klockner-Moelle r 4/9 4 AW B 27-1186-G B 9-3 5 Progra m Example s TALARM : Encode r wit h Dela y Wit h a positionin g devic e th e digita l outpu t Q 0. 3 o f th e P S 4 20 0 serie s shoul d b e se t 1. 5 m s afte r th e activatio n o f th e digita l inpu t I 0.3 . Th e outpu t Q 0. 3 i s rese t b y activatin g th e digita l inpu t I 0.0 . Th e input s I 0. 0 an d I 0. 3 mus t b e interlocked . I 0. 3 Q0. 3 1 0. 0 I - Figur e 9-14 : Signa l sequenc e positionin g wit h dela y Printou t o f file : c:exampleq.q4 2 Date : 12.4.9 4 0000 0 BLOCK O "Incorporat e configuratio n fil e 00 1 00 2 #lnclude"exampleq.k42 " 00 3 0000 1 BL0CK 1 "Star t o f progra m 00 1 0000 2 BL0CK 2 "Fleetin g mak e contac t an d se t conditio n o f th e 00 1 11(1 ? iiu' i 00 4 110 5 00 6 00 7 (ID H HI D 01 0 lll l 01 2 01 3 01 4 TALARM 0 functio n bl ( L I P 0. 3 A N I P 0. 0 A N M 3. 0 = M3. 1 L I P 0. 3 A N I P 0. 0 = M3. 0 LM3. 0 SM2. 0 )c k Star t TALARM 0 Rese t Q 0. 3 Star t TALARM 0 Rese t Q 0. 3 Se t conditio n f c 9-3 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r Appendi x Content s Lis t o f figure s A- 3 Lis t o f table s A- 7 Inde x A- 9 I Klockner-Moelle r 4/9 4 AW B 27-1186-G B A- 1 A- 2 4/9 4 AW B 27-1186-G B Klockner-Moelle r Appendi x Lis t o f Figure s 1- 1 Syste m parameter s men u 1- 6 1- 2 Devic e configuratio n men u 1-1 1 1- 3 Progra m edito r men u 1-1 3 2- 1 Structur e o f a n instructio n 2- 4 2- 2 Inpu t addresse s 2- 7 2- 3 Outpu t addresse s 2- 8 2- 4 Marke r addresse s 2- 9 2- 5 Exampl e o f a functio n bloc k 2-2 1 2- 6 Progra m sequenc e an d dat a flo w durin g functio n bloc k processin g 2-2 5 2- 7 Functio n blocks , type s o f memorie s an d functio n bloc k dat a storag e 2-3 2 2- 8 Functio n blocks , shiftin g o f dat a range s afte r insertin g ne w functio n bloc k dat a 2-3 3 2- 9 Registe r overvie w 2-3 6 2-1 0 Overvie w o f sequence s 2-4 6 2-1 1 Bloc k structur e 2-4 8 2-1 2 Structur e o f th e mai n progra m 2-5 0 2-1 3 Progra m cycl e 2-5 1 3- 1 Programmin g wit h inserte d sourc e fil e 3- 6 3- 2 Neste d progra m structur e 3-1 0 3- 3 Progra m modul e call-up s initiate d fro m th e mai n progra m an d a progra m modul e 3-1 2 3- 4 Progra m modul e call-up s fro m a n "Include " fil e o f th e mai n progra m 3-1 4 3- 5 Locatio n o f mai n progra m an d progra m module s i n I L 3-1 5 3- 6 Dat a transfe r mai n progra m - progra m module s vi a th e marke r rang e 3-2 3 3- 7 Locatio n o f progra m module s i n th e use r memor y 3-3 1 4- 1 Test/commissionin g mai n men u 4- 5 4- 2 P S 4-20 0 statu s men u 4- 8 Klockner-Moelle r 4/9 4 AW B 27-1186-G B A- 3 Appendi x Lis t o f Figure s 4- 3 4- 4 4- 5 4- 6 4- 7 4- 8 4- 9 4-1 0 4-1 1 4-1 2 4-1 3 4-1 4 4-1 5 4-1 6 7- 1 7- 2 7- 3 7- 4 7- 5 7- 6 7- 7 7- 8 7- 9 7-1 0 8- 1 8- 2 8- 3 8- 4 Displa y o f th e devic e configuratio n an d l/ Q statu s Devic e statu s Diagnostic s displa y fo r individua l device s Input/outpu t displa y fo r individua l device s (here : P S 4-201-M M 1 a s slave ) Forcin g o f output s I L statu s displa y Displa y rang e Doubl e rang e LIFO/FIF O conten t displa y Dynami c forcin g Onlin e modification s Onlin e modification s Progra m modul e director y Date/tim e Cyclica l processin g o f th e ste p sequenc e Pain t fillin g plan t Ste p sequenc e fo r a fillin g plan t Processin g th e sequentia l contro l functio n bloc k withi n th e use r progra m Ste p chang e indicatio n o n T G outpu t Progra m exampl e fo r ste p chang e indicatio n Linea r ste p sequenc e O R ste p sequenc e AN D ste p sequenc e Exampl e o f neste d AN D ste p sequenc e Direc t addressin g Indirec t addressin g Cop y functio n o f th e bloc k transfe r functio n bloc k Initializ e functio n o f th e bloc k transfe r functio n bloc k 4-1 7 4-1 8 4-1 8 4-1 9 4-2 0 4-2 3 4-2 4 4-2 5 4-2 6 4-2 7 4-2 9 4-3 0 4-3 7 4-3 9 7- 6 7- 7 7- 9 7-2 1 7-2 3 7-2 4 7-2 6 7-2 8 7-3 1 7-3 2 8- 4 8- 5 8- 7 8- 8 A- 4 4/94AWB27-1186-G B Klockner-Moelle r Appendi x Lis t o f Figure s 8- 5 Compar e functio n o f th e bloc k compariso n functio n bloc k 8- 9 8- 6 Dat a valu e searc h usin g th e bloc k compariso n functio n bloc k 8-1 0 8- 7 Definitio n o f a dat a bloc k 8-1 2 8- 8 Exampl e o f th e cop y mod e o f th e ICP Y functio n bloc k 8-1 5 8- 9 Exampl e o f th e initializ e mod e o f th e ICP Y functio n bloc k 8-1 5 8-1 0 Exampl e o f th e bloc k compar e mod e o f th e IC P functio n bloc k 8-1 8 8-1 1 Exampl e o f a dat a valu e searc h usin g th e IC P functio n bloc k 8-1 9 9- 1 Fail-saf e circui t o f th e P S 4 20 0 serie s 9- 5 9- 2 Devic e configuratio n men u 9- 6 9- 3 Circui t diagra m o f AND/O R sequenc e 9- 9 9- 4 Devic e configuratio n o f OR/AN D sequenc e 9-1 0 9- 5 Circui t diagra m o f OR/AN D sequenc e 9-1 0 9- 6 Signa l sequenc e o f th e binar y divide r 9-1 2 9- 7 Signa l sequenc e o f fleetin g mak e contac t wit h constan t tim e 9-1 3 9- 8 Signa l sequenc e o f fleetin g mak e contac t wit h variabl e tim e 9-1 4 9- 9 Signa l sequenc e o f fleetin g brea k contac t wit h constan t tim e 9-1 5 9-1 0 Signa l sequenc e o f fleetin g brea k contac t wit h variabl e tim e 9-1 6 9-1 1 Segmen t structur e o f th e 6 4 Kbyt e flas h EEPRO M memor y fo r savin g th e retentiv e marke r ranges , whic h kee p thei r dat a als o wit h a col d star t 9-1 7 9-1 2 Functio n sequenc e two-poin t controlle r wit h hysteresi s 9-2 6 9-1 3 Signa l sequenc e fo r positionin g devic e 9-3 4 9-1 4 Signa l sequenc e fo r positionin g wit h dela y 9-3 6 9-1 5 Signa l sequenc e puls e generato r 9-3 8 Klockner-Moelle r 4/9 4 AW B 27-1186-G B A- 5 I ? A- 6 4/9 4 AW B 27-1186-G B Klockner-Moelle r Appendi x Lis t o f Table s Operan d overvie w Availabl e operator s wit h thei r appropriat e dat a type s Availabl e functio n block s Availabl e pre-processo r instruction s DS W diagnostic s statu s wor d IN B informatio n byt e Resolutio n o f analogu e value s Operan d overvie w Erro r signal s a t ER R outpu t 2- 4 2-1 8 2-2 3 2-5 3 4- 9 4-1 4 4-2 0 5- 3 7-2 2 Klockner-Moelle r 4/9 4 AW B 27-1186-G B A- 7 A- 8 4/9 4 AW B 27-1186-G B Klockner-Moelle r Appendi x Inde x A Abbreviation s 5- 4 Additio n 5-1 0 Addres s operato r & 8-2 1 Addressin g th e operand s 2- 5 Allocatio n 5- 6 Analogu e - input s 2- 7 - outpu t 2- 9 - transducer s 4-1 7 AN D 5- 8 AN D sequenc e 5- 8 AND/O R sequenc e (example ) 9- 9 Area s o f applicatio n 8- 3 Auxiliar y registe r 2-3 6 B Backu p copie s 1-1 6 Binar y divide r 9-1 2 Bloc k 2-4 8 - comparison , IC P 6-2 6 - compariso n 8-1 6 - structur e 2-4 8 - transfer , ICP Y 6-3 0 - transfer , initializ e mod e 8-1 5 - transfer , synta x 8-1 3 Bloc k compariso n - searc h mod e 8-1 0 C C : dow n counte r 9-4 1 Cabling , chec k 4-1 7 CAL4RM : encode r 9-3 3 Callin g th e modul e 3-1 7 Carr y bi t 2-3 8 CK , SCK : summer/winte r tim e 9-2 2 Cod e converter : - Binar y t o Decimal , BI D 6- 5 - Decima l t o Binary, DE B 6-1 7 Klockner-Moelle r 4/94AWB27-1186-G B A- 9 Appendi x Inde x Communication s dat a 2-1 5 Comparator , C P 6-1 6 Compar e mod e 8-1 7 Compariso n 5-1 6 Compilin g a proga m 1 -1 5 Compilin g th e use r progra m 1-1 5 Conditiona l - bi t 5- 4 - branche s 5-1 3 - jump s 5-2 4 - return s 5-3 7 Constant s 2-1 1 Copyin g dat a field s 8- 7 Cop y mod e 8-1 4 Counte r - alar m functio n block , CAU\R M 6- 9 - inpu t 2- 7 Creat e a utilisatio n tabl e 1 - 9 Cycl e tim e 1-7,4- 8 - excee d th e cycl e tim e 1- 7 - settin g th e cycl e tim e 1- 7 D Dat a bloc k Date/tim e 4-3 9 - displa y 4-3 9 - specif y 4-3 9 Designation s 6- 4 Destinatio n rang e 8-1 1 Devic e configuratio n 1- 7 - modif y 1- 7 Diagnostic s statu s wor d 4- 9 Digita l input s 2- 7 Direc t addressin g 8- 4 Divisio n 5-1 8 Edg e alar m functio n block , FALAR M 6-1 9 - encode r wit h dela y 9-3 8 A-1 0 4/9 4 AW B 27-1186-G B Klockner-Moelle r Appendi x Inde x Statu s registe r Subtractio n Summatio n Symboli c operand s Syste m specifi c operand s 2-3 6 5-5 2 8-2 3 2-1 5 2-1 3 T TALARM : encode r Encode r wit h dela y Tes t function s Tim e - alar m functio n block , TALAR M - dat e Comparator , C K - generator , TGE N T R - cloc k generato r - puls e generato r - rollin g shutte r contro l - two-poin t controlle r wit h hysteresi s Transferrin g a progra m t o th e PL C U Unconditiona l Jum p Use r progra m - activat e checksu m - definitio n - sav e versio n numbe r V Voltag e failure , behaviou r o f th e marker s W Workin g registe r Z Zer o bi t 9-3 4 9-3 6 4- 5 6-5 4 6-1 2 6-6 0 9-3 8 9-3 9 9-2 4 9-2 6 1-1 7 5-2 5 1- 6 2- 3 1- 9 1- 8 2-3 6 2-3 8 Klockner-Moelle r 4/9 4 AW B 27-1186-G B A-1 7 ELEV2 Documentation of programs in IL Program file :elev2.q42 Reference file:elevator.z42 System parameters : Program check in RUN : No Start after NOT READY : Halt Maximum cycle time in ms : 60 ms Aktive marker range : MB4096 Retentive marker range f rom : - to : - Retentive marker range f rom : - (also after cold start ) to : - Force marker range from : - to : - Version number for user program : 0000 Page 1 ELEV2 ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³Date ³Name ³Project/Locatio n/Inventory number ³Company/Drawing number ³Page ³ ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Signed ³05/04/2012³S. Noval ³Automation proc ess of an elevator system ³Univ. "Vasile Alecsandri" din Bacau ³1 ³ ³Output ³ ³ ³ ³ ³ ³ ³Index ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ  Directory Chapter/Page 00000 control elev ator algorithm 2 00001 $INI Initializare 00002 $E0 00003 ET1 00004 ET2 00005 ET3 00006 ET4 00007 END 00008 $E1 00009 END 00010 $E2 00011 END 00012 $E3 00013 END 00014 $E4 00015 END 00016 $E5 00017 ET6 00018 ET7 00019 ET8 00020 ET9 00021 END 00022 $E6 00023 END 00024 $E7 00025 END 00026 $E8 00027 END 00028 $E9 00029 END 00030 $E10 00031 DOWN 00032 UP 00033 EQUAL 00034 END 00035 $E11 00036 END 00037 $E12 00038 END Page 2 ELEV2 ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³Date ³Name ³Project/Locatio n/Inventory number ³Company/Drawing number ³Page ³ ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Signed ³05/04/2012³S. Noval ³Automation proc ess of an elevator system ³Univ. "Vasile Alecsandri" din Bacau ³1 ³ ³Output ³ ³ ³ ³ ³ ³ ³Index ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ  ³Line ³ Program line ³ Operand commen t ³Symb./Oper.³M/B³ Terminal ³ Cross-reference fil e³ ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ´ ³00000 "control elevator algorithm 2 ³ ³ ³ ³ ³ ³ 1 #include "jose.k42" ³ ³ ³ ³ ³ ³ 2 ³ ³ ³ ³ ³ ³ 3 SK0 -13 Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 4 S: L K 1 ³ ³ ³ ³ ³ ³ 5 R: INB0.0 ³ ³ ³ ³ ³ ³ 6 SINO: ³ ³ ³ ³ ³ ³ 7 ERR: ³ ³ ³ ³ ³ ³ 8 SQNO: ³ ³ ³ ³ ³ ³ 9 TG: ³ ³ ³ ³ ³ ³ 10 INIT: $INI ³ ³ ³ ³ ³ ³ 11 AC1: $E0 ³ ³ ³ ³ ³ ³ 12 AC2: $E1 ³ ³ ³ ³ ³ ³ 13 AC3: $E2 ³ ³ ³ ³ ³ ³ 14 AC4: $E3 ³ ³ ³ ³ ³ ³ 15 AC5: $E4 ³ ³ ³ ³ ³ ³ 16 AC6: $E5 ³ ³ ³ ³ ³ ³ 17 AC7: $E6 ³ ³ ³ ³ ³ ³ 18 AC8: $E7 ³ ³ ³ ³ ³ ³ 19 AC9: $E8 ³ ³ ³ ³ ³ ³ 20 AC10: $E9 ³ ³ ³ ³ ³ ³ 21 AC11: $E10 ³ ³ ³ ³ ³ ³ 22 AC12: $E11 ³ ³ ³ ³ ³ ³ 23 AC13: $E12 ³ ³ ³ ³ ³ Page 3 ELEV2 ³ 24 EP ³ ³ ³ ³ ³ ³00001 $INI "Initializare ³ ³ ³ ³ ³ ³ 1 L KB 1 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 EM ³ ³ ³ ³ ³ ³00002 $E0 " ³ ³ ³ ³ ³ ³ 1 L K 0 ³ ³ ³ ³ ³ ³ 2 = 'DOWN Actiuni motor jo s ³Q 0.2 ³ ³ ³ ³ ³ 3 = 'UP Actiuni motor su s ³Q 0.1 ³ ³ ³ ³ ³ 4 = M 0.0 ³ ³ ³ ³ ³ ³ 5 = M 0.1 ³ ³ ³ ³ ³ ³ 6 = M 0.2 ³ ³ ³ ³ ³ ³ 7 = M 0.3 ³ ³ ³ ³ ³ ³ 8 L 'L0 Sensor level 0 ³I 0.0 ³ ³ ³ ³ ³ 9 JC ET1 ³ ³ ³ ³ ³ ³ 10 L 'L1 Sensor level 1 ³I 0.1 ³ ³ ³ ³ ³ 11 JC ET2 ³ ³ ³ ³ ³ ³ 12 L 'L2 Sensor level 2 ³I 0.2 ³ ³ ³ ³ ³ 13 JC ET3 ³ ³ ³ ³ ³ ³ 14 L 'L3 Sensor level 3 ³I 0.3 ³ ³ ³ ³ ³ 15 JC ET4 ³ ³ ³ ³ ³ ³ 16 JCN END ³ ³ ³ ³ ³ ³00003 ET1 " ³ ³ ³ ³ ³ ³ 1 L KB 2 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00004 ET2 " ³ ³ ³ ³ ³ ³ 1 L KB 3 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00005 ET3 " ³ ³ ³ ³ ³ ³ 1 L KB 4 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ Page 4 ELEV2 ³00006 ET4 " ³ ³ ³ ³ ³ ³ 1 L KB 5 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00007 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00008 $E1 " ³ ³ ³ ³ ³ ³ 1 L KB 0 ³ ³ ³ ³ ³ ³ 2 = 'ALEVEL ³MB2 ³ ³ ³ ³ ³ 3 L KB 6 ³ ³ ³ ³ ³ ³ 4 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 5 JP END ³ ³ ³ ³ ³ ³00009 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00010 $E2 " ³ ³ ³ ³ ³ ³ 1 L KB 1 ³ ³ ³ ³ ³ ³ 2 = 'ALEVEL ³MB2 ³ ³ ³ ³ ³ 3 L KB 6 ³ ³ ³ ³ ³ ³ 4 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 5 JP END ³ ³ ³ ³ ³ ³00011 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00012 $E3 " ³ ³ ³ ³ ³ ³ 1 L KB 2 ³ ³ ³ ³ ³ ³ 2 = 'ALEVEL ³MB2 ³ ³ ³ ³ ³ 3 L KB 6 ³ ³ ³ ³ ³ ³ 4 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 5 JP END ³ ³ ³ ³ ³ ³00013 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00014 $E4 " ³ ³ ³ ³ ³ ³ 1 L KB 3 ³ ³ ³ ³ ³ ³ 2 = 'ALEVEL ³MB2 ³ ³ ³ ³ ³ 3 L KB 6 ³ ³ ³ ³ ³ Page 5 ELEV2 ³ 4 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 5 JP END ³ ³ ³ ³ ³ ³00015 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00016 $E5 " ³ ³ ³ ³ ³ ³ 1 L 'P0 Buton level 0 ³I 0.4 ³ ³ ³ ³ ³ 2 JC ET6 ³ ³ ³ ³ ³ ³ 3 L 'P1 Buton level 1 ³I 0.5 ³ ³ ³ ³ ³ 4 JC ET7 ³ ³ ³ ³ ³ ³ 5 L 'P2 Buton level 2 ³I 0.6 ³ ³ ³ ³ ³ 6 JC ET8 ³ ³ ³ ³ ³ ³ 7 L 'P3 Buton level 3 ³I 0.7 ³ ³ ³ ³ ³ 8 JC ET9 ³ ³ ³ ³ ³ ³ 9 JCN END ³ ³ ³ ³ ³ ³00017 ET6 " ³ ³ ³ ³ ³ ³ 1 L KB 7 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00018 ET7 " ³ ³ ³ ³ ³ ³ 1 L KB 8 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00019 ET8 " ³ ³ ³ ³ ³ ³ 1 L KB 9 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00020 ET9 " ³ ³ ³ ³ ³ ³ 1 L KB 10 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00021 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00022 $E6 " ³ ³ ³ ³ ³ ³ 1 L KB 0 ³ ³ ³ ³ ³ Page 6 ELEV2 ³ 2 = 'LEVEL ³MB1 ³ ³ ³ ³ ³ 3 L K 1 ³ ³ ³ ³ ³ ³ 4 = M 0.0 ³ ³ ³ ³ ³ ³ 5 L KB 11 ³ ³ ³ ³ ³ ³ 6 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 7 JP END ³ ³ ³ ³ ³ ³00023 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00024 $E7 " ³ ³ ³ ³ ³ ³ 1 L KB 1 ³ ³ ³ ³ ³ ³ 2 = 'LEVEL ³MB1 ³ ³ ³ ³ ³ 3 L K 1 ³ ³ ³ ³ ³ ³ 4 = M 0.1 ³ ³ ³ ³ ³ ³ 5 L KB 11 ³ ³ ³ ³ ³ ³ 6 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 7 JP END ³ ³ ³ ³ ³ ³00025 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00026 $E8 " ³ ³ ³ ³ ³ ³ 1 L KB 2 ³ ³ ³ ³ ³ ³ 2 = 'LEVEL ³MB1 ³ ³ ³ ³ ³ 3 L K 1 ³ ³ ³ ³ ³ ³ 4 = M 0.2 ³ ³ ³ ³ ³ ³ 5 L KB 11 ³ ³ ³ ³ ³ ³ 6 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 7 JP END ³ ³ ³ ³ ³ ³00027 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00028 $E9 " ³ ³ ³ ³ ³ ³ 1 L KB 3 ³ ³ ³ ³ ³ ³ 2 = 'LEVEL ³MB1 ³ ³ ³ ³ ³ 3 L K 1 ³ ³ ³ ³ ³ ³ 4 = M 0.3 ³ ³ ³ ³ ³ ³ 5 L KB 11 ³ ³ ³ ³ ³ Page 7 ELEV2 ³ 6 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 7 JP END ³ ³ ³ ³ ³ ³00029 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00030 $E10 " ³ ³ ³ ³ ³ ³ 1 L 'LEVEL ³MB1 ³ ³ ³ ³ ³ 2 CP 'ALEVEL ³MB2 ³ ³ ³ ³ ³ 3 BLT DOWN ³ ³ ³ ³ ³ ³ 4 BGT UP ³ ³ ³ ³ ³ ³ 5 BE EQUAL ³ ³ ³ ³ ³ ³ 6 JP END ³ ³ ³ ³ ³ ³00031 DOWN " ³ ³ ³ ³ ³ ³ 1 L KB 12 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00032 UP " ³ ³ ³ ³ ³ ³ 1 L KB 13 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00033 EQUAL " ³ ³ ³ ³ ³ ³ 1 L KB 1 ³ ³ ³ ³ ³ ³ 2 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³ 3 JP END ³ ³ ³ ³ ³ ³00034 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00035 $E11 " ³ ³ ³ ³ ³ ³ 1 L K 1 ³ ³ ³ ³ ³ ³ 2 = 'DOWN Actiuni motor jo s ³Q 0.2 ³ ³ ³ ³ ³ 3 L 'L0 Sensor level 0 ³I 0.0 ³ ³ ³ ³ ³ 4 A M 0.0 ³ ³ ³ ³ ³ ³ 5 = M 0.4 ³ ³ ³ ³ ³ ³ 6 L 'L1 Sensor level 1 ³I 0.1 ³ ³ ³ ³ ³ 7 A M 0.1 ³ ³ ³ ³ ³ ³ 8 = M 0.5 ³ ³ ³ ³ ³ Page 8 ELEV2 ³ 9 L 'L2 Sensor level 2 ³I 0.2 ³ ³ ³ ³ ³ 10 A M 0.2 ³ ³ ³ ³ ³ ³ 11 = M 0.6 ³ ³ ³ ³ ³ ³ 12 L 'L3 Sensor level 3 ³I 0.3 ³ ³ ³ ³ ³ 13 A M 0.3 ³ ³ ³ ³ ³ ³ 14 = M 0.7 ³ ³ ³ ³ ³ ³ 15 L M 0.4 ³ ³ ³ ³ ³ ³ 16 O M 0.5 ³ ³ ³ ³ ³ ³ 17 O M 0.6 ³ ³ ³ ³ ³ ³ 18 O M 0.7 ³ ³ ³ ³ ³ ³ 19 JCN END ³ ³ ³ ³ ³ ³ 20 L KB 1 ³ ³ ³ ³ ³ ³ 21 = SK0 SINO Functie de contr ol secvential ³ ³ ³ ³ ³ ³00036 END " ³ ³ ³ ³ ³ ³ 1 EM ³ ³ ³ ³ ³ ³00037 $E12 " ³ ³ ³ ³ ³ ³ 1 L K 1 ³ ³ ³ ³ ³ ³ 2 = 'UP Actiuni motor su s ³Q 0.1 ³ ³ ³ ³ ³ 3 L 'L0 Sensor level 0 ³I 0.0 ³ ³ ³ ³ ³ 4 A M 0.0 ³ ³ ³ ³ ³ ³ 5 = M 0.4 ³ ³ ³ ³ ³ ³ 6 L 'L1 Sensor level 1 ³I 0.1 ³ ³ ³ ³ ³ 7 A M 0.1 ³ ³ ³ ³ ³ ³ 8 = M 0.5 ³ ³ ³ ³ ³ ³ 9 L 'L2 Sensor level 2 ³I 0.2 ³ ³ ³ ³ ³ 10 A M 0.2 ³ ³ ³ ³ ³ ³ 11 = M 0.6 ³ ³ ³ ³ ³ ³ 12 L 'L3 Sensor level 3 ³I 0.3 ³ ³ ³ ³ ³ 13 A M 0.3 ³ ³ ³ ³ ³ ³ 14 = M 0.7 ³ ³ ³ ³ ³ ³ 15 L M 0.4 ³ ³ ³ ³ ³ ³ 16 O M 0.5 ³ ³ ³ ³ ³ ³ 17 O M 0.6 ³ ³ ³ ³ ³ ³ 18 O M 0.7 Page 9 6/10 06/01 AWA27-1589 Schirmerdu ng – Earthing the screen – Mise à la terre du blinda ge – Collegam ento alla terra d ello schermo – Conexión a tierra de pantalla * Signalleitungen (abhängig vom Modul) – Sig nal cable (depending on module) – Lig ne de signaux (en fonction du module ) – Conduttore del segnale (dipende nte dal modulo) – Línea de señalización (en función del módulo) a für H utschiene – for top-hat rail – pour profi lé- support – per guida – para guía simétrica b für Montageplatte – for mounting plate – pour plaque de montage – per piastra di montaggio – para placa de montaje PS4/EM4 * * a b M4 ZB4-102-KS1 ZB4-102-KS1 FM 4/TS 35 (Weidmüller) KLBü 3-8 SC (Weidmüller) 1589 0601 .FM Seit e 6 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 7/10 06/01 AWA27-1589 Alternative Schirmer dung – Alternative screen ea rth – Mise à la terre du blindage a u choix – Collegamen to altern ativo dello scherm o a terra – Puesta a tierra alternativa d e la panta lla Falls die Schirmerdung auf Seite 6/10 aus Platzgründ en nicht möglich ist. In the event that the screen earthing arrangement on Page 6/10 is not po ssible due to lack of space. Au cas où la mise à la terre du blindage en page 6/10 est trop encom brante. Se il collegamento a terra dello schermo di pag. 6/ 10 richiede troppo spazio. En caso de que la puesta a tierra de la pantalla en página 6/10 no se a posible por razones de espacio. PS4/EM4 PS4-... EM4-... PS4/EM4 PS4-... EM4-... 2.5 mm 2 (< 11 cm) 1589 0601 .FM Seit e 7 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 8/10 06/01 AWA27-1589 Busabschlusswiderstände – Bu s terminating resistors – Résistances de terminaison de bus – Resistenci di terminazione bu s – Resistencias termina les de bus Batterie – Batery – Pi le – Batteria – Pil a Speicherm odul – Mem mory Module – Module de mémo ire – Modulo di memoria – Módulo de memori a Schalterstellung im Auslieferungszustand Factory set ting Position à la livraison Impostazion e di fabbrica Posición de entrega S1: 1 ON 2 ON Achtung! Nur im eingeschalteten Zustand stecken oder ziehen. Attention! Only fit or remove if switched on. Attention ! Ni enficher ni retirer que lorsque l’appareil est sous tension. Attenzione! Inserire/togliere solo a tension inserita. ¡Atención! Meter o sacar sólo con tensión. Achtung! Nur im spannungslosen Zustand stecken oder ziehen. Attention! Always switch off the power supply when fitting or removing. Attention ! Brancher/débrancher uniquement hors tension. Attenzione! Inserire o togliere solo a tensione disinserita. ¡Atención! Enchufar o desenchufar só lo sin tensión. S1 On Off 12 P1 P2 1 2 1 2 3 4 1589 0601 .FM Seit e 8 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 9/10 06/01 AWA27-1589 Montage – Fi tting – Monta ggio – Montaje auf Montageplatte mit 35-mm-Hutschiene a (senkrecht ohne LE oder waagerecht) on mounting plate with 35 mm top-hat rail a (vertical without LE or horizontal) sur plaque de montage avec profilé -support 35 mm a ( vertical sans LE ou horizontal) su piastra di montaggio con guida DIN 35 mm a (verticale senza LE o orizzontale) sobre placa de montaje con guía simétrica de 35 mm a (vertical sin LE ó horizontal) auf Montageplatte (senkrecht ohne LE oder waagerecht) on mounting plate (vertical wi t hout LE or ho rizontal) sur plaque de montage (verti cal sans LE o u horizontal) su piastra di montaggio (verticale senza LE o orizzontale) sobre placa de montaje (ve rtical s in LE ó horizontal) 35 42.5 45 42.5 a 1 2 3 ZB4-101-GF1 1589 0601 .FM Seit e 9 Mo ntag, 15. J a n uar 2 007 3:22 15 For Immediate Delivery call KMParts.com at (866) 595-9616 10/10 Moeller GmbH, In dustrieautomation , D-53115 Bonn © 1997 by Mo eller GmbH Änderungen vorbehalte n 06/01 AWA27-15 89 DE13 Doku/Eb Printed in Germany (0 1/07) 06/01 AWA27-1589 Bohrsch ablone M 1 : 1 Templa te for holes , scale 1 : 1 Gabarit de perçage, échelle 1 : 1 Dima di foratura, scala 1 : 1 Plantilla p ara taladros, escala 1 : 1 100 40.25 94.25 15.25 100 19.25 M4 EM4/PS4 1589 0601 .FM Seit e 1 0 M ont ag , 15. J a nuar 2007 3:2 2 15 For Immediate Delivery call KMParts.com at (866) 595-9616 ELEVATOR " Printout of file: c:elevator.z42 Date: 3. 4.1 2" Symbol Operand M/B Terminal Operand comm ent ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ L0 I 0.0 Sensor level 0 L1 I 0.1 Sensor level 1 L2 I 0.2 Sensor level 2 L3 I 0.3 Sensor level 3 P0 I 0.4 Buton level 0 P1 I 0.5 Buton level 1 P2 I 0.6 Buton level 2 P3 I 0.7 Buton level 3 DOWN Q 0.1 Actiuni motor jos UP Q 0.2 Actiuni motor sus LEVEL MB1 ALEVEL MB2 SK0 Functie de co ntrol secvential INB0.0 M 0.0 M 0.1 M 0.2 M 0.3 M 1.1 Page 1 11 M1 LEVEL CONTROL M2 BUTTON CONTROL 23 24 27 25 28 26 29 0 M3 DOOR CONTROL 30 M0.0=0 ; M0.1=0 ; M0.2=0 ; M0.3=0 ; M0.4=0 ; M0.5=0 ; M0.6=0 ; M0.7=0; M0. 8=0 ; M0.9=0 UP.LIGHT=0 ; DOWN.LIGHT=0 ; SEC.FAIL=0 ; EXT.BUT.LIGHT=0 ; CARLIGHT=0 NOP t = 5s BRAKE=0 ; DOWN FAST = 1 ; DOWN.LIGHT=1 DOWN FAST = 0 ; DOWN SLOW = 1 t = 5s BRAKE=0 ; UP FAST = 1 ; UP.LIGHT=1 UP FAST = 0 ; UP SLOW = 1 DOWN SLOW = 0 ; UP SLOW = 0 ; BRAKE=1 L0*M0.0+L1*M0.1+L2*M0.2+L3*M0.3+L4*M0.4+L5*M0.5+L6*M0.6+L7*M0.7+L8*M0.8+L9*M0.9 LEVEL>ALEVEL t=5s =1 36 DOWN FAST=0 ; DOWN SLOW=0 ; UP FAST=0 ; UP SLOW=0 ; BRAKE = 1 ; SEC.FAIL=1 38 WIRE+SPLIMIT+BOTTOM+TOP+ENERGY+STOP LEVEL<ALEVEL =1 WEIGHT ALARM=0 ; OPEN DOOR=0 ; CLOSE DOOR=1 D0*M0.0+D1*M0.1+D2*M0.2+D3*M0.3+D4*M0.4+D5*M0.5+D6*M0.6+D7*M0.7+D8*M0.8+D9*M0.9 U0*M0.0+U1*M0.1+U2*M0.2+U3*M0.3+U4*M0.4+U5*M0.5+U6*M0.6+U7*M0.7+U8*M0.8+U9*M0.9 UO,U1,U2,U3,U4,U5,U6,U7,U8,U9--> UP MOVE SENSORS DO,D1,D2,D3,D4,D5,D6,D7,D8,D9 --> DOWN MOVE SENSORS LO,L1,L2,L3,L4,L5,L6,L7,L8,L9--> LEVEL SENSORS Drawed by Checked by Scale: Name Date CP LEVEL & ALEVEL t=5s =1 STOP+WIRE+SPLIMIT+BOTTOM+TOP+ENERGY AUTOMATION PROCESS OF AN ELEVATOR SYSTEM GRAFCET MAIN CONTROL 1 S. Noval 14/03/2012 0 41 UP FAST=0 ; DOWN FAST=1 DOWN FAST=0 ; DOWN SLOW=1 D0 L0 To stage 36 STOP+WIRE+SPLIMIT+BOTTOM+TOP+ENERGY To transition before stage 36 To transition before stage 36 ENERGY To stage 36 [1] [2] [1] [2] [1] [2] LEVEL= ALEVEL To stage 30 37 40 To stage 40 GRAFCET NUMBER: WEIGHT M3 DOOR CONTROL OPENBUT. =1 WIRE+SPLIMIT+BOTTOM+TOP+ENERGY+WEIGHT+STOP ALARM=1 ; OPEN DOOR=1 DOOR CLOSED 39 CLOSE DOOR=0 WIRE+SPLIMIT+BOTTOM+TOP+ENERGY+STOP (TOP+BOTTOM+STOP+SPLIMIT+WIRE)*LEVELS LEVELS=(L0+L1+L2+L3+L4+L5+L6+L7+L8+L9) M1 1 2 3 4 5 6 7 8 9 10 ALEVEL=0 ALEVEL=1 ALEVEL=2 ALEVEL=3 ALEVEL=4 ALEVEL=5 ALEVEL=6 ALEVEL=7 ALEVEL=8 ALEVEL=9 L0 L1 L2 L3 L4 L5 L6 L7 L8 L9 =1 Drawed by Checked by Scale: Date Name S.Noval 14/03/2012 GRAFCET LEVEL CONTROL AUTOMATION PROCESS OF AN ELEVATOR SYSTEM 2 GRAFCET NUMBER: M2 12 1 3 14 15 1 6 17 18 19 20 21 LEVEL=0 M0.0=1 LEVEL=1 M0.1=1 LEVEL=2 M0.2=1 LEVEL=3 M0.3=1 LEVEL=4 M0.4=1 LEVEL=5 M0.5=1 LEVEL=6 M0.6=1 LEVEL=7 M0.7=1 LEVEL=8 M0.8=1 LEVEL=9 M0.9=1 EQ0 EQ1 EQ2 EQ3 EQ4 EQ5 EQ6 EQ7 EQ8 EQ9 =1 Drawed by Checked by Scale: Name Da te EQ0=A0+P0*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ1=A1+P1*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ2=A2+P2*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ3=A3+P3*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ4=A4+P4*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ5=A5+P5*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ6=A6+P6*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ7=A7+P7*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ8=A8+P8*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) EQ9=A9+P9*(A0+A1+A2+A3+A4+A5+A6+A7+A8+A9) S. Noval 14/03/2012 GRAFCET BUTTON CONTROL AUTOMATION PROCESS OF AN ELEVATOR SYSTEM 3 22 =1 EXT.BUT.LIGHT=1 ; CAR LIGHT=1 GRAFCET NUMBER: M 3 31 32 33 34 =1 OPEN DOOR=1 OPEN DOOR = 0 t = 10s CLOSE DOOR=1 D OOR OPENED =1 SECURITY 35 DOO R CLOSED CLOSE DOOR=0 =1 SECURITY SECURITY OPENBUT. Drawed by Checked by Scale: Name Date S. Noval 14/03/2012 GRAFCET DOOR CONTROL AUTOMATION PROCESS OF AN ELEVATOR SYSTEM 4 GRAFCET NUMBER: