B&B Electronics MODSCAN32 - Manual User Manual
Page 15

15
Function Field
The Function Code field tells the addressed slave what function to perform. MODBUS function codes are
specifically designed for interacting with a PLC on the MODBUS industrial communications system. The
high order bit in this field is set by the slave device to indicate an exception condition in the response
message. If no exceptions exist, the high-order bit is maintained as zero in the response message.
The following table lists those functions supported by various WinTECH Software Applications:
CODE
MEANING
ACTION
01
READ COIL STATUS
Obtains current status, (ON/OFF), of a
group of logic coils.
02
READ INPUT STATUS
Obtains current status, (ON/OFF), of a
group of discrete inputs.
03
READ HOLDING REGISTER
Obtains current binary value in one or
more holding registers.
04
READ INPUT REGISTER
Obtains current binary value in one or
more input registers.
05
FORCE SINGLE COIL
Force logic coil to a state of ON or
OFF.
06
PRESET SINGLE REGISTER
Place a specific binary value into a
holding register.
15
WRITE MULTIPLE COILS
Force a group of logic coils to a
defined state.
16
PRESET MULTIPLE REGISTERS
Place specific binary values into a
group of holding registers.
Data Field
The data field contains information needed by the slave to perform the specific function or it contains data
collected by the slave in response to a query. This information may be values, address references, or limits.
For example, the function code tells the slave to read a holding register, and the data field is needed to
indicate which register to start at and how many to read. The imbedded address and data information varies
with the type and capacity of the PLC associated with the slave.
Error Check Field
This field allows the master and slave devices to check a message for errors in transmission. Sometimes,
because of electrical noise or other interference, a message may be changed slightly while its on its way
from one device to another. The error checking assures hat the slave or master does not react to messages
that have changed during transmission. This increases the safety and the efficiency of the MODBUS
system.
The error check field uses a Longitudinal Redundancy Check, (LRC), in the ASCII mode of transmission,
and a CRC-16 check in the RTU mode.