85
from the toolbar. Click Make.
14.
Under Logical POUs, double-click the code worksheet of the
program that you have inserted.
15. Drag the target function or function block of modbus from the
Edit Wizard pane into the code worksheet, and configure the
parameters. Take MB_RD_MHR as an example.
16. Double-click the pin-outs of the function or function block to
assign variables.
To assign initial values to CONFIG_INFO:
CONFIG_INFO, a predefined data structure for Modbus
configuration information, is the crucial input for Modbus master
function blocks and contains key Modbus communication
parameters such as IP address of slave, slave ID, port number of the
controller to be used, etc. This data structure is read-only and
cannot be viewed and edited in ControlEdge Builder. See
"Description of CONFIG_INFO" on page1 for more details. Slave1 is
the variable name assigned by the user of CONFIG_INFO.
17. Assign the data returned by the function block to variables to
Chapter 6 - Communication