Several questions about Siemens 200PLC programming

1. Why use a PC/PPI interface? Because the S7200 CPU uses RS485, and the COM port of the PC uses RS232, the electrical specifications of the two are not compatible, and the intermediate circuit is needed for matching. PC/PPI is actually a matching cable of RS485/RS232.

2. What are the advantages of transistor output and relay output?

The transistor cannot carry AC 220V AC load and can only carry low voltage DC. Poor ability to withstand overload and overvoltage. But it can be output at high frequency, suitable for high frequency output, such as pulse control.

The relay can carry AC220V and DC loads. However, due to the nature of the relay itself, it cannot be output at high frequencies. At the same time, the life of the relay is about 100,000 times. Therefore, it is also suitable for transistors in the case of frequent switching.

3. How far is the communication port on the S7-200 CPU?

The data given in the "S7-200 System Manual" is a network segment of 50m, which is the communication distance that can be guaranteed under the network conditions that meet the specifications. Where the distance exceeds 50m, a repeater should be added. Adding a repeater can extend the communication network by 50 meters. If a pair of repeaters is added and there is no S7-200 CPU station between them (there can be EM277), the distance between the repeaters can reach 1000 meters. A very reliable communication can be achieved by meeting the above requirements.

In fact, there are users who have done communication beyond 50m without repeaters. Siemens cannot guarantee that such communications will be successful.

4. How to set the communication port parameters?

By default, the communication port of the S7-200 CPU is in PPI slave mode, the address is 2, and the communication rate is 9.6K. To change the address or communication rate of the communication port, it must be set in the communication port tab in the system block. And then download the system block to the CPU for the new settings to work.

5. What should I do if the M area address is not enough?

Some users are accustomed to using the M area as the intermediate address, but the M area of ​​the S7-200 CPU has a small address space of only 32 bytes, which is often insufficient. The S7-200 CPU provides a large amount of V area storage space, that is, user data space. The V memory area is relatively large, and its usage is similar to that of the M area, and the V area data can be accessed in bits, bytes, words, or double words. Example: V10.1, VB20, VW100, VD200, etc.

6. What are the methods of long-distance communication of S7-200?

1) RS-485 network communication: PPI, MPI, PROFIBUS-DP protocol can communicate on the RS-485 network, and by adding relay, the farthest can reach 9600 meters.

2) Optical fiber communication: In addition to anti-interference and high speed, optical fiber communication is also a great advantage in communication distance. S7-200 products do not directly support fiber-optic communication, and additional fiber conversion modules are required.

3) Telephone network: The S7-200 supports telephone network communication through the EM241 audio modem module. The EM 241 requires the end of the communication to be a standard audio telephone line, regardless of the way the interoffice communicates. Global communication is possible via the EM241.

4) Wireless communication: The communication distance of the S7-200 through the radio station depends on the frequency, power, antenna and other factors of the radio station; the communication distance of the S7-200 through the GSM network depends on the range of the network service; the communication of the S7-200 through the infrared device Also depends on their specifications

7. Which communication protocols supported by the S7-200 are public and which are not public?

1) PPI agreement: Siemens internal agreement, not public

2) MPI agreement: Siemens internal agreement, not public

3) S7 agreement: Siemens internal agreement, not public

4) PROFIBUS-DP protocol: standard protocol, open

5) USS protocol: Universal serial communication protocol for Siemens transmission, please refer to the manual of the corresponding transmission for details.

6) MODBUS-RTU (slave): public

8. How to use the high-speed input and output of S7-200?

The high-speed input and output terminals on the S7-200 CPU have the same wiring as the normal digital I/O. However, the high-speed pulse output must use a DC transistor output type CPU (ie, DC/DC/DC type).

9. Can the rotary encoder (and other sensors) of the NPN/PNP output be connected to the S7-200 CPU?

Yes. The digital input on the S7-200 CPU and expansion module can be connected to the source or sink sensor output. When connecting, just change the connection of the common terminal accordingly.

10. Method for mixing NPN and PNP sensors into 200PLC

Everyone knows that general Japanese PLCs such as Mitsubishi and OMRON generally use NPN sensors when the + signal is connected. The common end of the European PLC is generally - most of the PNP sensors are used to access the signal. Such as 200/300, etc. When the 200PLC system is used, the sensors provided are PNP and NPN. How to solve the problem?

Method 1: NPN sensor uses intermediate relay to transfer

Method 2: When designing, the input terminal [M] of 200PLC is generally connected to 24V-. In fact, 200PLC can also introduce - signal input, connect 1M to 24V+, I0.0-0.7 to NPN sensor, and 2M Connected to 24V-, the PNP sensor is connected to I1.0-1.7 so that the NPN&PNP sensor can be mixed into the PLC. The reason is very simple, 200PLC supports two kinds of signal access, and the internal two-way diode uses photoelectric isolation for signal transmission.

11. How does the high-speed counter occupy the output point?

The high-speed counter occupies the digital input point on the CPU as needed according to the defined operating mode. Each counter occupies a fixed input point in its operating mode. Input points that are not used in a mode can still be used as normal input points; input points occupied by the counter (such as external reset) are still accessed in the user program.

12. Why does the high speed counter not work properly?

The HDEF instruction is called in the program using the initial scan memory bit SM0.1 and can only be called once. Calling with SM0.0 or executing HDEF for the second time will cause an operation error and cannot change the counter setting when the HDEF instruction is executed for the first time.

13. How to address high-speed counters? Why can't I read the current count value from SMDx?

You can use HC0; HC1; HC2; HC3; HC4; HC5 to address the current value of different high-speed counters. You can also directly monitor the current value of the high-speed counter by entering the above address in the status table. SMDx does not store the current value. The count value of the high speed counter is a 32-bit signed integer.

14. How to reset the high speed counter to 0?

Select the high-speed counter with external reset mode. When the external reset input signal is valid, the high-speed counter is reset to 0. You can also use the internal program reset, that is, set the high-speed counter to the updateable initial value and set the initial value to 0. After executing the HSC instruction, the high counter is reset to 0.

15. Why does it not work when assigning initial values ​​and preset values ​​to high-speed counters, or the effect is unexpected?

The high-speed counter can change settings such as initial values ​​and preset values ​​during initialization or operation. The steps should be:

1) Set the update options for the control byte. Which setting data needs to be updated, the corresponding control position bit in the control byte (set to "1"); the corresponding control bit cannot be set without changing the setting.

2) Then send the desired value to the initial value and preset value control register

3) Execution of HSC instructions

6 Pin Automotive Connector Housing

Wenzhou Langrun Electric Co.,Ltd , https://www.langrunele.com