




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Programação LADDER, blocos de funções, características técnicas, temporizadores e contadores
Tipologia: Manuais, Projetos, Pesquisas
1 / 747
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































i v
The models that every series includes are as follows.
Series Model name
will be open loop (Off), so Y0 will be Off. When X0 is pressed, the contact will be On, so Y0 will be On. Row 2: Using a normally closed (NC) switch X1 (“B” switch or “B” contact). When X1 is not pressed, the contact will be On, so Y1 will be On. When X1 is pressed, the contact will be open loop (Off), so Y1 will be Off. Row 3: The combination logic of more than one input devices. Output Y2 will be On when X2 is not pressed or X3 and X4 are pressed.
X Y X Y
X
When the circuit is first connected to the power, though X6 is On, X5 is Off, so Y3 will be Off. After X5 is pressed, Y3 will be On. Once Y3 is On, even X5 is released (Off), Y3 can still keep its action because of the draw back (i.e. the self-retained circuit). The actions are illustrated in the table below. Device status Action sequence
1 No action No action Off 2 Action No action On 3 No action No action On 4 No action Action Off 5 No action No action Off
From the table above, we can see that in different sequence, the same input status can result in different output results. For example, switch X5 and X6 of action sequence 1 and 3 do not act, but Y3 is Off in sequence 1 and On in sequence 3. Y3 output status will then be drawn back as input (the so-called “draw back”), making the circuit being able to perform sequential control, which is the main feature of the ladder diagram circuit. Here we only explain contact A, contact B and the output coil. Other devices are applicable to the same method. See Chapter 3 “Basic instructions” for more details.
Though the principles of traditional ladder diagram and PLC ladder diagram are the same, in fact, PLC adopts microcomputer to simulate the motions of the traditional ladder diagram, i.e. scan-check status of all the input devices and output coil and calculate to generate the same output results as those from the traditional ladder diagram based on the logics of the ladder diagram. Due to that there is only one microcomputer, we can only check the program of the ladder diagram one by one and calculate the output results according to the program and the I/O status before the
1-2 DVP-PLC Application Manual
cyclic process of sending the results to the output interface re-reading of the input status calculation output. The time spent in the cyclic process is called the “scan time” and the time can be longer with the expansion of the program. The scan time can cause delay from the input detection to output response of the PLC. The longer the delay, the bigger the error is to the control. The control may even be out of control. In this case, you have to choose a PLC with faster scan speed. Therefore, the scan speed is an important specification requirement in a PLC. Owing to the advancement in microcomputer and ASIC (IC for special purpose), there has been great improvement in the scan speed of PLC nowadays. See the figure below for the scan of the PLC ladder diagram program.
The output result is calculated based on the ladder diagram. (The result has not yet sent to the external output point, but the internal device will perform an immediate output.)
Y
X0 X Start Y
M100 X Y
X : : X100 M Y End
Send the result to the output point
Read input status from outside
Executing in cycles
Besides the difference in the scan time, PLC ladder and traditional ladder diagram also differ in “reverse current”. For example, in the traditional ladder diagram illustrated below, when X0, X1, X4 and X6 are On and others are Off, Y output on the circuit will be On as the dotted line goes. However, the PLC ladder diagram program is scanned from up to down and left to right. Under the same input circumstances, the PLC ladder diagram editing tool WPLSoft will be able to detect the errors occurring in the ladder diagram. Reverse current of traditional ladder diagram
X
X0 X1^ X X3 (^) a X4^ bX
Y
Reverse current of PLC ladder diagram
X
X Y
X1 X2 Y
X3 (^) a X4 (^) bX
Error detected in the third row
Ladder diagram is a diagram language frequently applied in automation. The ladder diagram is composed of the symbols of electric control circuit. The completion of the ladder diagram by the ladder diagram editor is the completion
DVP-PLC Application Manual 1-
DVP-PLC Application Manual 1-
Device Functions
Internal relay
The internal relay does not have connection with the external. It is an auxiliary relay inside the PLC with the functions same as those of the auxiliary (middle) relay in the electric control circuit. Every internal relay corresponds to a basic internal storage unit and can be driven by the contacts of the input relay, contacts of the output relay and the contacts of other internal devices. There are no limitations on the times of using the contacts of the internal relay and there will be no output from the internal relay, but from the output point. Device indication: M0, M1, …, M4095 are indicated as M and numbered in decimal form.
Step
DVP series PLC offers a step-type control program input method. STL instruction controls the transfer of step S, which makes it easy for the writing of the control program. If you do not use any step program in the control program, step S can be used as an internal relay M as well as an alarm point. Device indication: S0, S1, …S1023 are indicated as S and numbered in decimal form.
Timer
The timer is used for timing and has coil, contact and register in it. When the coil is On and the estimated time is reached, its contact will be enabled (contact A closed, contact B open). Every timer has its fixed timing period (unit: 1ms/10ms/100ms). Once the coil is Off, the contact iwlwl be disabled (contact A open, contact B closed) and the present value on the timer will become “0”. Device indication: T0, T1, …, T255 are indicated as T and numbered in decimal form. Different No. refers to different timing period.
Counter
The counter is used for counting. Before using the counter, you have to give the counter a set value (i.e. the number of pulses for counting). There are coil, contact and registers in the counter. When the coil goes from Off to On, the counter will regard it as an input of 1 pulse and the present value on the counter will plus “1”. We offer 16-bit and 32-bit high-speed counters for our users. Device indication: C0, C1, …, C255 are indicated as C and numbered in decimal form.
Data register
Data processing and value operations always occur when the PLC conducts all kinds of sequential control, timing and counting. The data register is used for storing the values or all kinds of parameters. Every register is able to store a word (16-bit binary value). Double words will occupy 2 adjacent data registers. Device indication: D0, D1, …, D11999 are indicated as D and numbered in decimal form.
File register
The file register is used for storing the data or all kinds of parameters when the data registers required for processing the data and value operations are insufficient. Every file register is able to store a 16-bit word. Double words will occupy 2 adjacent file registers. In SA/SX/SC series MPU, there are 1,600 file registers. In EH2/SV/EH3/SV2 series MPU, there are 10,000 file registers. There is not an actual device No. for a file register. The reading and writing of file registers should be executed by instructions API 148 MEMR, API 149 MEMW, or through the peripheral device HPP02 and WPLSoft. Device indication: K0 ~ K9,999, numbered in decimal form.
1-6 DVP-PLC Application Manual
Device Functions
Index register
E and F index registers are 16-bit data registers as other data registers. They can be read and written and can be used in word devices, bit devices or as a constant for index indication. Device indication: E0 ~ E7, F0 ~ F7 are indicated as E and F and numbered in decimal form.
The structure of a ladder diagram: Structure Explanation Instruction Devices Used
Normally open, contact A LD X, Y, M, S, T, C
Normally closed, contact B LDI X, Y, M, S, T, C
Normally open in series connection
Normally closed in series connection
Normally open in parallel connection
Normally closed in parallel connection
Rising-edge trigger switch LDP X, Y, M, S, T, C
Falling-edge trigger switch LDF X, Y, M, S, T, C
Rising-edge trigger in series connection
Falling-edge trigger in series connection
Rising-edge trigger in parallel connection
Falling-edge trigger in parallel connection
Block in series connection ANB -
Block in parallel connection ORB -
Network: A complete block network is composed of devices and all kinds of blocks. The blocks or devices connectable by a vertical line or continuous line belong to the same network.
An independent network
Network 1
Network 2
An incomplete network
The editing of the program should start from the left power line and ends at the right power line, a row after another. The drawing of the right power line will be omitted if edited from WPLSoft. A row can have maximum 11 contacts on it. If 11 is not enough, you can continuously connect more devices and the continuous number will be generated automatically. The same input points can be used repeatedly. See the figure below: X0 X1 X2 X3 X4 X
Y
X11 X12 X
X6 X7 X10 C0 C 00000 00000 Continuous number
The operation of the ladder diagram program is scanning from top left to bottom right. The coil and the operation frame of the application instruction belong to the output side in the program and are placed in the right if the ladder diagram. Take the figure below for example, we will step by step explain the process of a ladder diagram. The numbers in the black circles indicate the order.
X0 X1 Y1 X
M X3 M
T0 (^) M
Y TMR T0 K
1-8 DVP-PLC Application Manual
The order of the instructions: 1 LD X 2 OR M 3 AND X 4 LD X AND M ORB 5 LD Y AND X 6 LD T AND M ORB 7 ANB 8 OUT Y TMR T0 K
Explanations on the basic structures in the ladder diagram:
AND block OR block
LD instruction LD instruction
The structure of LDP and LDF instructions are the same as that of LD instruction, and the two only differ in their actions. LDP and LDF instructions only act at the rising edge or falling edge when the contact is On, as shown in the figure below.
X OFF (^) ON (^) OFF
Time
Falling edge X OFF (^) ON OFF
Time
Rising edge
The structure of ANDP and ANDF instructions are the same. ANDP and ANDF instructions only act at the rising edge or falling edge.
DVP-PLC Application Manual 1-
MPP is recognized as “└”. Using the method given above for the analysis cannot be wrong. However, sometimes the compiling program will ignore the same output status, as shown in the figure.
MPS
MRD
MPP MPP
MPS
S
SET S S SET S SET (^) S
S S S
RET
S S
M
RET
S S
RET
S S
X
X
See step ladder instructions [STL], [RET] in Ch. 4 for the structure of the ladder diagram.
DVP-PLC Application Manual 1-
Ladder Diagram
X0 X2 X X M
C
Y SET S
M2 Y
M
X Y SET S
S S
X Y SET S
S S
SET S SET S
X Y SET S
S11 S
X S RET
S S S S S S
X CNT C0 K X M C X M
RST C
M M
END
OR block
ANI Multiple outputs
OR block Seriesconnection blcok AND block Parallel connection block The output will continue following the status of
Step ladder Start Status working item and step point transfer Withdraw S10 status Withdraw X11 status Status working item and step point transfer
Withdraw S11 status Withdraw X12 status Status working item and step point transfer Bifurcation convergence Status working item End of step ladder and step point transfer Return
Read C
Multiple outputs
End of program
Status S0 and X10 operation
Fuzzy Syntax The correct ladder diagram analysis and combination should be conducted from up to down and left to right. However,
1-12 DVP-PLC Application Manual
1-14 DVP-PLC Application Manual
omitted), from left to right horizontally, one row after another from up to down. See bellows for the frequently seen incorrect diagrams:
OR operation upward is not allowed.
Re ver se fl ow
“Reverse flow” exists in the signal circuit from the beginning of input to output.
The up-right corner should output first.
Combining or editing should be done from the up-left to the bottom-right. The dotted-lined area should be moved up.
Parallel operation with empty device is not allowed.
Empty device cannot do operations with other devices.
No device in the middle block.
Devices and blocks in series should be horizontally aligned.
Label P0 should be in the first row of a complete network.
Blocks connected in series should be aligned with the upmost horizontal line.
When a series block is connected to a parallel block in series, place the block in the front to omit ANB instruction. Ladder diagram complied into instruction LD X LD X OR X
X0 X X
ANB Ladder diagram complied into instruction LD X OR X
X1 X X AND X
When a single device is connected to a block in parallel, place the block on top to omit ORB instruction. Ladder diagram complied into instruction LD T LD X AND X
T X1 (^) X
Ladder diagram complied into instruction LD X T0 AND X
In diagram (a), the block on top is shorter than the block in the bottom, we can switch the position of the two blocks to achieve the same logic. Due to that diagram (a) is illegal, there is a “reverse flow” in it. Ladder diagram complied into instruction LD X OR X AND X LD X AND X
X X1 X X3 X (a) ORB Ladder diagram complied into instruction LD X AND X LD X OR X AND X
X
X1 X
X3 X
(b) ORB
DVP-PLC Application Manual 1-