Galil DMC-2X00 用户手册

下载
页码 267
DMC-2X00 
Chapter 4 Communication  
y 9  
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) 
To view an example procedure for communicating with an OPTO-22 rack, refer to the appendix.   
Which devices receive what information from the controller depends on a number of things.  If a 
device queries the controller, it will receive the response unless it explicitly tells the controller to send 
it to another device.  If the command that generates a response is part of a downloaded program, the 
response will route to whichever port is specified as the default (unless explicitly told to go to another 
port) with the ENET switch ("ON" designates Ethernet in which case it goes to the last handle to 
communicate with the controller, "OFF" designates main RS232).  To designate a specific destination 
for the information, add {Eh} to the end of the command.  (Ex.  MG{EC}"Hello" will send the 
message "Hello" to handle #3.  TP,,?{EF} will send the z axis position to handle #6.)
 
Multicasting 
 
A multicast may only be used in UDP/IP and is similar to a broadcast (where everyone on the network 
gets the information) but specific to a group.  In other words, all devices within a specified group will 
receive the information that is sent in a multicast.  There can be many multicast groups on a network 
and are differentiated by their multicast IP address.  To communicate with all the devices in a specific 
multicast group, the information can be sent to the multicast IP address rather than to each individual 
device IP address.  All Galil controllers belong to a default multicast address of 239.255.19.56.  The 
controller's multicast IP address can be changed by using the IA> u command.
 
Using Third Party Software 
 
Galil supports ARP, BOOT-P, and Ping which are utilities for establishing Ethernet connections.  ARP 
is an application that determines the Ethernet (hardware) address of a device at a specific IP address.  
BOOT-P is an application that determines which devices on the network do not have an IP address and 
assigns the IP address you have chosen to it.  Ping is used to check the communication between the 
device at a specific IP address and the host computer.
 
The DMC-2100 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.