Galil DMC-3425 Home Security System User Manual


 
50 • Chapter 4 Communication DMC-3425
(1 – 8) and SlotNum is the slot number of the IOM output module to be written to (0 – 6). m is the
decimal representation of the data written to the 4 (0 – 15) or 8 (0 – 255) output points of the IOM
module.
Please refer to the IOC-7007 manual for complete information on how to configure, read and write
information to the IOC-7007 Ethernet I/O module.
Modbus Support
The Modbus protocol supports communication between masters and slaves. The masters may be
multiple PC's that send commands to the controller. The slaves are typically peripheral I/O devices
that receive commands from the controller.
When the Galil controller acts as the master, the IH command is used to assign handles and connect to
its slaves. The IP address may be entered as a 4 byte number separated with commas (industry
standard uses periods) or as a signed 32 bit number. A port number may also be specified, and should
be set to 502, which is the Modbus defined port number. The protocol (TCP/IP or UDP/IP) to use
must also be designated at this time. Otherwise, the controller will not connect to the slave. (Ex.
IHB=151,25,255,9<502>2 - This will open handle #2 and connect to the IP address 151.25.255.9, port
502, using TCP/IP)
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-3425 can use a specific slave address or default to the
handle number.
The Modbus protocol has a set of commands called function codes. The DMC-3425 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