Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The first step for data transmission definition is to specify the Modbus units to be broadcast by a server to a client. A Unit defines the collection of data to be sent between devices. Each address in the unit corresponds to a coli, register, holding register or discrete value-the Modbus Type for the data. Define the units by right clicking on the server device and selecting Module properties. Add as many units as required (Figure 9.105), assigning each a meaningful name for use in linking the Design Pad operators in your schema to the units. Press OK to save the definitions.

Figure 9.105. Defining Modbus/TCP Units


Once all the broadcast units are defined, start adding broadcast operators to the schema. Each broadcaster has a set of critical properties for proper data transfer. Left double click on an operator to set these properties based on what type of data will be sent and where it is going.


Modbus Type (Figure 9.106) defines the data format and the direction(s) it travels..Coils are Boolean data which may be read or written by the client and server. Discrete data are Booleans which can be written to by the server and only read by the client. Holding registers are floating point values which can be both read and written. Input registers are floats which may only be read by the client after the server writes to them. Select the proper Modbus type for the data in question.



Figure 9.106. Modbus/TCP Broadcast Operator Modbus Type Choices


Now select the Data type for the transaction (Figure 9.107). A mapped range sends a float which can be interpreted by the client according to the range specified in the properties. For example, if the 0% mapping value is 0 and the 100% value is 1000, a value of 500 would come over the transmission as 65535*(500-map0pct)/(map100pct---map0pct). This scales the value to be transmitted into the range (0-65535) of a MBTCP register to provide the maximum number of effective bits given the 16 bit limit imposed by the MBTCP register size. Mapped rannge data type is recommeded for transmission between Fairmount Automation modules.   Signed and Unsigned 16 bit values are the preferred methods since they are more commonly the accepted types on most Modbus devices. 32 bit and floating point values are not as commonly supported. Structures are available for NIM-2 to NIM-2 communication. It is possible that some peers other than Fairmount Automation devices may utilize structures, but it is highly unlikely that they will be used in the same way Specify the structure name describing the data if the structure data type is chosen.

Figure 9.107. Modbus Data Types for Broadcasting


Now that the units and types are defined the operators can be connected to hardware. Right click on the operator to bring up the hardware connection dialog (Figure 9.108). Select the unit corresponding to the data to be broadcast, and specify the address within the unit the data will be located. The address may be from 1 to 65,255. It is determined by the Modbus device manufacturer or is set by the network designer. This address must be matched by the receiving operator hardware connection.  Be sure to be consistent in address use within a unit to transmit the right data.

Figure 9.108. Defining Unit Connection and Address


Once broadcasters are defined on all the modules acting as servers, the receive operators may be added to schemas. Double click on the operator to use its properties to set the Modbus and data types to match the broadcaster settings (Figure 9.109). Right click or left click holding down the shift key to connect the operator to hardware. Select the broadcast signal from the dropdown and then specify the same address within that unit as is defined for the broadcast (Figure 9.110).


 
Figure 9.109. Match Receiver Properties to Broadcast


Figure 9.110. Match Receiver Unit and Address to Broadcast


The last step in setting up a Modbus/TCP data exchange is setting the IP addresses for the server and client. Go to the Workspace Network view. Right click on the physical EtherNET/IP network and select Properties (Figure 9.111) to bring up the Configure Network Dialog.



Figure 9.111

Left click on the IP Settings tab. Each device defined in the network has a row in the table (Figure 9.112). Check Use DHCP or specify the IP Address for each in turn. The other columns are used to configure the network further:


Subnet Mask. A subnet mask is commonly used in CIDR (Classless Inter-Domain Routing) as a means to create sub-networks. The subnet mask ANDed with an address determines the routing sub-network. This is used by routers to gate traffic between networks.


Default Gateway. A Default Gateway is a specific host that traffic for the subnet should be directed to for egress. This is generally a router, but may be a PC or gateway device acting in the role of a router.


Obtain DNS Automatically. DNS is Domain Name Server, a host whose purpose is to translate names into equivalent numerical IP addresses. This is done to permit a fixed name to be distributed and used, while allowing the actual IP address it correlates to change over time due to changes in the underlying network structure. Obtain DNS automatically indicates that device should probe the local network for DNS servers and select one to use


Preferred DNS. Preferred is the address of a DNS server that will be used.


Alternate DNS. Should the preferred DNS cease to respond, the Alternate DNS server will be used



Figure 9.112. Setting the Client and Server IP Addresses

Modbus-TCP Network Creation

  • No labels