All products manufactured by ICP DAS are under
warranty regarding defective materials for a period of one
year from the date of delivery to the original purchaser.
Warning
ICP DAS assumes no liability for damages resulting
from the use of this product. ICP DAS reserves the right
to change this manual at any time without notification.
The information furnished by ICP DAS is believed to be
accurate and reliable. However, no responsibility is
assumed by ICP DAS for its use, or for any infringements
of patents or other rights of third parties resulting from its
use.
Copyright
Copyright 1999 - 2015 ICP DAS. All rights reserved.
Trademark
The names used for identification only may be
registered trademarks of their respective companies.
Revision History ........................................................................................ 108
M-2017 User Manual, Rev: B2.5
4
1. Introduction
The M-2000 series is a family of network data acquisition
and control modules, providing analog-to-digital, digitalto-analog, digital input/output, timer/counter and other
functions. The modules can be remotely controlled using
a set of commands, which we call the DCON protocol, or
the standard Modbus RTU protocol. Communication
between the module and the host is via an RS-485 bidirectional serial bus standard. Baud Rates are software
programmable and transmission speeds of up to 115.2K
baud can be selected.
The M-2000 modules feature a new design for the frame
ground and INIT switch as shown in the figure below.
The frame ground provides enhanced static protection
(ESD) abilities and ensures the module is more reliable.
The INIT switch allows INIT mode to be accessed more
easily. Refer to Sections A.1 and A.3 for more details.
The M-2017 is an 8-channel voltage and current input
module, with the ability to connect various types of inputs
to a single module. It supports for fast mode, 60
samples/second. The M-2017 modules are designed for
industrial plant environments and have special input
M-2017 User Manual, Rev: B2.5
5
circuits to provide 240Vrms continuous overload
protection.
M-2017 User Manual, Rev: B2.5
6
1.1 More Information
Please visit the ICP DAS website http://www.icpdas.com
for more information regarding the M-2000 series.
M-2017 User Manual, Rev: B2.5
7
SW1
INIT
On for INIT mode
T.R.
On to provide 120 ohm terminal resistance on
the RS-485 bus
B.R.
On to provide 1k ohm bias resistance on the
RS-485 bus. If the RS-485 converter does not
provide the bias, then both of the B.R.
switches should be turned on.
1.2 Terminal Assignment
M-2017 User Manual, Rev: B2.5
8
M-2017 User Manual, Rev: B2.5
9
M-2017
Analog Input
Input Channels
8 differential
Input Type
mV, V, mA (switch selectable)
Sampling Rate
10 samples/sec (normal)
60 samples/sec (fast)
Bandwidth
15.7Hz (normal)
78.7Hz (fast)
Accuracy
±0.1% (normal)
±0.5% (fast)
Zero Drift
20µV/°C
Span Drift
25ppm/°C
CMR@50/60Hz
86dB min
NMR@50/60Hz
100dB min
Input Impedance
1MΩ
Current Impedance
125Ω, 1/4W
Voltage overload
Protection
±240V
Isolation
3000V DC
Individual Channel
Configurable
Yes
Modbus RTU
Yes
Power
Requirement
+10 to +48V DC
Consumption
0.6W
Temperature Range
Operating
-25°C to +75°C
Storage
-30°C to +75°C
1.3 Specifications
Note: A warm up period of 30 minutes is recommended in order to
achieve the complete performance results described in the
specifications.
M-2017 User Manual, Rev: B2.5
10
1.4 Block Diagrams
1.4.1 Block diagram for the M-2017
M-2017 User Manual, Rev: B2.5
11
1.5 Dimensions
The dimensions of the M-2017 are as shown below.
M-2017 User Manual, Rev: B2.5
12
1.6 Wiring Diagrams
1.6.1 Wiring diagram for the M-2017
1.6.2 Wiring Recommendations
Use 26-12 AWG wire for signal connections.
Strip the wire to a length of 7±0.5mm.
Use a crimp terminal for wiring.
Avoid high-voltage cables and power equipment as
much as possible.
For RS-485 communication, use insulated and
twisted pair 24 AWG wire, e.g. Belden 9841.
M-2017 User Manual, Rev: B2.5
13
1.7 Quick Start
To install the module, follow the steps below:
1. Connect the analog input. See Section 1.2 for the
terminal assignment and Section 1.6 for the wiring
diagram.
2. Connect the module to the RS-485 network using the
DATA+ and DATA- terminals. See Section 1.2 for the
terminal assignment. If the host is only equipped with
an RS-232 interface, then an RS-232 to RS-485
converter will be required. Refer to the “I-7000 Bus Converter User’s Manual” for more information.
3. Connect the module to the power supply using the +Vs
and GND terminals. See Section 1.2 for the terminal
assignment. Note that the voltage supplied should be
in the range of +10 to +48V DC.
4. For DCON protocol, configure the module by sending
the %AANNTTCCFF and $AA7CiRrr commands.
See Section 2.1 and 2.9 for details. For Modbus RTU
protocol, configure the module using the following
Modbus registers: 40257, 40485 and 40486. See
Section 3.4.1 for details.
The default settings for the module can be found in
Section 1.8.
5. For DCON protocol, in order to read data from the
input channels, send either the #AA or #AAN
command to the module. See Sections 2.2 and 2.3 for
details. For the Modbus RTU protocol, use Function
04h to read the data from the input channels. See
Section 3.2 for details.
6. If the host is a PC with a Windows operating system
installed, the DCON Utility can be used to allow easy
configuration and reading of data. The DCON Utility
M-2017 User Manual, Rev: B2.5
14
can be downloaded from the ICP DAS website
(http://www.icpdas.com). The documentation for the
DCON Utility can be found in the ”Getting Started For I-7000 Series Modules” manual.
Refer to the “I-7000 Bus Converter User’s Manual”
and ”Getting Started For I-7000 Series Modules”
manuals for more details. The “Getting Started For I-7000 Series Modules” manual can be downloaded from
the ICP DAS website (http://www.icpdas.com).
M-2017 User Manual, Rev: B2.5
15
1.8 Default Settings
Default settings for the M-2017 are:
▫ Protocol: Modbus RTU
▫ Module address: 01
▫ Analog input type: Type 08, -10V to 10V
▫ Baud Rate: 9600 bps
▫ Filter set at 60Hz rejection
▫ Normal mode
M-2017 User Manual, Rev: B2.5
16
Type
Code
08
09
0A
0B
0C
0D
Zero
Input
0V
0V
0V
0mV
0mV
0mA
Span
Input
+10V
+5V
+1V
+500mV
+150mV
+20mA
1.9 Calibration
Warning: It is not recommended that calibration be
performed until the process is fully understood.
The calibration procedure is as follows:
1. Warm up the module for 30 minutes.
2. Set the type code of channel 0 to the type you want to
calibrate. Refer to Sections 2.9 for details.
3. Enable calibration. Refer to Section 2.17 for details.
4. Apply the zero calibration voltage/current to channel 0.
5. Send the zero calibration command. Refer to Sections
2.5 for details.
6. Apply the span calibration voltage/current to channel 0.
7. Send the span calibration command. Refer to Sections
2.4 for details.
8. Repeat steps 3 to 7 three times.
Notes:
1. When calibrating type 0D for the M-2017, the SW2
switch of channel 0 should be set to the ON position.
2. Calibration voltages and currents are shown below.
3. The M-2000 series modules must be switched to the
DCON protocol mode before calibrating. Refer to
Section 1.11.1 for details of the switching protocol.
4 ~ 20 mA, type code 07, and 0 ~ 20 mA under range
reading with DCON protocol
4 ~ 20 mA, type code 1D, under range reading with
DCON protocol
4 ~ 20 mA, type code 07, and 0 ~ 20 mA under range
reading with Modbus protocol
4 ~ 20 mA, type code 1D, under range reading with
Modbus protocol
M-2017 User Manual, Rev: B2.5
22
1.11 M-2000 Notes
The M-2000 series support for the Modbus RTU
communication protocol, which is the default protocol of
the M-2000 series. The communication Baud Rates for
the Modbus RTU protocol can be in the range of 1200 bps
to 115200 bps.
Modbus functions supported by the module are described
in Chapter 3.
1.11.1 Protocol Switching
To switch to the DCON protocol:
1. Set the Modbus register 00257 to 0. See Section 3.4.1
for details.
2. After a power-on reset, the communication protocol
will be changed to DCON.
To switch to the Modbus RTU protocol:
1. Sends the $AAPN command and set N to a value of 1.
Note that the SW1 INIT switch on the bottom side of
the module should be set to the ON position, see the
figure on the next page. See Section 2.15 for details.
2. After a power-on reset, the communication protocol
will be changed to the Modbus RTU protocol.
M-2017 User Manual, Rev: B2.5
23
1.11.2 INIT Mode
When the module is powered on, with the SW1 INIT
switch set to the ON position as shown in the figure below,
the module is in INIT mode, (see Section A.1 for details),
and the communication settings are as follows:
1. Address: 00
2. Baud Rate: 9600 bps
3. No checksum
4. Protocol: DCON
If communication with the module is not possible, set the
module to the INIT mode and use the above settings to
communicate with the module. To read the current
settings, send the commands $AA2, (see Section 2.6), and
$AAP, (see Section 2.14). To set new settings, send the
commands %AANNTTCCFF, (see Section 2.1) and
$AAPN, (see Section 2.15). The new communication
settings will be effective after the next power-on reset.
M-2017 User Manual, Rev: B2.5
24
1.12 Technical Support
Should you encounter problems while using the M-2000
module, and are unable to find the help you need in this
manual or on our website, please contact ICP DAS
Product Support.
When requesting technical support, be prepared to provide
the following information about your system:
1. Module name and serial number: The serial number can
be found printed on the barcode label attached to the
cover of the module.
2. Firmware version: See Section 2.12 and 3.4, Modbus
registers 40481 and 40482, for information regarding
the command used to identify the firmware version.
3. Host configuration (type and operating system)
4. If the problem is reproducible, please give full details
describing the procedure used to reproduce the problem.
5. Specific error messages displayed. If a dialog box with
an error message is displayed, please include the full
text of the dialog box, including the text in the title bar.
6. If the problem involves other programs or hardware
devices, please describe the details of the problem in
full.
7. Any comments and suggestions related to the problem
are welcome.
ICP DAS will reply to your request by email within three
business days.
M-2017 User Manual, Rev: B2.5
25
Leading
Character
Module
Address
Command
[CHKSUM]
CR
Leading
Character
Module
Address
Data
[CHKSUM]
CR
2. DCON Protocol
All communication with M-2000 modules consists of
commands generated by the host and responses
transmitted by the M-2000 modules. Each module has a
unique ID number that is used for addressing purposes and
is stored in non-volatile memory. The ID is 01 by default
and can be changed using a user command. All
commands to the modules contain the ID address,
meaning that only the addressed module will respond.
The only exception to this is command ~** (Section 2.23),
which are sent to all modules, but in these cases, the
modules do not reply to the command.
Command Format:
Response Format:
CHKSUM A 2-character checksum that is present
when the checksum setting is enabled. See
Section 1.10 and 2.1 for details.
CREnd of command character, carriage return
(0x0D)
M-2017 User Manual, Rev: B2.5
26
Checksum Calculation:
1. Calculate the ASCII code sum of all the characters in
the command/response string except for the carriage
return character (CR).
2. The checksum is equal to the sum masked by 0ffh.
Example:
Command string: $012(CR)
1. Sum of the string = “$”+”0”+”1”+”2” =
24h+30h+31h+32h = B7h
2. Therefore the checksum is B7h, and so
CHKSUM = “B7”
3. The command string with the checksum = $012B7(CR)
Reads the Analog Inputs of All
Channels in Hex Format
2.11
$AAF
!AA(Data)
Reads the Firmware Version
2.12
$AAM
!AA(Data)
Reads the Module Name
2.13
$AAP
!AASC
Reads the Protocol
2.14
$AAPN
!AA
Sets the Protocol
2.15
$AAS1
!AA
Reloads the Default Calibration
Parameters
2.16
~AACT
!AAVV
Reads the 4mA under range
threshold
2.17
~AACTVV
!AA
Sets the 4mA under range
threshold
2.18
~AAEV
!AA
Enables/Disables the Calibration
2.19
~AAO(Name)
!AA
Sets the Module Name
2.20
~AARD
!AAVV
Reads the response delay setting
2.21
~AARDVV
!AA
Sets the response delay setting
2.22
M-2017 User Manual, Rev: B2.5
28
Host Watchdog Command Sets
Command
Response
Description
Section
~**
No Response
Host OK
2.23
~AA0
!AASS
Reads the Host Watchdog Status
2.24
~AA1
!AA
Resets the Host Watchdog Status
2.25
~AA2
!AAETT
Reads the Host Watchdog
Timeout Settings
2.26
~AA3ETT
!AA
Sets the Host Watchdog Timeout
Settings
2.27
M-2017 User Manual, Rev: B2.5
29
2.1 %AANNTTCCFF
Description:
Sets the configuration of an analog input module.
Syntax:
%AANNTTCCFF[CHKSUM](CR)
% Delimiter character
AA Address of the module to be configured in
hexadecimal format (00 to FF)
NN New address of the module in hexadecimal format
(00 to FF)
TT New type code, see Section 1.11 for details. Not
used by the M-2017. For the M-2017, use the
$AA7CiRrr command to set the type of each
channel, see Section 2.9 for details.
CC New Baud Rate code, see Section 1.10 for details.
To change the Baud Rate, the INIT switch must be
switched to the ON position. See Section A.1 for
details.
FF Used to set the data format, checksum, and filter
settings (Section 1.10). To change the checksum
setting, the INIT switch must be switched to the
ON position. See Section A.1 for details.
M-2017 User Manual, Rev: B2.5
30
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response. If
changing the Baud Rate or checksum settings
without switching the INIT switch to the ON
position, the module will return an invalid
command.
AA Address of the module in hexadecimal format (00
to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
31
Examples:
Command: %0102000600 Response: !02
Change the address of module 01 to 02. The module
returns a valid response.
Command: %0202000602 Response: !02
Set the data format of module 02 to be 2 (2’s
complement hexadecimal). The module returns a
valid response.
Command: %0101000A00 Response: ?01
Change the Baud Rate of module 01 to 115200bps.
The module returns an invalid command, because it
is not in INIT* mode.
Command: %0101000A00 Response: !01
Change the Baud Rate of module 01 to 115200bps
and the module is in INIT* mode. The module
returns a valid response.
1. Changes to the address, type code, data format and
filter settings take effect immediately after a valid
command is received. Changes to the Baud Rate and
checksum settings take effect on the next power on
reset.
M-2017 User Manual, Rev: B2.5
33
2.2 #AA
Description:
Reads the data from every analog input channel.
Syntax:
#AA[CHKSUM](CR)
# Delimiter character
AA Address of the module to be read (00 to FF)
Response:
Valid Response: >(Data)[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
> Delimiter character for a valid response
? Delimiter character for an invalid response
(Data) Data from every analog input channels, see
Section 1.10 for the details of data format.
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
34
Examples:
Command: #01 Response:
>+025.12+020.45+012.78+018.97+003.24+015.35+008.0
7+014.79
Reads module 01 and receives the data in engineering
format.
Command: #02 Response:
>4C532628E2D683A20F2ADBA16284BA71
Reads module 02 and receives the data in hexadecimal
9999.9
Reads module 03 and the data is under range.
Related Commands:
Section 2.1 %AANNTTCCFF, Section 2.6 $AA2
Related Topics:
Section 1.10 Configuration Tables
M-2017 User Manual, Rev: B2.5
35
2.3 #AAN
Description:
Reads the analog input of channel N.
Syntax:
#AAN[CHKSUM](CR)
# Delimiter character
AA Address of the module to be read (00 to FF)
N The channel to be read, zero based.
Response:
Valid Response: >(Data)[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
> Delimiter character for a valid response
? Delimiter character for an invalid response. An
invalid command is returned if the specified
channel is incorrect.
(Data) Analog input data of the specified channel, see
Section 1.10 for details of the data format.
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
36
Examples:
Command: #032 Response: >+025.13
Reads data from channel 2 of module 03.
Command: #029 Response: ?02
Reads data from channel 9 of module 02. An error is
returned because channel 9 is invalid.
Related Commands:
Section 2.1 %AANNTTCCFF, Section 2.6 $AA2
Related Topics:
Section 1.10 Configuration Tables
M-2017 User Manual, Rev: B2.5
37
2.4 $AA0
Description:
Performs a span calibration.
Syntax:
$AA0[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be calibrated (00 to FF)
0 Command for the span calibration
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
38
Examples:
Command: $010 Response: !01
Performs a span calibration on module 01 and returns
a valid response.
Command: $020 Response: ?02
Performs a span calibration on module 02. An
invalid command is returned because the “enable
calibration” command was not sent in advance.
Related Commands:
Section 2.5 $AA1, Section 2.19 ~AAEV
Related Topics:
Section 1.9 Calibration
Notes:
1. This command is only applicable to M-2017 modules.
2. The “enable calibration” command, ~AAEV, must be
sent before this command is used, see Section 1.9 for
details.
M-2017 User Manual, Rev: B2.5
39
2.5 $AA1
Description:
Performs a zero calibration.
Syntax:
$AA1[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be set (00 to FF)
1 Command for the zero calibration
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
40
Examples:
Command: $011 Response: !01
Performs a zero calibration on module 01 and
returns a valid response.
Command: $021 Response: ?02
Performs a zero calibration on module 02. An
invalid command is returned because the “enable calibration” command was not sent in advance.
Related Commands:
Section 2.4 $AA0, Section 2.19 ~AAEV
Related Topics:
Section 1.9 Calibration
Notes:
1. This command is only applicable to M-2017 modules.
2. The “enable calibration” command, ~AAEV, must be
sent before this command is used, see Section 1.9 for
details.
M-2017 User Manual, Rev: B2.5
41
2.6 $AA2
Description:
Reads the module configuration.
Syntax:
$AA2[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
2 Command to read the module configuration
Response:
Valid Response: !AATTCCFF[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
TT Type code of the module, see Section 1.10 for
details. It is 00 for M-2017.
CC Baud Rate code of the module, see Section 1.10
for details.
FF Data format, checksum settings and filter
settings of the module, see Section 1.10 for
details.
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
42
Examples:
Command: $012 Response: !01050600
Reads the configuration of module 01.
Command: $022 Response: !02030602
Reads the configuration of module 02.
$ Delimiter character
AA Address of the module to be set (00 to FF)
5 Command to set the channel(s) to enabled
VV A two-digit hexadecimal value, where bit 0
corresponds to channel 0, bit 1 corresponds to
channel 1, etc. When the bit is 1 it means that
the channel is enabled and 0 means that the
channel is disabled.
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response. An
invalid command is returned if an attempt is
made to enable a channel that is not present.
AA Address of the responding module (00 to FF)
M-2017 User Manual, Rev: B2.5
44
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: $0153A Response: !01
Enables channels 1, 3, 4, and 5 and disables all other
channels of module 01. The module returns a valid
response.
Command: $016 Response: !013A
Reads the channel status of module 01 and returns a
response of 3A, meaning that channels 1, 3, 4, and 5
are enabled and all other channels are disabled.
Related Commands:
Section 2.8 $AA6
Note:
1. It is recommended that only the channels that will be
used are enabled.
M-2017 User Manual, Rev: B2.5
45
2.8 $AA6
Description:
Reads the enabled/disabled status of each channel.
Syntax:
$AA6[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
6 Command to read the channel status
Response:
Valid Response: !AAVV[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
VV A two-digit hexadecimal value, where bit 0
corresponds to channel 0, bit 1 corresponds to
channel 1, etc. When the bit is 1 it means that
the channel is enabled and 0 means that the
channel is disabled.
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
46
Examples:
Command: $0153A Response: !01
Enables channels 1, 3, 4, and 5 and disables all other
channels of module 01. The module returns a valid
response.
Command: $016 Response: !013A
Reads the channel status of module 01 and returns a
response of 3A, meaning that channels 1, 3, 4, and 5
are enabled and all other channels are disabled.
Related Commands:
Section 2.7 $AA5VV
M-2017 User Manual, Rev: B2.5
47
2.9 $AA7CiRrr
Description:
Sets the type code of a channel.
Syntax:
$AA7CiRrr[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be set (00 to FF)
7 Command to set the channel range code
Ci i specifies the input channel to be set (0-7 for M-
2017).
Rrr rr represents the type code of the channel to be
set. Refer to the Analog Input Type Setting table
in Section 1.10 for details.
Response:
Valid Response: !AA [CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response or
invalid type code
M-2017 User Manual, Rev: B2.5
48
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: $017C0R0B Response: !01
Sets the type code for channel 0 of module 01 to be
0B (-500~+500mV) and the module returns a valid
response.
Command: $027C5R1A Response: !02
Sets the type code for channel 5 of module 02 to be
1A (+0~+20mA) and the module returns a valid
response.
Command: $037C1R30 Response: ?03
Sets the type code for channel 1 of module 03 to be
30. The module returns an invalid response because
the type code is invalid.
Related Commands:
Section 2.10 $AA8Ci
Related Topics:
Section 1.10 Configuration Tables
M-2017 User Manual, Rev: B2.5
49
2.10 $AA8Ci
Description:
Reads the type code information of a channel.
Syntax:
$AA8Ci[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
8 Command to read the type code of a channel
Ci Specifies which channel to access for the type
code information (i=0-7 for M-2017).
Response:
Valid Response: !AACiRrr[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response or
invalid channel
AA Address of the responding module (00 to FF)
Ci Specifies which input channel to access to
retrieve the type code information.
Rrr Represents the type code of the specified input
channel. Refer to the Analog Input Type Setting
table in Section 1.10 for details.
M-2017 User Manual, Rev: B2.5
50
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: $018C0 Response: !01C0R0C
Reads the channel 0 input range of module 01 and
returns 0C (-150~+150mV).
Related Commands:
Section 2.9 $AA7CiRrr
Related Topics:
Section 1.10 Configuration Tables
M-2017 User Manual, Rev: B2.5
51
2.11 $AAA
Description:
Reads the data from every analog input channel in hex
format.
Syntax:
$AAA[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
A Command to read every analog input
Response:
Valid Response: >(Data)[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
> Delimiter character for a valid response
? Delimiter character for an invalid response
(Data) Data from every analog input channels in hex
format.
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
52
Examples:
Command: $01A
Response: >0000012301257FFF1802744F98238124
Reads module 01 and receives the data in hex format.
Related Commands:
Section 2.2 #AA
M-2017 User Manual, Rev: B2.5
53
2.12 $AAF
Description:
Reads the firmware version of a module.
Syntax:
$AAF[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
F Command to read the firmware version
Response:
Valid Response: !AA(Data)[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
(Data) A string indicating the firmware version of the
module
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: $01F Response: !01A2.0
Reads the firmware version of module 01, and shows
that it is version A2.0.
M-2017 User Manual, Rev: B2.5
54
2.13 $AAM
Description:
Reads the name of a module.
Syntax:
$AAM[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
M Command to read the module name
Response:
Valid Response: !AA(Name)[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
(Name) A string showing the name of the module
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
55
Examples:
Command: $01M Response: !012017
Reads the module name of module 01 and returns the
name “2017”.
Related Commands:
Section 2.20 ~AAO(Name)
M-2017 User Manual, Rev: B2.5
56
2.14 $AAP
Description:
Reads the communication protocol information.
Syntax:
$AAP[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
P Command to read the communication protocol
Response:
Valid Response: !AASC[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
S The protocols supported by the module
0: only DCON protocol is supported
1: both the DCON and Modbus RTU protocols
are supported
C Current protocol saved in EEPROM that will be
used at the next power on reset
0: the protocol set in EEPROM is DCON
1: the protocol set in EEPROM is Modbus RTU
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
57
Examples:
Command: $01P Response: !0110
Reads the communication protocol of module 01 and
returns a response of 10 meaning that it supports both
the DCON and Modbus RTU protocols and the
protocol that will be used at the next power on reset
is DCON.
Related Commands:
Section 2.15 $AAPN
M-2017 User Manual, Rev: B2.5
58
2.15 $AAPN
Description:
Sets the communication protocol.
Syntax:
$AAPN[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be read (00 to FF)
P Command to set the communication protocol
N 0: DCON protocol
1: Modbus RTU protocol
Before using this command, the SW1 INIT
switch must be in the ON position, see Section
A.1 for details. The new protocol is saved in the
EEPROM and will be effective after the next
power on reset.
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
59
Examples:
Command: $01P1 Response: ?01
Sets the communication protocol of module 01 to
Modbus RTU and returns an invalid response
because the module is not in INIT mode.
Command: $01P1 Response: !01
Sets the communication protocol of module 01 to
Modbus RTU and returns a valid response.
Related Commands:
Section 2.14 $AAP
Related Topics:
Section A.1 INIT Mode
M-2017 User Manual, Rev: B2.5
60
2.16 $AAS1
Description:
Reloads the factory default calibration parameters,
including the internal calibration parameters.
Syntax:
$AAS1[CHKSUM](CR)
$ Delimiter character
AA Address of the module to be reloaded (00 to FF)
S1 Command to reload the factory default
calibration parameters
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: $01S1 Response: !01
Sends the command to reload the factory default
calibration parameters and returns a valid response.
M-2017 User Manual, Rev: B2.5
61
Related Topics:
Section 1.9 Calibration
M-2017 User Manual, Rev: B2.5
62
2.17 ~AACT
Description:
Reads the under range threshold of the range with type
code 1D, 4mA ~ 20mA.
Syntax:
~AACT[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
CT Command to read the under range threshold of
the range with type code 1D
Response:
Valid Response: !AAVV[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
VV Two hexadecimal digits to represent the under
range threshold value in 0.1 mA, for example,
01 denotes 0.1mA and 1E denotes 3mA. The
max allowable value is 40 (28h).
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
63
Examples:
Command: ~01CT Response: !011E
Sends a command to read the under range threshold
of module 01 and shows that it is 3.0mA.
Related Commands:
Section 2.18 ~AACTVV
M-2017 User Manual, Rev: B2.5
64
2.18 ~AACTVV
Description:
Sets the under range threshold value for the range with
type code 1D, 4 ~ 20mA.
Syntax:
~AACTVV[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
CT Command to set the under range threshold for
the range with type code 1D
VV Two hexadecimal digits to represent the under
range threshold value in 0.1 mA, for example,
01 denotes 0.1mA and 1E denotes 3mA. The
max allowable value is 40 (28h).
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
65
Examples:
Command: ~01CT14 Response: !01
Sends a command to set the under range threshold of
the range with type code 1D of module 01 to 2.0mA
and returns a valid response.
Related Commands:
Section 2.17 ~AACT
M-2017 User Manual, Rev: B2.5
66
2.19 ~AAEV
Description:
Enable/Disable module calibration.
Syntax:
~AAEV[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be set (00 to FF)
E Command to enable/disable calibration
V 1: enable calibration
0: disable calibration
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
67
Examples:
Command: $010 Response: ?01
Sends the command to perform a span calibration on
module 01. It returns an invalid response because the
“enable calibration” command was not sent in
advance.
Command: ~01E1 Response: !01
Enables calibration on module 01 and returns a valid
response.
Command: $010 Response: !01
Sends the command to perform a span calibration on
module 01 and returns a valid response.
Related Commands:
Section 2.4 $AA0, Section 2.5 $AA1
Related Topics:
Section 1.9 Calibration
M-2017 User Manual, Rev: B2.5
68
2.20 ~AAO(Name)
Description:
Sets the name of a module.
Syntax:
~AAO(Name)[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be set (00 to FF)
O Command to set the module name
(Name) New name of the module (max. 6 characters).
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
69
Examples:
Command: ~01O2017A Response: !01
Sets the name of module 01 to be “2017A” and
returns a valid response.
Command: $01M Response: !012017A
Reads the name of module 01 and returns “2017A”.
Related Commands:
Section 2.13 $AAM
M-2017 User Manual, Rev: B2.5
70
2.21 ~AARD
Description:
Reads the response delay time value of a module.
Syntax:
~AARD[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
RD Command to read the response delay time value
Response:
Valid Response: !AAVV[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
VV Two hexadecimal digits to represent the
response delay time value in milli-second, for
example, 01 denotes 1ms and 1E denotes 30ms.
The max allowable value is 30 (1Eh).
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
71
Examples:
Command: ~01RD Response: !0102
Reads the response delay time value of module 01
and returns 02, which denotes that the response delay
time value is 2ms.
Related Commands:
Section 2.22 ~AARDVV
M-2017 User Manual, Rev: B2.5
72
2.22 ~AARDVV
Description:
Sets the response delay time value of a module.
Syntax:
~AARDVV[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
RD Command to set the communication protocol
VV Two hexadecimal digits to represent the
response delay time value in milli-second, for
example, 01 denotes 1ms and 1E denotes 30s.
The max allowable value is 30 (1Eh).
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
73
Examples:
Command: ~01RD06 Response: !01
Sets the response delay time value to 6ms. The
module returns a valid response.
Command: ~01RD Response: !0106
Reads the response delay time value of module 01.
The module returns 06, which denotes that the
response delay time value is 6ms.
Related Commands:
Section 2.21 ~AARD
M-2017 User Manual, Rev: B2.5
74
2.23 ~**
Description:
Informs all modules that the host is OK.
Syntax:
~**[CHKSUM](CR)
~ Delimiter character
** Host OK command
Response:
No response.
Examples:
Command: ~** No response
Sends a “Host OK” command to all modules.
After sending this command, there must be a 2ms delay
before the next command can be sent.
M-2017 User Manual, Rev: B2.5
75
2.24 ~AA0
Description:
Reads the host watchdog status of a module.
Syntax:
~AA0[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
0 Command to read the module status
Response:
Valid Response: !AASS[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
SS Two hexadecimal digits that represent the host
watchdog status, where:
Bit 7: 0 indicates that the host watchdog is
disabled and 1 indicates the host watchdog is
enabled,
Bit 2: 1 indicates that a host watchdog time out
has occurred and 0 indicates that no host
watchdog time out has occurred.
The host watchdog status is stored in EEPROM
and can only be reset using the ~AA1 command.
M-2017 User Manual, Rev: B2.5
76
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
Examples:
Command: ~010 Response: !0100
Reads the host watchdog status of module 01 and
returns 00, meaning that the host watchdog is
disabled and no host watchdog time out has occurred.
Command: ~020 Response: !0204
Reads the host watchdog status of module 02 and
returns 04, meaning that a host watchdog timeout has
Resets the host watchdog time out status of a module.
Syntax:
~AA1[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be set (00 to FF)
1 Command to reset the host watchdog time out
status
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
78
Examples:
Command: ~010 Response: !0104
Reads the host watchdog status of module 01 and
shows that a host watchdog time out has occurred.
Command: ~011 Response: !01
Resets the host watchdog time out status of module
01 and returns a valid response.
Command: ~010 Response: !0100
Reads the host watchdog status of module 01 and
shows that no host watchdog time out has occurred.
Reads the host watchdog time out value of a module.
Syntax:
~AA2[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be read (00 to FF)
2 Command to read the host watchdog time out
value
Response:
Valid Response: !AAEVV[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
E 1: the host watchdog is enabled
0: the host watchdog is disabled
VV Two hexadecimal digits to represent the time out
value in tenths of a second, for example, 01
means 0.1 seconds and FF means 25.5 seconds.
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
80
Examples:
Command: ~012 Response: !011FF
Reads the host watchdog time out value of module
01 and returns FF, meaning that the host watchdog
is enabled and the host watchdog time out value is
Enables/disables the host watchdog and set the host
watchdog time out value of a module.
Syntax:
~AA3EVV[CHKSUM](CR)
~ Delimiter character
AA Address of the module to be set (00 to FF)
3 Command to set the host watchdog
E 1: enable the host watchdog
0: disable the host watchdog
VV Two hexadecimal digits to represent the time out
value in tenths of a second, for example, 01
means 0.1 seconds and FF means 25.5 seconds.
Response:
Valid Response: !AA[CHKSUM](CR)
Invalid Response: ?AA[CHKSUM](CR)
! Delimiter character for a valid response
? Delimiter character for an invalid response
AA Address of the responding module (00 to FF)
There will be no response if the command syntax is
incorrect, there is a communication error, or there is no
module with the specified address.
M-2017 User Manual, Rev: B2.5
82
Examples:
Command: ~013164 Response: !01
Enables the host watchdog of module 01 and sets
the host watchdog time out value to 10.0 seconds.
The module returns a valid response.
Command: ~012 Response: !01164
Reads the host watchdog time out value of module
The Modbus protocol is developed by Modicon Inc., originally
developed for Modicon controllers. Detailed information can be
found at http://www.modicon.com/techpubs/toc7.html. You can
also visit http://www.modbus.org to find more valuable
information.
M-2000 series modules support the Modbus RTU protocol. The
communication Baud Rates range from 1200bps to 115200bps.
The following Modbus functions are supported.
If the function specified in the message is not supported, then the
module responds as follows.
Error Response
If a CRC mismatch occurs, the module will not respond.
M-2017 User Manual, Rev: B2.5
84
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x02
02 ~ 03
Starting channel
2 Bytes
0x80 to 0x87, where 0x80
corresponds to channel 0, 0x81
corresponds to channel 1, etc
04 ~ 05
Number of input
channels
2 Bytes
N, 1 to 8; (Starting channel + N)
should be less than or equal to
0x88
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x02
02
Byte count
1 Byte
1
03
Data of input
channels
1 Byte
A bit corresponds to a channel.
When the bit is 1 it denotes that
the channel is enabled and is either
over-range, under-range or wire
opening. If the bit is 0 it denotes
that the channel is disabled or
normal.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x82
02
Exception code
1 Byte
02: starting channel out of range
03: (starting channel + number of
input channels) out of range,
incorrect number of bytes
received
3.1 02 (0x02) Read Input Status
This function code is used to read the under range status of a
module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
85
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x04
02 ~ 03
Starting channel
2 Bytes
0 to 7 for reading analog inputs
04 ~ 05
Number of input
channels (N)
2 Bytes
1 to 8; (Starting channel + N) <= 8
for reading analog inputs.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x04
02
Byte count
1 Byte
2 x N
03 ~
Data of input
channels
2 x N
Bytes
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x84
02
Exception code
1 Byte
02: starting channel out of range
03: (starting channel + number of
input channels) out of range,
incorrect number of bytes
received
3.2 04 (0x04) Read Input Channels
This function code is used to read from contiguous analog input
channels.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
86
Sub-function Code
Description
Section
00 (0x00)
Read the module name
3.3.1
04 (0x04)
Set the module address
3.3.2
05 (0x05)
Read the communication settings
3.3.3
06 (0x06)
Set the communication settings
3.3.4
07 (0x07)
Read the type code
3.3.5
08 (0x08)
Set the type code
3.3.6
32 (0x20)
Read the firmware version
3.3.7
37 (0x25)
Read the channel enable/disable
status
3.3.8
38 (0x26)
Set the channel enable/disable
3.3.9
41 (0x29)
Read the miscellaneous settings
3.3.10
42 (0x2A)
Write the miscellaneous settings
3.3.11
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
02: invalid sub-function code
3.3 70 (0x46) Read/Write Module Settings
This function code is used to read the settings of the module or
change the settings of the module. The following sub-function
codes are supported.
If the module does not support the sub-function code specified in
the message, then it responds as follows.
Error Response
M-2017 User Manual, Rev: B2.5
87
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x00
03 ~ 06
Module name
4 Bytes
0x4D 0x20 0x17 0x00 for M-2017
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: incorrect number of bytes
received
3.3.1 Sub-function 00 (0x00) Read module name
This sub-function code is used to read the name of a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
88
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x04
03
New address
1 Byte
1 to 247
04 ~ 06
Reserved
3 Bytes
0x00 0x00 0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x04
03
Set address result
1 Byte
0: OK,
others: error
04 ~ 06
Reserved
3 Bytes
0x00 0x00 0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: new address out of range,
reserved bytes should be filled
with zero, incorrect number of
bytes received
3.3.2 Sub-function 04 (0x04) Set module address
This sub-function code is used to set the address of a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
89
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x05
03
Reserved
1 Byte
0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x05
03
Reserved
1 Byte
0x00
04
Baud Rate
1 Byte
Baud Rate code, see Section 1.10
for details.
05 ~ 07
Reserved
3 Bytes
0x00 0x00 0x00
08
Mode
1 Byte
0: DCON protocol
1: Modubs RTU protocol
09 ~ 10
Reserved
2 Bytes
0x00 0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: reserved byte should be filled
with zero, incorrect number of
bytes received
3.3.3 Sub-function 05 (0x05) Read communication
settings
This sub-function code is used to read the communication
protocol settings of a module.
Request
Response
Note: This information is the data saved in the EEPROM and will be used
for the next power-on reset. It is not the currently used settings.
Error Response
M-2017 User Manual, Rev: B2.5
90
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x06
03
Reserved
1 Byte
0x00
04
Baud Rate
1 Byte
Baud Rate code, see Section 1.10
for details.
05 ~ 07
Reserved
3 Bytes
0x00 0x00 0x00
08
Mode
1 Byte
0: DCON protocol
1: Modubs RTU protocol
09 ~ 10
Reserved
2 Bytes
0x00 0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x06
03
Reserved
1 Byte
0x00
04
Baud Rate
1 Byte
0: OK, others: error
05 ~ 07
Reserved
3 Bytes
0x00 0x00 0x00
08
Mode
1 Byte
0: OK, others: error
09 ~ 10
Reserved
2 Bytes
0x00 0x00
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: Baud Rate or mode out of
range, reserved bytes should
be filled with zero, incorrect
number of bytes received
3.3.4 Sub-function 06 (0x06) Set communication
settings
This sub-function code is used to set the communication protocol
of a module.
Request
Response
Note: The new Baud Rate and protocol will be effective after the next
power-on reset.
Error Response
M-2017 User Manual, Rev: B2.5
91
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x07
03
Reserved
1 Bytes
0x00
04
Channel
1 Byte
0x00 ~ 0x07 for M-2017
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x07
03
Type code
1 Byte
Type code, see Section 1.10 for
details.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: reserved bytes should be filled
with zero, channel out of
range for M-2017 modules,
incorrect number of bytes
received
3.3.5 Sub-function 07 (0x07) Read type code
This sub-function code is used to read the type code information
of a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
92
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x08
03
Reserved
1 Byte
0x00
04
Channel
1 Byte
0x00 ~ 0x07 for M-2017
05
Type code
1 Byte
Type code, see Section 1.10 for
details.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x08
03
Type code
1 Byte
0: OK
others: error
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: type code out of range, channel
out of range for M-2017
modules, reserved bytes
should be filled with zero,
incorrect number of bytes
received
3.3.6 Sub-function 08 (0x08) Set type code
This sub-function code is used to set the type code of a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
93
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x20
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x20
03
Major version
1 Byte
0x00 ~ 0xFF
04
Minor version
1 Byte
0x00 ~ 0xFF
05
Build version
1 Byte
0x00 ~ 0xFF
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: incorrect number of bytes
received
3.3.7 Sub-function 32 (0x20) Read firmware
version
This sub-function code is used to read the firmware version
information of a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
94
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x25
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x25
03
Enabled/disabled
status
1 Byte/2
Byte/3
Byte
0x00 ~ 0xFF, enabled/disabled
status of each channel, where bit 0
corresponds to channel 0, bit 1
corresponds to channel 1, etc.
When the bit is 1 it denotes that
the channel is enabled and 0
denotes that the channel is
disabled.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: incorrect number of bytes
received
3.3.8 Sub-function 37 (0x25) Read channel
enabled/disabled status
This sub-function code is used to read the enabled/disabled status
of each channel in a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
95
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x26
03
Enable/disable
setting
1 Byte/
2 Byte/3
Byte
0x00 ~ 0xFF, enable/disable
setting of each channel, where bit
0 corresponds to channel 0, bit 1
corresponds to channel 1, etc.
When the bit is 1 it denotes that
the channel is enabled and 0
denotes that the channel is
disabled.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x26
03
Enable/disable
setting
1 Byte
0: OK
others: error.
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0xC6
02
Exception code
1 Byte
03: enable/disable setting out of
range, incorrect number of
bytes received
3.3.9 Sub-function 38 (0x26) Set channel
enable/disable
This sub-function code is used to specify the channels to be
enabled in a module.
Request
Response
Error Response
M-2017 User Manual, Rev: B2.5
96
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x29
00
Address
1 Byte
1 to 247
01
Function code
1 Byte
0x46
02
Sub function code
1 Byte
0x29
03
Miscellaneous
settings
1 Byte
Bit 7: filter setting
0: 60Hz rejection
1: 50Hz rejection
Bit 6: reserved
Bit 5: for M-2017