|
Description This sample program, contained in the project zXX21_04_PtP_Com_MODMA, includes the standard functions for operating the communications processors CP341 and CP441-2 (as MODBUS Master).
Software requirements STEP 7 Professional (TIA Portal) V11.0 + SP 2 and higher
Structure of the sample program In this example, a communication connection is enabled between the communications module CP341 (S7-300) or CP441-2 (S7-400) and a MODBUS-compatible slave system. The function codes below can be used for the communication between CP and the third-party system:
- 01 (Read Coils)
- 02 (Read Discrete Inputs)
- 03 (Read Holding Registers)
- 04 (Read Input Register)
- 05 (Write Single Coil)
- 06 (Write Single Register)
- 07 (Read Exception Status)
- 08 (Diagnostic)
- 11 (Get Com Event Counter)
- 12 (Get Com Event Counter)
- 15 (Write Multiple Coils)
- 16 (Write Multiple Registers)
Installation of the sample program After downloading the project you must unpack the ZIP archive; a local path in the Engineering Station must be used as target path for the project. After unpacking, start the TIA Portal and open the project in the Portal View. The examples described are now available in the Project View.
zXX21_04_PtP_Com_MODMA.zip ( 1733 KB )
|