Siemens S7-200 series PLC and PC communication program flow chart and working process

Publisher:Qinghua2022Latest update time:2023-03-31 Source: elecfansKeywords:Siemens Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the above communication mode, since only two wires are used for data transmission, the hardware handshake signal cannot be used as a detection method. Therefore, when a bit error occurs in the communication between the PC and the PLC, it will not be possible to determine whether a bit error occurs through hardware, or when the operating speeds of the PC and the PLC are different, a conflict will occur. These communication errors will cause the PLC control program to not work properly, so software handshake must be used to ensure the reliability of communication.


Since the communication is coordinated between the PC and PLC, the communication programs in the PC and PLC must also be coordinated with each other, that is, when one party sends data, the other party must be in the state of receiving data. Figures 7-18 and 7-19 show the communication program flows of the PC and PLC respectively.

6808bb46-a97c-11ed-bfe3-dac502259ad0.png

Figure 7-18 PC communication program flow chart

6827faa6-a97c-11ed-bfe3-dac502259ad0.png

Figure 7-19 S7-PLC communication program flow chart

The working process of the communication program: Before sending each byte, the PC first sends a handshake signal. After receiving the handshake signal, the PLC transmits it back to the PC. The PC starts to send a byte of data only after receiving the handshake signal sent back by the PLC. After receiving this byte of data, the PLC also transmits it back to the PC. The PC compares the original data with the data sent back by the PLC. If the two are different, it means that a bit error occurred in the communication, and the PC resends the byte of data; if the two are the same, it means that the data received by the PLC is correct, and the PC sends the next handshake signal. After receiving this handshake signal, the PLC stores the previously received data in the specified storage area. This working process is repeated until all data transmission is completed.


After adopting software handshake, no matter how far the speed of PC and PLC differs, the sender will never be ahead of the receiver. The disadvantage of software handshake is that it greatly reduces the communication speed, because each byte must be transmitted back and forth twice on the transmission line, and the handshake signal must also be transmitted. However, considering the reliability and time requirements of control, sacrificing a little speed is worthwhile and feasible.


The communication program of PLC is only a small part of the whole control program of PLC. The communication program can be compiled into the interrupt program of PLC. When PLC receives the data sent by PC, it processes the received data in the interrupt program. The communication program of PC can adopt VB, VC and other languages, or directly adopt Siemens special configuration software, such as STEP7 and WinCC.


Keywords:Siemens Reference address:Siemens S7-200 series PLC and PC communication program flow chart and working process

Previous article:Operating Characteristics of Switched Reluctance Motor
Next article:Reasons and treatment methods for DC motor speed lower than rated value

Recommended ReadingLatest update time:2024-11-15 09:54

Siemens launches HEEDS AI Simulation Predictor and Simcenter Reduced Order Modeling solutions
Siemens launches HEEDS AI Simulation Predictor and Simcenter Reduced Order Modeling solutions • Siemens’ HEEDS AI Simulation Predictor solution helps enterprises leverage the benefits of digital twins to achieve product optimization through AI technology with built-in accuracy awareness • Deliver innovative, high-
[Industrial Control]
Siemens launches HEEDS AI Simulation Predictor and Simcenter Reduced Order Modeling solutions
Reasons why PLC does not work after a thunderstorm
There are many possible reasons why your PLC stops working after a thunderstorm. Here are some suggestions and steps to diagnose and solve the problem: 1. Check the power supply Reason: PLC equipment requires a stable power supply. Thunderstorms may cause power supply problems such as voltage fluctuations,
[Embedded]
Siemens and Schaeffler collaborate on intelligent diagnostics for drive systems
On May 11, Siemens and automotive parts supplier Schaeffler collaborated to perform intelligent diagnosis of drive systems. Through this cooperation, Siemens combined its IIoT (Industrial Internet of Things) platform Sidrive IQ with Schaeffler's decades of experience and expertise in bearing design, manufacturing and
[Automotive Electronics]
Siemens and Schaeffler collaborate on intelligent diagnostics for drive systems
Analysis of the similarities and differences between single-chip microcomputer and PLC in industrial applications
Single-chip computers and PLCs are widely used in industry. Because of their different characteristics, their working focuses are also different. Let's take a look at the similarities and differences between single-chip computers and PLCs in industrial applications. About single-chip computers Single-chip computers a
[Microcontroller]
Using 51 single chip microcomputer to make simple PLC
       Recently, I downloaded a PMW-HEX software from the 51hei MCU forum. This software can convert the ladder diagram written by Mitsubishi PLC programming software into a HEX file, and then burn this HEX file to the 51 MCU, so that the 51 MCU has the function of ladder diagram programming. I think it is quite intere
[Microcontroller]
Using 51 single chip microcomputer to make simple PLC
Introduction to Siemens S7-GRAPH programming language
Industrial production processes are often logically divided into multiple steps. When certain conditions are met, the production process jumps from one step to another. These steps constitute the "production process". For example, the production process of juice generally includes: cleaning → beating → juicing → coa
[Embedded]
Introduction to Siemens S7-GRAPH programming language
PLC requirements for frequency converter controllers How to use PLC to control frequency converters
In our actual projects, frequency converters are often used, such as fan frequency conversion speed regulation, water pump frequency conversion speed regulation, conveyor frequency conversion speed regulation, etc. When using frequency converters, PLC is usually used to control the frequency converter. PLC usually u
[Embedded]
PLC requirements for frequency converter controllers How to use PLC to control frequency converters
ON Semiconductor Innovative Smart Meter Power Management and Robust PLC Solutions
    Today, when green energy is being vigorously advocated, I believe everyone is familiar with "smart meters". Smart meters play an important role in promoting sustainable development of resources. With the active deployment of governments of various countries, smart meters are rapidly replacing traditional meters.
[Industrial Control]
ON Semiconductor Innovative Smart Meter Power Management and Robust PLC Solutions
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号