Description
1747-BA PLC Lithium Battery
The communication function of 1747-BA is very powerful, and there are many kinds of communication methods for users to choose, including single-master method, multi-master method, and remote communication method using modem. This project selects the communication hardware pc/ppi cable supported by step7-micro/win32, which supports baud rates of 9.6kbps and 19.2kbps, and the supported protocol is the ppi protocol, which is the point-to-point interface protocol based on the open system interconnection model osi. ppi is a master/slave protocol, and the s7-200 cpu on the network are all slaves, and the other cpu, simatic programmer or td200 are master.
The communication port of the 1747-BA cpu uses the connection port of the rs-485 signaling standard, and the pc/ppi cable connects the s7-200 computer to the s7-200 cpu. By using commands such as receive interrupt, send interrupt and character interrupt, free port communication can control the operation mode of the s7-200 cpu communication port. This project uses free port mode, which allows communication port 0 to use free port mode when the cpu is in run mode. by setting the value of smb30, we can select the baud rate, parity, data bits per character and protocol.
When 1747-BA is in STOP mode, it stops the free port communication, and the communication port is forced to convert to ppi protocol mode, at this time, we can input the plc program into the cpu, and realize the programming and control function of the programming software to the plc. The communication process here adopts the master-slave mode, i.e., the computer is the host and the plc is the slave, and only after the host computer sends the request message, the slave plc returns the data in the transmit buffer to the pc.