We all know that Modbus is an open communication protocol with two serial transmission modes, ASCII and RTU.
S7-200 supports Modbus RTU communication protocol in two ways:
The communication port 0 (Port 0) on the S7-200 CPU supports Modbus RTU slave mode through the instruction library;
The communication ports 0 and 1 (Port 0 and Port 1) on the S7-200 CPU support Modbus RTU master mode through the instruction library.
The RS485 half-duplex communication is realized on the S7-200 CPU communication port, and the free port function of S7-200 is used. In other words, the free port mode of the S7-200 CPU communication port realizes the Modbus communication protocol.
Here comes the question: What should I do in my project?
The ready-made instruction library not provided by Siemens requires the user to program in the free port mode.
Three points of attention:
The function of the Modbus RTU master instruction library is realized by calling pre-programmed program function blocks in the user program. The library is valid for Port 0 and Port 1. The instruction library will set the communication port to work in free port mode.
The Modbus RTU master station instruction library uses some user interrupt functions. When editing other programs, you cannot disable interrupts in the user program.
The Modbus RTU master library has requirements for the version of the CPU. The CPU version must be 2.00 or 2.01.
Power Cables,Ac Power Cord,Long Extension Cord,Waterproof Extension Lead
TRANCHART Electrical and Machinery Co.,LTD , https://www.tranchart-electrical.com