Professional Documents
Culture Documents
02 - Basic Training TIA Portal - Part 1 S7-1200 PLC - V2024-02 - Costomer
02 - Basic Training TIA Portal - Part 1 S7-1200 PLC - V2024-02 - Costomer
SIMATIC S7-1200
www.siemens.com/s7-1200
บทนำ
ขอแสดงความนับถือ
Basic training : TIA Portal Step 7 Basic
• An overview 3
• SIMATIC S7-1200 7
• Introduction to Step 7 Basic (TIA Portal) 29
• Programming procedure 40
• Basic programming 1 71
• Basic programming 2 79
• PLC Concept & Programming concept 91
• Technical note 123
Legal information (1/2)
Legal information (2/2)
Our comprehensive offering
for the manufacturing industry
Our comprehensive offering
for the manufacturing industry
TIA Portal
TIA Portal
STEP7 WinCC
(PLCs) (HMIs)
STEP7 Professional
STEP7 Basic
S7-1200 ET200SP CPU Open controller S7-1500 C S7-1500 S7-1500 T S7-1500 F S7-1500 R/H
Performance and Flexible for Machine and Manufacturer
Kinematic functions
with conveyor tracking
Gearing 1)
Output cams
Measuring input
SIMATIC S7-1200
Basic Controller
The compact device that offers simple
engineering with the TIA Portal
S7-1200 Overview
Trial Download
TIA Portal V19
https://support.industry.siemens.com
Apple iOS
Android
Totally Integrated Automation Portal
Powerful system functions are the real time savers
Engineering
• Enhanced usability through
e.g. drag&drop or cross references
PLC HMI IO IPC Motion NET
• Generate system diagnostics automatically
• Integrated security
TIA Portal
Functions
Efficient
• Trace functions
Database
Common
Flexible integration
Innovative design Versatile
into all network
and easy operation diagnostics
structures
Technology
Safety Integrated
Integrated
Advantages at a glance
• Optimum integration of the safety functions into the overall sequence of
production processes
• Efficient engineering in the TIA Portal
• Savings can be made even with just using a few safety features
SIMATIC S7-1200 Controller
SIMATIC S7-1200
PROFINET
communication I-Device OPC UA
4. Technology Integrated
Protection against unauthorized code or process value changes ensures higher availability during
operation. Know-how protection, copy protection and access protection prevent opening and duplicating of
blocks by unauthorized persons and protect your algorithm or process. These security functionalities are
integrated in the S7-1200 and in the TIA Portal.
Efficient error analysis and rapid error localization with the new uniform display concept, reduces the
commissioning times and minimizes the production downtimes.
SIMATIC S7-1200 offers a diagnostic functionality integrated in the system without further programming.
A uniform display concept makes it possible to visualize error messages identically as plain text information
in the TIA Portal, on the HMI and on the web server.
7. Safety Integrated
➢The SIMATIC S7-1200 controller generation has been expanded by the fail-
safe CPUs. The fail-safe CPUs are suitable for standard and Safety
applications in machine and plant automation.
➢The S7-1212 FC, S7-1214 FC and S7-1215 FC have also been added to the
series of fail-safe CPUs.
➢The S7-1212, S7-1214 and S7-1215-F fail-safe controllers together with the
fail-safe signal modules are certified for functional safety according to
EN 61508 (version 2010) and are suitable for use in safety-related applications
up to SIL 3 according to IEC 62061 and PL e according to ISO 13849.
2. Signal board or
Communication
board
3. Signal Module
for I/O expansion
(up to 8 : depended on model)
4. Communication 1. Main unit
(10 DIO, 14 DIO, 24 DIO
Module (up to 3) depended on model)
Easy PLC selection thanks to an optimized Portfolio
SIMATIC S7-1200
14 DI, 10 DQ, 2 AI
CPU1215C, CPU1217C
2 AQ
CPU1215C, CPU1217C
2 Ethernet ports
CPU1215C CPU1217C
*** 2 AI are for voltage
SIMATIC S7-1200 : Local station
S7-1200 :
S7-1200 : CPU1212C
CPU1211C
6 DI, 4 DQ, 2 AI 8 DI, 6 DQ, 2 AI
Board
Board
3 CM 3 CM 2 SM
14 DI, 10 DQ, 2 AI
S7-1200 : CPU1214C, CPU1215C, CPU1217C
6 : HSC
CPU1215C, CPU1217C
2 AQ
CPU1215C, CPU1217C
2 Ethernet ports
3 CM Board 8 SM
SIMATIC S7-1200 : Distributed I/O
SIMATIC S7-1200
IO Controller 1. สามารถต่อ IO Device ได้มากสุด 16 Devices
(ทั้งนี้จานวนจะลดลง หากมีการใช้งาน network อื่นๆร่ วมด้วย)
2. สามารถใช้งาน Sub-Module ได้สูงสุด 256 Sub-Modules (นับทั้ง 16 Devices รวมกัน)
• Count 5 Sub-Modules for each station
PROFINET
• (IM = 4 Sub-Modules, Server module = 1 Sub-Module)
1 2 3 16
MRP Ring (Ethernet redundant)
S7-1200 : Processor
ชนิด DI
ใช้ PTO
เลือก DC
ชนิด DO
S7-1200 : Board (CB : Communication Board, SB : Signal Board)
S7-1200 : Communication Module (CM), Communication Processor (CP)
S7-1200 : Signal Module (SM)
S7-1200 : Engineering framework
FW4.4
Digital Input
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
TIA Portal
Siemens provides a unique engineering framework for automation
System requirements
1 (ความต้ องการของระบบ)
Software Environment
2
(ส่ วนประกอบของโปรแกรม)
1.1 System requirements "SIMATIC STEP 7 Basic"
SIMATIC STEP 7
Basic/Professional V19 and
SIMATIC WinCC V19
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
2. Programming Procedure
2. Hardware Configuration
Portal view
จากนั้นจะปรากฏหน้าต่าง First steps ขึ้นมาให้ท่าน
เลือก Open the Project View หรื อ Project view ที่มุม
ล่างซ้ายของหน้าต่าง
Project view
a
เปิ ด Project view
c Press Alt + F7
b
Activate trial license
เลือกรหัสของอุปกรณ์ให้ถูกต้อง
(ตัวอย่างการดูรหัสอุปกรณ์ในหน้าถัดไป)
เลือก Version ของ
ดับเบิลคลิก Add new device firmware ของอุปกรณ์
คลิก OK
2.1 Create the User Program (สร ้ำงโปรเจคไฟล ์)
่
Click Finish เพือ
้ั ำ
ยืนยันกำรตงค่
PLC Security settings with security wizard
่ มต
Click เพือเริ ่ งค่
้ั ำโดย
ใช้ Security wizard
2.2 Hardware Configuration : Using hardware catalog
Hide
Up to 3 Communication Modules
2.2 Hardware Configuration : Upload from the unit
1 4
2
6
3 5
7 7
9
2.2 Hardware Configuration : Upload from the unit
11
12
13
10
Check to flash LED
14
Manual hardware configuration
2.2 Hardware Configuration : Setting IP address and Subnet mask
Double click to
open Device view
1
Click ที่ CPU
2
3
ระบุ IP address ที่เราต้องการลงไปพร้อม
4 5 ทั้ง subnet mask
ระบุ IP address ของ Router ลงไป กรณี ที่
6 ใช้ Router
2.2 System and clock memory
System and clock memory เป็ น memory ที่ทางานเป็ นค่าคงที่ของระบบ เช่น M1.2 จะ ON
ตลอดเวลา และ M1.3 จะ OFF ตลอดเวลาเป็ นต้น ส่วน Clock memory ก็จะให้ Output เป็ น
สัญญาณนาฬิกาที่ความถี่ต่างๆกัน ดังรู ป
Clock memory
10 Hz 100 ms
5 Hz 200 ms
2.5 Hz 400 ms
2 Hz 500 ms
1.25 Hz 800 ms
1 Hz 1 Sec
0.625 Hz 1.6 Sec
0.5 Hz 2 Sec
2.2 Date and Time
Blank block
Open branch
Close branch
Main [OB1]
OB : Organization Block ซึ่ง program cycle OB หมายเลข 1 นี้จะถูกสร้างขึ้นอัตโนมัติ พร้อมตั้งชื่อ default ให้ “Main”
ซึ่งจัดเป็ น Cyclic program processing ที่จะมวลผลวนเป็ นรอบๆตามรอบการทางานของ CPU ทั้งนี้เราสามารถสร้าง
OB ประเภทนี้เพิม่ ได้ เพื่อแยกการทางานแต่ละส่วน “Modularization of PLC programs”
Sample 1 : Self holding
กด Compile Project
คลิกขวาที่ CPU
กด Download
ระบุ interface type
่ี มี PLC จริงในการทดสอบ
ในกรณี ทไม่
สามารถเรียกใช ้งาน Simulation ได ้ คลิก Target device (PLC)
้
ตามขันตอน 2.8
Flash LED คลิก Start search
6
คลิก Load
2.6 Download to PLC
คลิก Load 8
คลิก Finish 10
2.7 Monitoring Online
2.8 Simulation
9
เลือก Start module 10
คลิก Load
11
คลิก Finish
ไฟสถานะจะเปลื่ยนเป็ นสี เขียว
แสดงว่าพร้อมใช้งาน
2.8 Simulation
คลิก Create 4
2.8 Simulation
6
คลิก Load project tags
5
ดับเบิ้ลคลิก SIMtable_1
7
2.8 Simulation
3 คลิกเพื่อแบ่งหน้า
7
คลิก Yes
5
ป้ อนสถานะ จากนั้นติ๊กเครื่ องหมายถูก
Stop Force Value
2
คลิก Yes
2.9 Save Project
กรณีใช้ TIA Portal V16 หรือ V18 ไฟล์ นามสกุล .ap16 หรือ .ap18
A-1 Archiving and Retrieving Project
1. กด Retrieve
2. เลือกที่อยูข่ องไฟล์ Archive ที่จะเปิ ดว่าจะบันทึกไว้ที่ใด ไฟล์จะมี
นามสกุลเป็ น .zap14
3. กด Open
4. เลือกที่อยูท่ ี่จะแยกไฟล์ออก
5. กด OK
A-2 Convenient tools : Floating working area
เช่นเดียวกัน ให้ท่านกด Float ที่ Main OB ด้วยเพื่อที่จะทาการ Drag & Drop I/O
A-2 Convenient tools : Drag & Drop
ใน CPU S7-1200 นั้นจะไม่มี Physical switch ที่จะ STOP – RUN เหมือนรุ่ นอื่นดังนั้นสามารถใช้การ
STOP - RUN ได้ใน CPU Operator Panel เท่านั้น
Contents
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
3. Basic programming 1 : Bit operant
NO
NC
AND
OR
Set
Ptrig
3.1 NO (Normally Open)
Absolute Address
Symbolic name
3.2 NC (Normally Close)
Absolute Address
Symbolic name
3.3 AND
Absolute Address
Symbolic name
3.4 OR
Absolute Address
Symbolic name
3.4 SET
Absolute Address
Symbolic name
3.6 Trig : Ptrig & Ntrig
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
4. Basic programming 2 : Word operant
Timer
Counter
Compare
Mathematic Function
Convert data
4.1 Timer
ตั้งชื่อสาหรับ Instance DB
คลิ้ก OK
ตัวอย่าง
กาหนดค่า PT แบบคงที่
PT = 700 ms ➔ T#700ms
PT = 5 Sec ➔ T#5s
PT = 10 Minute ➔ T#10m
PT = 8 Hour ➔ T#8h
PT = 5 Day ➔ T#5d
การกาหนดค่า เวลาสาหรับ PT นั้น อาจกาหนด
PT = 1hr, 45min, 30sec, 15ms
เป็ นค่าคงที่หรื อผ่านตัวแปรชนิด Time ➔ T#1h_45m_30s_15ms
Exercise – 2.1 : Timer (TON, TOF)
ตั้งชื่อสาหรับ Instance DB
คลิ้ก OK
การกาหนดค่า สาหรับ PV นั้น อาจกาหนดเป็ นค่าคงที่
เป็ นเลขจานวนเต็มหรื อ ผ่านตัวแปรชนิด Integer
Example : Timer & Counter
3) จนได้เวลาที่กาหนด
(ตัวอย่างกาหนดไว้ 5 วินาที)
4) %Q0.0 turn on
ค่าผลลัพธ์
เพิม่ ตัวแปร
ตัวแปร
Exercise – 3 : Calculation
Real
Click Modify
ป้ อนค่าที่ตอ้ งการ
Click OK
(100.0+10.0)x(15.0-5.0) =1100
Data type
I3.7 I3.6 I3.5 I3.4 I3.3 I3.2 I3.1 I3.0 I2.7 I2.6 I2.5 I2.4 I2.3 I2.2 I2.1 I2.0 I1.7 I1.6 I1.5 I1.4 I1.3 I1.2 I1.1 I1.0 I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0
I0.7 I0.6 I0.5 I0.4 I0.3 I0.2 I0.1 I0.0 0 IB0 IW0 ID0
Memory I1.7 I1.6 I1.5 I1.4 I1.3 I1.2 I1.1 I1.0 1 IB1
I2.7 I2.6 I2.5 I2.4 I2.3 I2.2 I2.1 I2.0 2 IB2 IW2
I Q M I3.7 I3.6 I3.5 I3.4 I3.3 I3.2 I3.1 I3.0 3 IB3
I4.7 I4.6 I4.5 I4.4 I4.3 I4.2 I4.1 I4.0 4 IB4 IW4 ID4
0 0 0
I5.7 I5.6 I5.5 I5.4 I5.3 I5.2 I5.1 I5.0 5 IB5
1023 1023 xxx Bytes I6.7 I6.6 I6.5 I6.4 I6.3 I6.2 I6.1 I6.0 6 IB6 IW6
I7.7 I7.6 I7.5 I7.4 I7.3 I7.2 I7.1 I7.0 7 IB7
Memory
Analog signal module จะอ่านค่าจาก input หรื อส่ง output ที่มีช่วง ±10 V, ±5 V, ±2.5 V, 0 – 20 mA , or 4 - 20 mA ซึ่งการ
คานวณก็จะนาค่า Analog input value มา scaling กับ Engineering units ซึ่ง Analog input value นั้นมีช่วงระหว่าง -27648 ถึง
27648 ซึ่งตัวอย่างด้านล่างได้แสดงการ scaling อุณหภูมิ โดยที่ Analog input value มีช่วงระหว่าง 0-27648 Engineering units
มีช่วงระหว่าง 50-100 องศาซลเซียส
4 mA 0%
X Y
20 mA 27648 100%
(X – 0) (Y – 50) (X-0) * (100-50)
= Y = 50 + (27,648-0)
(27,648 – 0) (100 – 50)
4.7 Processing of analog values
AI
Depended on Depended on
specification engineering
value
4.7 Processing of analog values
Analog Input / Output for CPU unit
Analog Input / Output for Signal module (SM 1231, SM 1232)
AI
AO
Analog Input / Output for Signal module (SM 1234)
Note : Using analog
%IW66
Contents
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
5. PLC Concept & Programming Concept
PLC concepts
Programming concepts
5.1 PLC concepts
Functions (FC) Functions contain program routines for recurring tasks. They have no
"memory".
Function blocks (FB) Function blocks are code blocks that store their values permanently in
instance data blocks, so that they remain available even after the block
has been executed.
Instance data blocks (DB) Instance data blocks are assigned to a function block when it is called
for the purpose of storing program data.
Global data blocks (DB) Global data blocks are data areas for storing data that can be used by
any blocks.
5.1.4 Organization blocks
ตัวเลข OB
5.1.4 Organization blocks : Startup OB
Startup OB
Startup OBs execute one time when the operating mode of the CPU changes from STOP to RUN, including
powering up in the RUN mode and in commanded STOP-to-RUN transitions. After completion, the main
"Program cycle" begins executing.
Cyclic interrupt OB
Cyclic interrupt OBs execute at a specified interval. You can configure up to a total of four cyclic interrupt
events, with one OB corresponding to each cyclic interrupt event.
5.1.4 Organization blocks
Hardware interrupt OB
Hardware interrupt OBs execute when the relevant hardware event occurs. A hardware interrupt OB interrupts
normal cyclic program execution in reaction to a signal from a hardware event.
Limits on hardware interrupt events are as follows: HSC events:
Edges: ● CV=PV: maximum of 6
● Rising edge events: maximum of 16 ● Direction changed: maximum of 6
● Falling edge events: maximum of 16 ● External reset: maximum of 6
Time error interrupt OB
If configured, the time error interrupt OB (OB 80) executes when either the scan cycle exceeds the maximum
cycle time or a time error event occurs. If triggered, it executes, interrupting normal cyclic program execution or
any other event OB.
The occurrence of either of these events generates a diagnostic buffer entry describing the event. The diagnostic
buffer entry is generated regardless of the existence of the time error interrupt OB.
Scan cycle exceeds maximum cycle time CPU cannot start requested OB Queue overflow occurred
Exercise – 4 : Startup OB
5.1.5 Operating system
Update PIO Update PII OB1 Update PIO Update PII OB1
ไม่มี Interrupts
5.1.6 OB Execution : With interrupts
่ กตังค่
Interrupt OB ซึงถู ้ าให ้
Cyclic Interrupts ประมวลผลทุกๆรอบเวลา เช่น 50 ms
OB30
Cyclic time
0 ms 50 ms
Exercise – 5 : Cyclic Interrupt OB
Cycle time
The cycle time is the time that the operating system requires
to execute the cyclic program and
all the program sections that interrupt this cycle. The program
execution can be interrupted by:
• Time errors and 2xMaxCycleTime errors
• System activities, e.g., process image updating
The cycle time (Tcyc) is therefore not the same for every cycle.
The following schematic shows an example of different cycle
times (TZ1 ≠ TZ2) for S7-1200 CPUs:
SIMATIC STEP 7
Basic/Professional V19 and
SIMATIC WinCC V19
System Manual
5.1.6 OBs priority
STEP 7 ท่านสามารถสร้าง tags สาหรับ address ของข้อมูลซึ่ งเกี่ยวข้องกับ address ของ memory โดยจะแบ่งข้อมูลออกเป็ นดังนี้
1. Global memory →สาหรับเก็บ memory ของ Inputs ,Outputs และ memory Blocks ทุกBlocks สามารถเข้าถึงได้นาไปใช้ได้
2. PLC tag table → ท่านสามารถใส่ symbolic names ใน tag table นี้ กาหนดที่อยูใ่ ห้กบั memory และก็จะเป็ น global tag ในโปรแกรมซึ่ง
ท่านสามารถใช้ symbolic names ในการเรี ยกเพื่อใช้งาน tag ได้เลย
3. Data block (DB) → ท่านสามารถเพิ่ม DBs ในโปรแกรมของท่านได้เพื่อที่จะใส่ขอ้ มูลสาหรับ block ที่มีการคานวณ ซึ่ งข้อมูลนั้นก็ยงั อยู่
ใน DB แม้วา่ block ที่ได้ใช้ขอ้ มูลจาก DB นี้ ได้ทางานไปแล้ว ซึ่ ง DB จะมีอยู่ 2 ประเภทคือ
I. Global DB ซึ่ง block ทุก block สามารถเข้ามาใช้งานได้
II. Instance DB เป็ น DB เฉพาะของแต่ละ FB ซึ่ งมีไว้ใส่ parameter ของ FB นั้นเอง
4. Temp memory → มีไว้เพื่อเก็บ block ที่เรี ยกมา execute ถ้าทาเสร็ จแล้วก็จะนาไปเก็บไว้ที่อื่น แล้วนา block ต่อไปมา execute ต่อ
5.1.9 CPU memory
● Load memory is non-volatile storage for the user program, data and configuration. When you
download a project to the CPU, the CPU first stores the program in the Load memory area. This area
is located either in a memory card (if present) or in the CPU. The CPU maintains this non-volatile
memory area through a power loss. The memory card supports a larger storage space than that built-
in to the CPU.
● Work memory is volatile storage for some elements of the user project while executing the user
program. The CPU copies some elements of the project from load memory into work memory. This
volatile area is lost when power is removed, and is restored by the CPU when power is restored.
● Retentive memory is non-volatile storage for a limited quantity of work memory values. The CPU
uses the retentive memory area to store the values of selected user memory locations during power
loss. When a power down or power loss occurs, the CPU restores these retentive values upon power
up.
5.1.10 Diagnostics buffer
CPU จะมี buffer สาหรับ diagnostics เพื่อเก็บ event ที่เกิดขึ้นโดยจะแบ่งเป็ น เกิด event อะไรขึ้น
เวลาไหนวันไหน เป็ น event แบบไหนและจะมีคาอธิบายสาหรับแต่ละ event ว่าเกิดอะไรขึ้น โดย
แต่ละ event จะเรี ยงลาดับก่อนหลังโดยจะเก็บได้มากสุด 50 อับดับถ้าเกินกว่านี้ อันดับเก่าๆจะ
หายไปอันดับใหม่จะมาแทนที่ เช่น CPU errors , Module errors ,START , STOP and RUN
5.1.11 Configuring the outputs on a RUN-to-STOP transition
เป็ นการตั้งค่าเมื่อ CPU จะเปลี่ยนสถานะจาก RUN ไปยัง STOP ว่าจะให้ CPU คงค่าอะไรไว้
1. Keep last value ค้างค่าล่าสุดที่ได้ประมวลผลไว้
2. Use substitute value ให้ใช้ค่าที่กาหนดไว้
5.2 Programming concepts
Programming language
5.2.1 Structuring your user program
การสร้างโปรแกรม
• Organization Block (OB)
เป็ นการทางานในรู ปของ event ที่เจาะจงและสามารถ interrupt user program ได้ ซึ่งจะเรี ยกได้วา่ OB คือการ
ทางานหลักของ CPU ส่วน FB FC คือฟังก์ชนั ย่อยเหมือน block ให้ OB เรี ยกมาใช้
• Function Block (FB)
คือการเขียนฟังก์ชนั การทางานย่อย หรื อ Subroutine เป็ นเหมือนการกาหนด Block ขึ้นมาเอง เพื่อให้ OB ได้
เรี ยก Block ที่เราสร้างขึ้นนี้ไปใช้งานซึ่งจะมี instance DB ไว้เพื่อเก็บค่าพารามิเตอร์ส่วนตัวด้วย
• Function (FC)
คล้ายๆกันกับ FB แต่จะไม่มี instance DB เป็ นของตัวเอง จึงใช้ global DB ในการเก็บข้อมูล
5.2.2 FB and Instance DB
ตั้งชื่อ FB
2
1
ประกาศตัวแปรใน FB
สร้าง FB เลือกโปรแกรม 3
ภาษาที่จะใช้
โปรแกรมใน FB
5.2.2 FB and Instance DB
M2
M2
M2
M2
5.2.2 Using blocks to structure your program
You can nest the block calls for a more modular structure. In the following example, the nesting depth is 3:
the program cycle OB plus 3 layers of calls to code blocks. ใน OB1 เรี ยก FB1 มา
ใช้งานพร้อมกับ
Instance DB (DB3)
Main [OB1]
FB
Instance DB
2
1 ประกาศตัวแปรต่างๆ พร ้อม
กาหนด Data type
สร ้าง Function
้ อ่
block พร ้อมตังชื
่
เขียนเงือนไข หรือ
โปรแกรม
Control Motor 2, 3 and 4
4 เรียก Function
block มาใช ้งาน
6
5
้ อ่ Instant Data
ตังชื
Block ให้สอดคล ้อง
5.2.3 Programming language
• การเพิ่ม SCL นั้น เราสามารถคลิกขวาที่ Network ล่าสุดแล้วเลือก Insert SCL network ได้ทนั ที
Exercise – 7.1 : SCL
• ซึ่งจะเห็นได้วา่ ตัวแปร sum และ i นั้น เราพิมพ์ข้ ึนมาลอยๆเอง แต่ยงั ไม่ได้เชื่อมกับ tag ใดๆของ PLC จึงทาให้โปรแกรมยังมี error
อยู่ ดังนั้นในขึ้นตอนต่อไปเราจะทาการ Define tag ให้กบั ตัวแปร sum และ i ซึ่งหลักการก็เหมือนขั้นตอนการ Define tag ตอนทา
ladder ทุกประการ
Exercise – 7.1 : SCL
• เนื่องจากตัวแปร i เป็ นตัวแปรที่เอาไว้วนลูปเท่านั้น เราสามารถใช้เป็ น Local Temp ได้เพราะแม้วา่ จะมีการเคลียร์ ค่าทุกๆ scan cycle
ก็ไม่ได้กระทบอะไรกับการทางาน
Exercise – 7.1 : SCL
• TIPS : เราไม่จาเป็ นต้องจาคาสัง่ ต่างๆของ SCL เช่น FOR..TO..DO หรื อ WHILE..DO หรื อ IF..THEN..ELSE เป็ นต้น เพราะ
สามารถลากจาก Program control operations มายัง Network ได้เลย
Exercise – 7.2 : SCL
สมมติว่าให้เป็ นค่าที่อ่านมา
ได้จาก sensor โดยอ่านเป็ น
Array จานวน 5 ค่า
Exercise – 7.2 : SCL
4
3
Contents
Programming Procedure
Basic programming 1
Basic programming 2
Technical note
Appendix
6.1 Program information
6.2 Set PG/PC Interface
4
Depended on your network adapters
6.3 Backup PLC Station
2
Create new project
4
Backup PLC Station
5 6
3
2
5
6.5 Set time to PLC
• เลือกที่ Take from PG/PC แล้วกดปุ่ ม Apply ก็จะนาเวลาจากคอมพิวเตอร์ มาเขียนลงให้ PLC ทันที
6.7 Update firmware
3
1
4
2
Click เพือ่ เลือก update file
Update firmware
7
6
9
6.7 Web Server
3 4
Web Server: Secure communication
Web Server: User management
5. เพิ่มชื่อผูใ้ ช้งาน
6. กาหนดสิ ทธิ์สาหรับแต่ละ
ผูใ้ ช้งาน
7. ตั้งระหัสผ่านสาหรับแต่ละ
ผูใ้ ช้งาน
5 6 7
Setting password
Add user Setting
for user
authorized
user
Web Server: User management
เพิ่มผูใ้ ช้งาน
3. Setting Password
6
กาหนดสิ ทธิ์ในการใช้งาน
Web Server: Default web pages
ข้ อมูลและรายละเอียดของ fault
2
Watch Table: using in Web Server
4. กาหนดสิ ทธิ์ในการใช้งาน
3 4
2
Watch Table: using in Web Server
พิมพ์ค่าที่ต้องการแก้ ไข
แล้ วกด GO หรือ Apply
(ในกรณีที่ต้องการแก้ ไข
หลายข้ อมูลพร้ อมกัน)
Watch Table: using in Web Server
6.10 Maintenance concept using Memory card
Drag &
3
Drop
คลิ้กขวาแล้วเลือก Properties 2
5 ปิ ดไฟที่จ่ายให้ PLC
6 ใส่ Card ในช่อง MC
C
o
n
t
a
c
t
p
a
g
e
https://support.industry.siemens.com
TIA Selection Tool cloud
TIA Portal - An Overview of the Most Important Documents
and Links - Controller
Downloads / Updates for TIA Portal Downloads / HSP for S7-1200/ S7-1500
Download
SIMATIC Automation Tool
PRONETA
Commissioning and diagnostics tool for PROFINET networks
Entry type: Application example, Entry ID: 67460624, Entry date: 02/03/2016
Technical information
https://support.industry.siemens.com/cs/sc/3058/important
-issues-at-a-glance?lc=en-US
https://support.industry.siemens.com
2. Type product
3. Click to search
6. Save file
Sales status and Technical data