The “MB_MASTER” is called cyclically (in OB1, for example). The DATA_PTR parameter must refer to a global data block created with the disabled option “Symbolic access only”. Selects the direction of transmission (“0” = read, “1” = write or additional diagnostics functions).ĭefines the local receive and send data areas of the master.
Siemens step 7 license transfer code#
The MB_MASTER block is used to select the MODBUS slave to be addressed, select the function code and define the local data storage area. You use the MB_MASTER block to define the communication module selected with the MB_COMM_LOAD configuration block as MODBUS master.
The instance data block of the master or slave block is transferred at the MB_DB parameter and thus defines the communication module (PORT parameter) as MODBUS master or slave. The port configuration of the RS485 interface in the STEP 7 (TIA Portal) device view is irrelevant here. The communication parameters BAUD (transmission rate) and PARITY (parity) must be identical for all nodes. After inserting the communication module in the hardware configuration you can select the symbolic name of the communication module at the PORT parameter. The MB_COMM_LOAD block must be called in the first program cycle (by activating the system marker M1.0 in the hardware settings or by a call in Startup OB 100). The MB_COMM_LOAD block is used to select the communication module, set the communication parameters and parameterize the connection with the master or slave parameters.
The configuration block MB_COMM_LOAD is called on both sides (master and slave) for MODBUS communication. The configuration is made in STEP 7 (TIA Portal) and the program code is transferred to the controllers with the switch CSM 1277. You can continue with the PROFIBUS cable to connect up to 31 additional MODBUS slaves to the master. The CM 1241 RS485 communication modules are linked to each other using a PROFIBUS cable. By the same principle, the address of the slave to be addressed can be changed between two actions (here writing and reading), thus making it possible to exchange data with multiple slaves. Since the RS485 has a two-wire interface (half-duplex), writing and reading must be conducted consecutively. There is alternate writing to the holding register of the slave (function code 16) and reading from the holding register of the slave (function code 03). We have taken the example of MODBUS communication between a master and a slave. We will take a sample project to describe the configuration procedure in STEP 7 (TIA Portal) V11 for communication with multiple slaves using the CM 1241 RS485.
Siemens step 7 license transfer serial#
PLC Siemens umumnya mengalami kesulitan dalam koneksi modbus, khusunya ke peralatan dengan modbus serial seperti power meter, protection relay dan lainnya. A MODBUS-RTU communication with PLC SIEMENS SIMATIC S7-1200?