The DMC-40x0 can communicate with a host computer through any application that can send TCP/IP or UDP/IP
packets. A good example of this is Telnet, a utility that comes with most Windows systems.
Modbus
An additional protocol layer is available for speaking to I/O devices. Modbus is an RS-485 protocol that packages
information in binary packets that are sent as part of a TCP/IP packet. In this protocol, each slave has a 1 byte slave
address. The DMC-40x0 can use a specific slave address or default to the handle number. The port number for
Modbus is 502.
The Modbus protocol has a set of commands called function codes. The DMC-40x0 supports the 10 major function
codes:
Function Code
Definition
01
Read Coil Status (Read Bits)
02
Read Input Status (Read Bits)
03
Read Holding Registers (Read Words)
04
Read Input Registers (Read Words)
05
Force Single Coil (Write One Bit)
06
Preset Single Register (Write One Word)
07
Read Exception Status (Read Error Code)
15
Force Multiple Coils (Write Multiple Bits)
16
Preset Multiple Registers (Write Words)
17
Report Slave ID
The DMC-40x0 provides three levels of Modbus communication. The first level allows the user to create a raw
packet and receive raw data. It uses the MBh command with a function code of –1. The format of the command is
MBh = -1,len,array[] where len is the number of bytes
array[] is the array with the data
The second level incorporates the Modbus structure. This is necessary for sending configuration and special
commands to an I/O device. The formats vary depending on the function code that is called. For more information
refer to the Command Reference.
The third level of Modbus communication uses standard Galil commands. Once the slave has been configured, the
commands that may be used are @IN[], @AN[], SB, CB, OB, and AO. For example, AO 2020,8.2 would tell I/O
number 2020 to output 8.2 volts.
If a specific slave address is not necessary, the I/O number to be used can be calculated with the following:
I/O Number = (HandleNum*1000) + ((Module-1)*4) + (BitNum-1)
Where HandleNum is the handle number from 1 (A) to 6 (F). Module is the position of the module in the rack from
1 to 16. BitNum is the I/O point in the module from 1 to 4.
If an explicit slave address is to be used, the equation becomes:
I/O Number = (SlaveAddress*10000) + (HandleNum*1000) +((Module-1)*4) + (Bitnum-1)
Chapter 4 Software Tools and Communication
•
53
DMC-40x0 User Manual
Содержание DMC-4040
Страница 17: ...DMC 4080 Layout Figure 2 2 Outline of the of the DMC 4080 DMC 40x0 User Manual Chapter 2 Getting Started 8...
Страница 19: ...DMC 4040 Dimensions Figure 2 5 Dimensions of DMC 4040 DMC 40x0 User Manual Chapter 2 Getting Started 10...
Страница 20: ...DMC 4080 Dimensions Figure 2 6 Dimensions of DMC 4080 Chapter 2 Getting Started 11 DMC 40x0 User Manual...
Страница 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Страница 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Страница 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Страница 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Страница 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Страница 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Страница 220: ...Step 2 Remove ICM For DMC 4040 Proceed to Step 3 Configure Circuit Appendices 211 DMC 40x0 User Manual...
Страница 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Страница 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...