Galil DMC-1400 Tablet Accessory User Manual


 
DMC-1400 Series Command Reference MB 135
MB
FUNCTION: Modbus
DESCRIPTION:
The MB command is used to communicate with I/O devices using the first two levels of the
Modbus protocol.
The format of the command varies depending on each function code. The function code, -1,
designates that the first level of Modbus is used (creates raw packets and receives raw
data). The other codes are the 10 major function codes of the second level that the DMC-
1415/1416/1425 supports.
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
Note: For those command formats that have “addr”, this is the slave address. The slave
address may be designated or defaulted to the device handle number.
Note: All the formats contain an h parameter. This designates the connection handle number
(A thru F).
ARGUMENTS:
MBh = -1, len, array[] where
len is the number of the bytes
Array[] is the name of array containing data
MBh = addr, 1, m, n, array[] where
m is the starting bit number
n is the number of bits
array[] of which the first element will hold result
MBh = addr, 2, m, n, array[] where
m is the starting bit number
n is the number of bits
array[] of which the first element will hold result
MBh = addr, 3, m, n, array[] where
m is the starting register number