14.
Under Logical POUs, double-click the code worksheet
of the
program that you have inserted. The workspace appears.
15.
Drag the target function or function block of modbus from the
Edit Wizard pane into the workspace, the function or function
block is displayed. There are twelve function blocks available for
Modbus master programming. For more details, see "Description
of Modbus Function Block" on page 1. For the following steps, the
function block MB_RD_MHR is taken as an example.
16.
Double-click the pin-outs of the function or function block to
assign variables. In the pop-up
Variable Properties
window, select
the
Name
,
Data Type
and
Usage
from the drop-down list, and assign
Initial value and I/O address. Then click
OK
.
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 RTU Builder. See "Description of
CONFIG_INFO" on page 1 for more details. Slave1 is the variable
name assigned by the user of CONFIG_INFO.
90
Chapter 6 - Communication
Summary of Contents for ControlEdge 2020 SC-TEPL01
Page 28: ...Figure 3 8 Single star topology 28 Chapter 3 Hardware ...
Page 40: ...40 Chapter 3 Hardware ...
Page 66: ...66 Chapter 4 Software ...
Page 114: ...114 Chapter 6 Communication ...
Page 126: ...126 Notices ...