Professional Documents
Culture Documents
ISIP Predavanja - PLC-3 - Primena
ISIP Predavanja - PLC-3 - Primena
Sadraj
1. Osnove kontaktorskih ema (mirno i radno, tasteri, kontakti i PLC bitovi 2.Lestviasti (ladder) dijagram za programiranje PLC 3. Blokovi ladder dijagrama 4. Primeri Ladder dijagrama 5. Primena u elektromotornim pogonima
2/30
Kontaktor
A1 1 3 5 13 21
A2
14
22
glavni kontakti
pomoni kontakti
4/30
5/30
Nema napona na namotaju, el. magnet ne radi, nema privlaenja kotve, kontakti razdvojeni.
6/30
Energ. ka potroau
PLC Industrijski sistemi i protokoli
Mirni bit vodi u neradnom stanju (0),normalnom stanju on je normalno zatvoren kontakt.
Bit moe biti ulaz (na primer I0.0) koji je 1 ako je napon na ulazu, ili izlaz (na primer Q0.0) koji je 1 ako je napon na izlazu, ili ak i samo bit iz memorije (na primer M0.0) koji je 1 ako je prethodno setovan ili 0 ako je prethodno resetovan.
PLC Industrijski sistemi i protokoli 8/30
Alternativa STL (statment list) - Instruction List language LD O A = start_taster izlaz stop_taster izlaz
10/30
11/30
12/30
14/30
15/30
16/30
The Set (S) and Reset (R) instructions set (turn on) or reset (turn off) the specified number of points (N), starting at the specified address (Bit). Tipically, N=1. You can set or reset from 1 to 255 points. If the reset specifies either a timer bit (T) or counter bit (C), the instruction resets the timer or counter bit and clears the current value of the timer or counter.
17/30
The Move Byte (MOVB) instruction moves the input byte (IN) to the output byte (OUT) without changing the original value.
The Move Word (MOVW) instruction moves the input word (IN) to the output word (OUT) without changing the original value.
Ove dve instrukcije ete esto koristiti da podesite neki komunikacioni modul povezan sa , ili unutar PLC ! Na primer registar za baud rate postavi na 9600 ! IN poveemo sa 9600 i povuemo liniju ka EN (dozvolimo upis)
PLC Industrijski sistemi i protokoli 18/30
The FOR (FOR) instruction executes the instructions between the FOR and the NEXT. You specify the index value or current loop count (INDX), the starting value (INIT), and the ending value (FINAL). The NEXT (NEXT) instruction marks the end of the FOR loop, and sets the top of the stack to 1.
19/30
The Jump to Label (JMP) instruction performs a branch to the specified label (n) within the program. When a jump is taken, the top of stack value is always a logical 1. LBL is the program jump point.
20/30
Call Parameter Type Description IN Parameters are passed into the subroutine. If direct address (such as VB10), the value at the specified location is passed into the subroutine. If data constant (16#1234), or an address (&VB100), the constant or address value is passed into the subroutine. IN_OUT The value at the specified parameter location is passed and the result value from the subroutine is returned to the same location. OUT The result value from the subroutine is returned to the specified parameter location. TEMP Any local memory that is not used for passed parameters may be used for temporary storage within the subroutine.
PLC Industrijski sistemi i protokoli 21/30
1. Prekid (interrupt, u PLC svetu esto zvan dogaaj ili event) se opsluuje nezavisno od periodinog PLC ciklusa skeniranja. 2. Kod prekida treba definisati dve stvari Izvor prekida Podprogram koji treba izvriti kada se desi prekid 3. Te dve stvari treba spojiti, ATTACH blok ! ATTACH blok kae pridrui ovaj podprogram (interrupt routine) sa onim interuptom ili dogaajem (event) 4. Ponekad treba redefinisati akciju , onda prvo moramo razdvojiti rutine od dogaaja, za to slui DTCH blok Naravno, dogaaj (prekid) treba dozvoliti (ENI ) ili po potrebi zabraniti (DISI). U startu je veina zabranjena.
PLC Industrijski sistemi i protokoli 23/30
Informativno
The Enable Interrupt (ENI) instruction globally enables processing of all attached interrupt events. The Disable Interrupt (DISI) instruction disables processing of ATCH trai broj dogaaja tj all interrupt events.
prekida
The Attach Interrupt (ATCH) instruction associates an interrupt event (EVNT) with an interrupt routine number (INT), and enables the interrupt event. The Detach Interrupt (DTCH) instruction disassociates an interrupt event (EVNT) from all interrupt routines, and disables the interrupt event.
PLC Industrijski sistemi i protokoli
DTCH odvaja dogaaja od svih rutina. Ne mora da zna koja je bila priljuena tom dogaaju, sve ubija !
24/30
Informativno
25/30
This timer continues counting after the Preset is reached, and it stops counting at the maximum value of 32767. TON, TONR, and TOF timers are available in three resolutions. The resolution is determined by the timer number as shown in the chart below. Each count of the current value is a multiple of the time base. For example, a count of 50 on a 10-ms timer represents 500 ms. Timer Type TONR Resolution Maximum Value 1 ms 32.767 s 10 ms 327.67 s 100 ms 3276.7 s 1 ms 32.767 s 10 ms 327.67 s 100 ms 3276.7 s Timer Number T0, T64 T1-T4, T65-T68 T5-T31, T69-T95 T32, T96 T33-T36, T97-T100 T37-T63, T101-T255
28/30
TON, TOF
29/30
30/30
31/30
32/30
34/30
R, C, L ...
Element na ije parametre merna veliina utie
Izlaz V, I, f ...
C El. kolo
v(t)
broja
35/30
36/30
37/30
38/30
Inkrementi poloaja
dsPIC A B index
PLC Industrijski sistemi i protokoli
Quadrature Encoder
n m = 2 N
stop_taster
I0.2
PLC Industrijski sistemi i protokoli
PLC
41/30
stop_taster
Ovo vai u sluaju da se za stop koriste mirni taster! Na primer, podnaponska sklopka dok ima napona dri stop provodnim, ako napon nestane, stop izbacuje pogon.
24 V
start_taster
I0.1
stop_taster
I0.2
PLC Industrijski sistemi i protokoli
PLC
42/30
Rele
44/30
45/30
46/30
+24V
47/30
48/30
49/30
50/30
Motor starter
51/30
52/30