You are on page 1of 2

Totally Integrated

Automation Portal

mô phong chuyển động băng tải / PLC_1 [CPU 1214C DC/DC/Rly] / Program blocks
Main [OB1]
Main Properties
General
Name Main Number 1 Type OB Language LAD
Numbering Automatic
Information
Title "Main Program Sweep (Cy‐ Author Comment Family
cle)"
Version 0.1 User-defined ID

Main
Name Data type Default value Comment
Input
Initial_Call Bool Initial call of this OB
Remanence Bool =True, if remanent data are available
Temp
Constant

Network 1: Tạo xung chuyển động

%DB1
"IEC_Timer_0_DB"
%M0.1 %M0.0 TON %M0.0
"ON/OFF" "Xung" Time "Xung"
IN Q
T#1s PT ET T#0ms

Network 2: Đếm xung chuyển động

%M0.0 ADD
"Xung" UInt
EN ENO
%MW10 %MW10
"count1" IN1 OUT "count1"
1 IN2

ADD
UInt
EN ENO
%MW20 %MW20
"count2" IN1 OUT "count2"
1 IN2

Network 3: So sánh xung với số bước chuyển động

%M0.0 %MW10
"Xung" "count1"
MOVE
>
EN ENO
UInt
10 0 IN %MW10
OUT1 "count1"

Network 4: So sánh xung với số bước quay

%MW20
%M0.0
"Xung" "count2"
MOVE
>
EN ENO
UInt
2 0 IN %MW20
OUT1 "count2"

Network 5:
Totally Integrated
Automation Portal

%M0.2 %M0.0
"Reset" "Xung"
RESET_BF
MOVE 2
EN ENO
0 IN %MW20
OUT1 "count2"

MOVE
EN ENO
0 IN %MW10
OUT1 "count1"

You might also like