Transcript
ZT-2060 User Manual Warranty All products manufactured by ICP DAS are under warranty regarding defective materials for a period of one year, beginning from the date of delivery to the original purchaser.
Warning ICP DAS assumes no liability for any damage resulting from the use of this product. ICP DAS reserves the right to change this manual at any time without notice. The information furnished by ICP DAS is believed to be accurate and reliable. However, no responsibility is assumed by ICP DAS for its use, nor for any infringements of patents or other rights of third parties resulting from its use.
Copyright Copyright © 2013 by ICP DAS. All rights are reserved.
Trademarks Names are used for identification purpose only and may be registered trademarks of their respective companies.
Technology Support If you have any problems, please feel free to contact us via email at
[email protected]
ICP DAS, ZT‐2060 User Manual, Version 0.1.0(Beta) Page 1 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Table of Contents 1 Introduction ...............................5 1.1 Introduction to ZigBee ................................... 5 1.2 Introduction to the ZT‐2000 DIO Device ................... 6
2 Information to the Hardware ................7 2.1 Specifications ........................................... 7 2.2 Pin Assignment ........................................... 8 2.3 Block Diagram ............................................ 9 2.4 Wire Connection .......................................... 9
3 Setting up the ZT‐2000 DIO Device .........10 3.1 Introduction of configurations .......................... 10 3.2 Introduction to the Rotation and DIP Switch ............. 11 3.3 Start‐up ZT‐2000 I/O Device ............................. 12 3.4 Examples ................................................ 13 3.5 Communication Test ...................................... 14
4 DCON/Modbus RTU Command set ...............15 4.1 How to communicate with ZT‐2000 I/O Device .............. 15 4.2 DCON Protocol Command set ............................... 15 4.2.1 Checksum ............................................. 16 4.2.2 Overview the DCON Command Sets ....................... 17 4.2.3 %AANNTTCCFF .......................................... 18 4.2.4 #** .................................................. 19 4.2.5 #AA00(Data) .......................................... 20 4.2.6 #AA0A(Data) .......................................... 22 4.2.7 #AA1cDD(Data) ....................................... 24 4.2.8 #AAAcDD(Data) ....................................... 26 4.2.9 #AAN ................................................. 27 4.2.10 $AA2 ............................................... 28 4.2.11 $AA4 ............................................... 30 4.2.12 $AA5 ............................................... 32 4.2.13 $AA6 ............................................... 33 4.2.14 $AAC ............................................... 34 4.2.15 $AACN .............................................. 35 ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 2 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.16 $AAF ............................................... 36 4.2.17 $AALS .............................................. 37 4.2.18 $AAM ............................................... 39 4.2.19 $AAP ............................................... 40 4.2.20 @AA ................................................. 41 4.2.21 @AA(Data) .......................................... 42 4.2.22 ~AAD ............................................... 43 4.2.23 ~AADVV ............................................. 44 4.2.24 ~** ................................................. 45 4.2.25 ~AA0 ............................................... 46 4.2.26 ~AA1 ............................................... 48 4.2.27 ~AA2 ............................................... 49 4.2.28 ~AA3EVV ............................................ 50 4.2.29 ~AA4V .............................................. 51 4.2.30 ~AA5V .............................................. 52 4.3 Modbus RTU Protocol Command set ......................... 54 4.3.1 Modbus Address Mapping ............................... 55 4.3.2 PLC Address Mapping ................................. 57 4.3.3 01(0x01)Read Coils .................................. 58 4.3.4 02(0x02)Read Discrete Inputs ....................... 61 4.3.5 03(0x03)Read Multiple Registers .................... 63 4.3.6 04(0x04)Read Multiple Input Registers .............. 66 4.3.7 05(0x05)Write Single Coils .......................... 68 4.3.8 06(0x06)Write Multiple Registers ................... 71 4.3.9 15(0x0F)Write multiple coils ....................... 73 4.3.10 70(0x46)Read/Write module settings ............... 75
5 Troubleshooting ...........................89 6 Appendix ..................................90 6.1 INIT Mode ............................................... 90 6.2 Dual Watchdog operation ................................. 91 6.3 Reset Status ............................................ 92 6.4 Digital Output .......................................... 93 6.5 Latched Digital Input ................................... 94 6.6 LED Display Status ...................................... 95
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 3 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
What’s in the Shipping Package? The shipping package contains the following items:
ZT‐2060 模組
ANT‐124‐05
Quick Start Guide
CD
If any of these items are missing or damaged, please contact your local distributor for more information. Save the shipping materials and cartons in case you need to ship the module in the future.
More Information
Documentation: CD: \Napdos\ZigBee\ZT_Series\Document http://ftp.icpdas.com/pub/cd/usbcd/napdos/zigbee/zt_series/document
Software: CD: \Napdos\ZigBee\ZT_Series\Utility http://ftp.icpdas.com/pub/cd/usbcd/napdos/zigbee/zt_series/utility
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 4 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
1
Introduction
1.1 Introduction to ZigBee ZigBee is a specification for a suite of high-level communication protocols using small, low-power digital radios based on the IEEE 802.15.4 standard for personal area networks. ZigBee devices are often used in mesh network form to transmit data over longer distances, passing data through intermediate devices to reach more distant ones. This allows ZigBee networks to be formed ad-hoc, with no centralized control or high-power transmitter/receiver able to reach all of the devices. Any ZigBee device can be tasked with running the network. ZigBee is targeted at applications that require a low data rate, long battery life, and secure networking. ZigBee has a defined rate of 250 kbit/s, best suited for periodic or intermittent data transmission or a single signal transmission from a sensor or input device. Applications include wireless light switches, electrical meters with in-home-displays, traffic management systems, and other consumer and industrial equipment that requires short-range wireless transfer of data at relatively low rates. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 5 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
1.2
Introduction to the ZT‐2000 DIO Device
The ZT-2000 I/O series devices are small-sized wireless ZigBee I/O modules based on the IEEE802.15.4 standard that allow data acqusition and control via the personal area ZigBee network. They provide digital input/output, timer/counter and others functions. These modules can be remote controlled by a set of commands. The DIO modules support TTL signal, photo-isolated digital input, relay contact output, solid-state relay output, PhotoMOS output and open-collector output. Reference Sec. 2.1 for more detail information.
The ZT-2000 I/O series devices is a wireless data acqusition based client/server system. Accordingly, A Net Server of the ZigBee(ZT-2570/ZT-2550) is essential in such system. Please refer to “ZT-25XX ZigBee converter quick start “ for more information as following links: http://ftp.icpdas.com/pub/cd/usbcd/napdos/zigbee/zt_series/document/
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 6 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
2
Information to the Hardware
2.1
Specifications
Digital Input Input Channels Input Type ON OFF
Input level Input Impedance Counters
Relay Output Output Channels Output Type Contact Rating Max. Contact voltage Operate Time Release Time Electrically Endurance Mechanically Between contacts Dielectric Between coil to Strength contacts Insulation Resistance Surge Strength 4KV ESD Protection EFT Protection Surge Protection LED Indicator ZigBee PWR ZigBee Net DI0 ~ DI5 RL0 ~ RL3 Power Power Consumption Environment Operating Temperature
6 Isolation, Wet contact (Sink/ source) Voltage Level: +3.5 V to +30 V DC Voltage Level: +1 V Max. 3k Ohm, 0.33 W Channels: 6 Max. Counters : 16-bit (65535) Max. Input Frequency: 100 Hz Min. Pulse Width; 5 ms 4 Power Relay, From A (250 V AC /30 V DC ) @ 5A 270V AC / 125V DC 10 ms Max. at rated voltage 5 ms Max. at rated voltage Resistive load: 100,000 ops. Min. (10 ops/minute) At no load: 20,000,000 ops. Min. (300 ops/minute) 750 V AC for 1 minute 3,000 V AC for 1 minute Min. 1000M Ω at 500V DC 5,080 V (1.2 / 50 us) Yes, contact for each terminal +/-4 kV to Power +/-3 kV to Power ZigBee Device Power Zigbee Communication Indicator Digital Input channel Indicators Digital Output channel Indicators 1.2 W (Max.)
Storage Temperature
-25 to 75 °C -30 to 75 °C
Humidity
5 to 95%, Non-condensing
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 7 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Wireless RF Channels
16
RF Transmit Power
11 dBm
Antenna (2.4 GHz)
5 dBi Omni-directional antenna
Transmit Range (LOS)
700 m (Typical)
Max. Slaves Supported
255
EMI Certification
CE/FCC, FCC ID
2.2
Pin Assignment
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 8 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
2.3
2.4
Block Diagram
Wire Connection
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 9 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
3
Setting up the ZT‐2000 DIO Device
3.1
Introduction to the Configuration Parameters
A. “Pan ID” is the group identity of a ZigBee network, and must be set to the same for all devices in the same ZigBee network. B. “Node ID” is the individed identity of a specific the ZigBee module, and must be unique for each device connected the same ZigBee network. C. “RF Channel” indicates the radio frequency channel, and must be set to the same value as other module on the same ZigBee network. Channel
0x00
0x01
……
0x0F
Frequency(MHz) 2405
2410
……
2480
※ RF channels 0x04, 0x09, 0x0E or 0x0F are recommended because they do not overlap with frequencies Wi-Fi. 802.11b/g Channel 1
2400 00 01 02 03 04 MHz
802.11b/g Channel 6
802.11b/g Channel 11
05 06 07 08 09 0A 0B 0C 0D 0E
0F 2485 MHz
802.11b/g Channel (North America) 802.15.4 Channel
D. Protocol/Application Mode: For using different protocol on the user program, the following recommended application mode works together. User Program Protocol DCON
ZT-2000 I/O
ZT-2550
ZT-2570
DCON
Transparent
Transparent
Transparent
Transparent
Modbus Gateway
Modbus Gateway
------
Modbus Gateway
Modbus RTU
Modbus RTU
Modbus TCP
Modbus RTU
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 10 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
3.2
Introduction to the Rotation and DIP Switch
The configurations is adjusted by the external rotation switch and DIP switch. User only reboot the power when ZT-2000 device configuration completed.
Protocol
Address LSB (Node ID)
Address MSB (Node ID)
Pan ID
Checksum
RF Channel
Rotation Switch Address Node ID Address Node ID
0 00 0x00FF 0 10 0x0010
1 01 0x0001 1 11 0x0011
2 02 0x0002 2 12 0x0012
3 03 0x003 3 13 0x013
…… …… …… …… …… ……
F 0F 0x000F F 1F 0x001F
Note MSB = 0
MSB = 1
DIP Switch Number
Item
1
Address MSB
2
Protocol
3
Checksum
4
ZigBee Pan ID
5 6 7 8
ZigBee RF Channel
Status OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF ON
Explain Valid address(Node ID) from 0x00 to 0x0F Valid address(Node ID) from 0x10 to 0x1F DCON Protocol Modbus RTUProtocol Disabled Enabled Pan ID = 0x0000 Pan ID = 0x0001 -----0x08 -----0x04 -----0x02 -----0x01
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 11 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
3.3
Start‐up ZT‐2000 I/O Device
Because the ZigBee network is in charged by the ZigBee coordinator, so user must first configure ZT-2550/ZT-2570 (ZigBee coordinator). Please see the configuration details in the documents as below links. Once the ZigBee coordinator has completed the configuration, you only configure the ZT-2000 I/O device into the same “Pan ID” and “RF channel” and then reboot power. It will start working in the ZigBee network via the default protocol.
※ Documents http://ftp.icpdas.com.tw/pub/cd/usbcd/napdos/zigbee/zt_series/document/zt-255x/ http://ftp.icpdas.com.tw/pub/cd/usbcd/napdos/zigbee/zt_series/document/zt-257x/
※ Configuration Utility (Used to configure ZT-2000 I/O device Coordinator) http://ftp.icpdas.com.tw/pub/cd/usbcd/napdos/zigbee/zt_series/utility/
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 12 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
3.4
Examples
Configurations of ZT‐2550/ZT‐2570
Configurations of ZT-2000 I/O device
Number Item
Status
Explain
1
Address MSB
OFF
Address/Node ID is 01(Rotation Switch=1)
2
Protocol
ON
Use Modbus RTU Protocol
3
Checksum
OFF
Disabled
4
ZigBee Pan ID
OFF
Pan ID=0x0000
ON
0x08
5 6
ZigBee
ON
0x04
7
RF Channel
ON
0x02
OFF
------
8
ZigBee RF Channel = 0x0E
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 13 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
3.5
Communication Test
Once the ZT-2000 I/O device has joined ZigBee network, user may confirm the signal quality via the LED status of ZigBee Net LED indicators. If the LED indicator is steady light, it is allowed communicating with ZT-2000 I/O device for data acquisition and controlling. ICP DAS also provides a software “DCON Utility” to simulate the DCON/Modus communication, user may use this software to verify the setting and ZigBee I/O functions.
※ Downoad DCON Utility http://ftp.icpdas.com/pub/cd/8000cd/napdos/driver/dcon_utility/
Simulate I/O channel operating via using DCON Utility 1. Launch DCON Utility and select the correct COM Port settings to connect the ZigBee Coordinator (ZT-2550/ZT-2570).
2. Clicking “Search” button will start searching which ZT-2000 I/O device is in the same ZigBee network.
3. If there is any ZT-2000 I/O devices displayed, double clicking the “module name” will start the I/O channels operated platform.
1 2
3
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 14 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4
DCON/Modbus RTU Command set
4.1
How to communicate with ZT‐2000 I/O Device
ICP DAS ZT-2000 I/O devices provides DCON and Modbus RTU protocols. Through by the wireless transmission, user may easily control and monitor I/O channels. The following documents shows the details of DCON and Modbus RTU protocols command set as below link. http://ftp.icpdas.com/pub/cd/8000cd/napdos/7000/manual/modbusdio.pdf
4.2
DCON Protocol Command set
All the ZT-2000 I/O series devices are controlled via wireless broadcasting commands, so there must be a unique adjustable address saved in the EEPROM to show the difference. In other words, all the command formats contain the destination address. When I/O devices receive commands, it will decide whether to respond or not in according own address. But, there are still two exception commands #** and ~**.
DCON Command Format Leading
Module
Character
Address
Command
[CheckSu m]
CR
DCON Response Command Format Leading
Module
Character
Address
Data
[CheckSu m]
CR
※ Note: ʻCRʼ is a characters used to end a frame. ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 15 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.1
Checksum
Calulate Checksum: Sum all the ASCII code of characters to the command in addition to the ʻCRʼ terminator. The Checksum value is the sum expressed to the Hexadecimal. The Checksum is the sum value expressed to Hexadecimal format. Example:Command ”$012(CR)” Sum = ʻ$ʼ + ʻ0ʼ + ʻ1ʼ + ʻ2ʼ = 24h + 30h + 31h + 32h = B7h CheckSum = “B7” DCON command with checksum: “$012B7(CR)” Example:Response Command ”!01200600(CR)” Sum = ʻ!ʼ + ʻ0ʼ + ʻ1ʼ + ʻ2ʼ + ʻ0ʼ + ʻ0ʼ + ʻ6ʼ + ʻ0ʼ + ʻ0ʼ = 21h+30h+31h+32h+30h+30h+36h+30h+30h = 1AAh CheckSum = “AA” DCON response with checksum: “!01200600AA(CR)” ※ Note: Checksum is the sum value in capital letters expressed.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 16 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.2
Overview the DCON Command Sets
General Command Sets Command Response Description Section %AANNTTCCFF !AA Set the Module Configuration 4.2.3 #** No Response Synchronized Sampling 4.2.4 #AA00(Data) > Set the Digital Output 4.2.5 #AA0A(Data) > Set the Digital Output 4.2.6 #AA1cDD > Set the Digital Output 4.2.7 #AAAcDD > Set the Digital Output 4.2.8 #AAN !AA(Data) Read the Digital Input Counter 4.2.9 $AA2 !AANNTTCCFF Read the Module Configuration 4.2.10 $AA4 !S(Data) Read the Synchronized Data 4.2.11 $AA5 !AAS Read the Reset Status 4.2.12 $AA6 !(Data) Read the Digital I/O Status 4.2.13 $AAC !AA Clear the Latched DI Status 4.2.14 $AACN !AA Clear the Digital InputCounter 4.2.15 $AAF !AA(Data) Read the firmware Version 4.2.16 $AALS !(Data) Read the Latched DI Status 4.2.17 $AAM !AA(Data) Read the Module Name 4.2.18 $AAP !AASC Read the communication protocol 4.2.19 @AA >(Data) Read the Digital I/O Status 4.2.20 @AA(Data) > Set the Digital Output Channels 4.2.21 ~AAD !AAF Read the DI/O active status. 4.2.22 ~AADVV !AA Set the DI/O active status. 4.2.23 Host Watchdog Command Sets Command Response Description Section ~** No Response Host OK 4.2.24 ~AA0 !AASS Read the Status 4.2.25 ~AA1 !AA Reset the Status 4.2.26 ~AA2 !AAVV Read the Timeout Settings 4.2.27 ~AA3EVV !AA Set the Timeout Settings 4.2.28 ~AA4V !AA(Data) Read the PowerOn/Safe Value 4.2.29 ~AA5V !AA Set the PowerOn/Safe Value 4.2.30 ~AARDvv !AA Set the Response Delay Time 4.2.31 ~AARD !AA(Data) Read the Response Delay Time 4.2.32 ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 17 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.3
%AANNTTCCFF
Description Set the configuration of a module Syntax %AANNTTCCFF[CHKSUM](CR) %
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
NN
New address of the module in hexadecimal format(00 to FF)
TT
New type code,DIO device is always set to 0x40
CC
New Baud Rate code, ZigBee I/O device is always set to 0x0A
FF
Used to set the checksum and DI counter update direction. 00:Falling Edge,CheckSum Disabled 40:Falling Edge,CheckSum Enabled 80:Rising Edge,CheckSum Disabled C0:Rising Edge,CheckSum Enabled
Response Valid Command
!AA[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for 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. Examples Command
%0101400A80
Response
!01
Set the counter update (Rising Edge) Examples Command
%0101400A00
Response
!01
Set the counter update (Falling Edge)
※Related Commands: $AA2、~AAI、~AATnn ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 18 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.4 #** Description When the command is received, it will allow all modules to read data and will store the data for later retrieval. Syntax #**[CHKSUM](CR) #
Delimiter character
**
Synchronized sampling command
Response There is no response with this command. To access the data, another command, $AA4, must be sent. Examples Command
#**
Response
No response
Sends the synchronized sampling command Examples Command
$014
Response
!1FF0000
Sends a command to read the synchronized data. The status byte of the response is 1, which means that it is the first time the synchronized data has been read after the previous #** command. (FF is the status of DI channels) Examples Command
$014
Response
!0FF0000
Sends a command to read the synchronized data. The status byte of the response is 0, which means that it is NOT the first time the synchronized data has been read after the previous #** command. (FF is the status of DI channels) ※Related Commands: $AA4
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 19 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.5 #AA00(Data) Description Set the digital output value of the lower eight channels. (DO0-DO7) Syntax #AA00(Data)[CHKSUM](CR) #
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
00
Command to set the digital output value of the lower eight channels. (DO0-DO7)
(Data)
A two-digit hexadecimal value, where bit 0 corresponds to DO0, bit 1 corresponds to DO1, etc. When the bit is 1, it denotes that the digital output channel is on, and 0 denotes that the digital output channel is OFF.
Response Valid Command
>[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
Ignored Command
! [CHECKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid commandDelimiter character
!
Ignored Delimiter character A host watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored.
A host watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored. Example Command
#020006
Response
>
Set DO0、DO3 to OFF, DO1、DO2 to ON, and the module returns a valid response.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 20 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Example Command
#020016
Response
?02
Set DO1、DO2 and DO5 to ON, DO0、DO3、DO6、DO7、DO8 to OFF. Invalid Command. (ZT-2060 only supports DO0 to DO3) Example Command
#020005
Response
!
Host Watchdog Timeout. ※Related Commands: #AA0A(Data)、#AA1cDD、AAAcDD、$AA6、@AA、 @AA(Data)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 21 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.6 #AA0A(Data) Description Set the digital output value.(DO0-DO31) Syntax #AA0A(Data)[CHKSUM](CR) #
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
00
Command to set the digital output value. #AA0A(Data) : DO0-DO7 #AA0B(Data) : DO8-DO15 #AA0C(Data) : DO16-DO23 #AA0D(Data) : DO24-DO31
(Data)
A two-digit hexadecimal value, where bit 0 corresponds to DO0, bit 1 corresponds to DO1, etc. When the bit is 1, it denotes that the digital output channel is on, and 0 denotes that the digital output channel is OFF.
Response Valid Command
>[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
Ignored Command
! [CHECKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid command
!
Ignored Delimiter character Watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored.
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. Example Command
#020A0E
Response
>
Set DO0 to OFF,DO1、DO2、DO3 to ON. ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 22 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Example Command
#020A06
Response
!
Set DO0 to OFF,DO1、DO2、DO3 to ON. Example Command
#020A0F
Response
>
Set DO0、DO1、DO2、DO3 to ON. Example Command
#020A00
Response
>
Set DO0、DO1、DO2、DO3 to OFF. ※Related Commands:#AA00(Data)、#AA1cDD、AAAcDD、$AA6、@AA、 @AA(Data)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 23 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.7 #AA1cDD(Data) Description Set a single digital output channel of the lower eight channels. (DO0 ~ DO7) Syntax #AA1cDD(Data)[CHKSUM](CR) #
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
1
Command to set a single digital output channel of the lower eight channels.
c
Specifies the digital output channel to be set (0 to 7).
(Data)
00:set the digital output channel to OFF. 01:set the digital output channel to ON.
Response Valid Command
>[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
Ignored Command
! [CHECKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid command
!
Ignored Delimiter character Watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored.
watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored. Example Command
#021001
Response
>
Set DO0 to ON. Example Command
#021401
Response
?02 ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 24
Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Set the DO4 to ON but replies a delimiter for an invalid command, because the ZT-2060 only supports DO0 to DO3. ※Related Commands:#AA00(Data)、#AA0ADD(Data)、AAAcDD、$AA6、@AA、 @AA(Data)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 25 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.8 #AAAcDD(Data) Description Set a single digital output channel. (DO0-DO31) Syntax #AA0A(Data)[CHKSUM](CR) #
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
A
Command to set a single digital output channel. (DO0-DO31) #AAAcDD : DO0-DO7 #AABcDD : DO8-DO15 #AACcDD: DO16-DO23 #AADcDD : DO24-DO31
c
Specifies the digital output channel to be set. (0-7)
(Data)
00:set the digital output channel to OFF. 01:set the digital output channel to ON.
Response Valid Command
>[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
Ignored Command
! [CHECKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid command
!
Ignored Delimiter character watchdog timeout has occurred, the digital output channel s are set to safe value, and the digital output value that was sent is ignored.
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. Example Command
#02A201
Response
>
Set DO2 to ON. ※Related Commands:#AA00(Data)、#AA0ADD(Data)、AA1cDD、$AA6、@AA、 @AA(Data) ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 26 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.9 #AAN Description Read the digital input counter of channel N. Syntax #AAN[CHKSUM](CR) #
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
N
The channel to be read (DI0 to DIF)
Response Valid Command
!(Data)[CHECKSUM](CR)
Invalid Command
?AA[CHECKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
(Data) Five decimal digits representing the digital input counter data of the specified channel (00000 to 65535). AA
Address of the module to be configured in hexadecimal (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. Example Command
#11
Response
!0100005
Read data from channel 1 of module 01 and the returned counter value is 00005. Example Command
#15
Response
!0100005
Read data from channel 5 of module 01 and the returned counter value is 00005. ※Related Commands:#AACN
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 27 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.10 $AA2 Description Read the module configuration. Syntax $AA2[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
2
Command to read the module configuration
Response Valid Command
!AATTCCFF[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid commandDelimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
TT
Type code of the module, should be 40 for DIO module.
CC
Type code of the module, should be 40 for DIO module.
FF
Checksum and counter update direction settings of the module 00:Falling Edge,CheckSum Disabled 40:Falling Edge,CheckSum Enabled 80:Rising Edge,CheckSum Disabled C0:Rising Edge,CheckSum Enabled
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. Example Command
$12
Response
!01400A80
Read the configuration of module 01. 80 : Read the counter update (Rising Edge), checksum disaabled.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 28 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Example Command
$12
Response
!01400AC0
Read the configuration of module 01. C0 : Read the counter update (Rising Edge), checksum enabled. ※Related Commands:%AANNTTCCFF
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 29 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.11 $AA4 Description Read the synchronized data that was retrieved by the last #** command. Syntax $AA4[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
4
Read the synchronized data that was retrieved by the last #** command.
Response Valid Command
!S(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
S
Status of the synchronized data 1:first read 0:not the first read
(Data) Synchronized data. 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. Example Command
#**
Response
No response
Sends the synchronized sampling command. Command
$014
Response
!10F0000
Read the synchronized data for module 01. The module returns the synchronized data and set the status byte to 1 to indicate that this is the first time the synchronized data has been read. (Digital Input : 0F) ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 30 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Command
$024
Response
!10053F00
Read the synchronized data for module 01. The module returns the synchronized data and set the status byte to 0 to indicate that the synchronized data has been read. (Digital Output : 05; Digital Input : 3F) ※Related Commands:#**
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 31 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.12 $AA5 Description Read the reset status of a module.
Syntax $AA5[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
5
Read the reset status of a module.
Response Valid Command
!AAS(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
S
Read the reset status of a module 0:This is the first time the command has been sent since the module was
powered on. 1:This is not the first time the command has been sent since the module was powered on, which denotes that there has been no module reset since the last $AA5 command was sent. 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.
Example Command
$015
Response
!011
Read the reset status of module 01. The response shows that it is the first time the $AA5 command has been sent since the module was powered-on.
Example Command
$015
Response
!010
Read the reset status of module 01. The response shows that it is not the first time the $AA5 command has been sent since the module was powered-on. ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 32 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.13 $AA6 Description Read the status of the digital input/output channels. Syntax $AA6[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
6
Read the status of the digital input/output channels.
Response Valid Command
!(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
(Data) Status of the digital input/output channels, a four- digit hexadecimal value followed by 00. 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. Example Command
$016
Response
!FF0000
Read the digital input/output channel status of module 01. (Digital Input:FF) Example Command
$026
Response
!070F00
Read the digital input/output channel status of module 02. (Digital Output:07; Digital Input:0F) ※Related Commands:#AA00(Data)、#AA0A(Data)、AA1cDD、#AAAcDD、@AA、 @AA(Data)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 33 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.14 $AAC Description Clear the status of the latched digital input channels. Syntax $AAC[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
C
Clear the status of the latched digital input channels.
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid commandDelimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
Clear the status of the latched digital input channels. Example Command
@016
Response
>
Set DO1、DI2 to ON, DO0、DO3 to OFF Command
$01C
Response
!01
Set DO1、DI2 to ON, DO0、DO3 to OFF Command
$01L0
Response
!093F00
Send the command to read the status of the low latched digital input channels of module 01. (Low Latched DI : 3F; Low Latched DO : 09) ※Related Commands:$AALS
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 34 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.15 $AACN Description Clear the digital input counter of channel N. Syntax $AACN[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
C
Clear the digital input counter of channel N.
N
Clear the digital input counter of channel N.
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (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. Example Command
#011
Response
!0100009
Read counter data from channel 1 of module 01 and the returned counter value is 00009. Command
$01C1
Response
!01
Clear the counter value of channel 1 of module 01 and returns a valid response. Command
#011
Response
!0100000
Clear the counter value of channel 1 of module 01 and returns a valid response. ※Related Commands:#AAN ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 35 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.16 $AAF Description Read the firmware version of a module. Syntax $AAF[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
F
Read the firmware version of a module.
Response Valid Command
!AA(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data) Firmware version string 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. Example Command
$01F
Response
!0102.00
Read the firmware version of module 01, and shows that it is version 02.00.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 36 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.17 $AALS Description Read the status of the latched digital input channels. Syntax $AALS[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
L
Read the status of the latched digital input channels.
S
0:Read the status of the latched digital input channels. 1:Read the status of the latched digital input channels.
Response Valid Command
!(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data) Status of the latched digital input channels, a four- digit hexadecimal value followed by 00. 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.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 37 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Example Command
@016
Response
>
Set DO1、DO2 to ON and DO0、DO3 to OFF. Command
$01C
Response
!01
Sends the command to clear the status of the latched digital input channels of module 01 and returns a valid response. Command
$01L0
Response
!093F00
Sends the command to read the status of the low latched digital input channels of module 01.(Low Latched DI : 3F; Low Latched DO : 09 ) Command
$01L1
Response
!060000
Sends the command to read the status of the high latched digital input channels of module 01. (High Latched DI : 00; High Latched DO : 06 ) ※Related Commands:$AAC
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 38 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.18 $AAM Description Read the name of a module. Syntax $AAM[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
M
Read the name of a module.
Response Valid Command
!AA(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data) Read the name of a 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. Example Command
$01M
Response
!01ZT-2060
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.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 39 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.19 $AAP Description Read the communication protocol information. Syntax $AAP[CHKSUM](CR) $
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
P
Read the communication protocol information.
Response Valid Command
!AASC[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
S
The protocols supported by the module 0:DCON 1:DCON and Modbus RTU 3:DCON and Modbus RTU/ASCII
C
The protocols supported by the module 0:DCON 1:Modbus RTU 3:Modbus ASCII
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. Example Command
$01P
Response
!0110
Read the communication protocol of module 01 and returns a response of 10 meaning that it supports the DCON and Modbus RTU protocols and the protocol that will be used at the next power-on reset is DCON.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 40 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.20 @AA Description Read the status of the digital input/output ports. Syntax @AA[CHKSUM](CR) @
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
Response Valid Command
>(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data) Status of the digital input/output ports, a four-digit hexadecimal value. 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. Example Command
@02
Response
>0F0F
Read the digital input/output port status of module 02 and returns >0F0F, which denotes that RL1, RL2, RL3 and RL4 are ON and IN1, IN2, IN3 and IN4 are also ON. ※Related Commands:#AA00(Data)、#AA0A(Data)、#AA1cDD、#AAAcDD、$AA6 @AA(Data)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 41 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.21 @AA(Data) Description Set the digital output channels. Syntax @AA(Data)[CHKSUM](CR) @
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data)
Data to be written to the digital output channels. Bit 0 of the value corresponds to DO0 and bit 1 of the value corresponds to DO1, etc. When the bit is 1, it denotes that the digital output channel is ON, and 0 denotes that the digital output channel is OFF.
Response Valid Command
>[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
Ignored Command
! [CHECKSUM](CR)
>
Delimiter for a valid command
?
Delimiter for an invalid command
!
Ignored Delimiter character watchdog timeout has occurred, the digital output ports are set to safe value, and the digital output value that was sent is ignored.
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. Example Command
@02F
Response
>
Set DO0、DO1、DO2、DO3 to ON. ※Related Commands:#AA00(Data)、#AA0A(Data)、#AA1cDD、#AAAcDD、$AA6 @AA
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 42 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.22 ~AAD Description Read Digital I/O Active status. Syntax ~AAD[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
D
Command to read the DI/O active status
Response Valid Command
!AAVV[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
VV
A two-digit hexadecimal value indicating the DI/O active status.
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. 7
6
5
4
3
2
Reserved
1
0
OAS
IAS
DO Active Status 0:output value 0 for relay inactive OAS
output value 1 for relay active 1:output value 0 for relay active output value 1 for relay inactive DI Active Status 0:input value 1 for non-signal or the low voltage
IAS
input value 0 for high voltage 1:input value 0 for non-signal or the low voltage; input value 1 for high voltage
※Related Commands:~AADVV
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 43 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.23 ~AADVV Description Set Digital I/O Active status Syntax ~AADVV[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
D
Command to set the DI/O active status.
VV
A two-digit hexadecimal value indicating the DI/O active status.
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
Set DI/DO active status. Example Command
~02D03
Response
!02
Set DI/DO active status. Command
~02D
Response
!0203
Read DI/DO active status ※Related Commands:~AAD
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 44 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.24 ~** Description Informs all modules that the host is OK Syntax ~**[CHKSUM](CR) ~
Delimiter character
**
Host OK Command
Response No response ※Related Commands:~AA0、~AA1、~AA2、~AA3EVV、~AA4V、~AA5V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 45 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.25 ~AA0 Description Read the host watchdog status of a module. Syntax ~AA0[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
0
Command to read the module status
Response Valid Command
!AASS[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
SS
Command to read the module status Bit 7: 0 indicates that the host watchdog is disabled; 1 indicates that the host watchdog is enabled. Bit 2: 1 indicates that a host watchdog timeout has occurred; 0 indicates that no host watchdog timeout has occurred. The host watchdog status is stored in EEPROM and can only be reset by using the ~AA1 command
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. Example Command
~030
Response
!0304
The host watchdog status is stored in EEPROM and can only be reset by using the ~AA1 command
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 46 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Example Command
~030
Response
!0300
Read the host watchdog status of module 03 and returns 00, meaning that the host watchdog is disabled and no host watchdog timeout has occurred. Example Command
~030
Response
!0380
Read the host watchdog status of module 03 and returns 08, meaning that the host watchdog is enabled. Sent ~** to clear watchdog timeout value. ※Related Commands:~**、~AA1、~AA2、~AA3EVV、~AA4V、~AA5V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 47 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.26 ~AA1 Description Reset the host watchdog timeout status of a module Syntax ~AA1[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
1
Reset the host watchdog timeout status of a module
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (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 Example Command
~030
Response
!0304
Read the host watchdog status of module 03 and shows that a host watchdog timeout has occurred. Command
~031
Response
!03
Reset the host watchdog timeout status of module 03 and returns a valid response. ※Related Commands:~**、~AA0、~AA2、~AA3EVV、~AA4V、~AA5V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 48 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.27 ~AA2 Description Read the host watchdog timeout value of a module Syntax ~AA2[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
2
Command to read the host watchdog timeout value
Response Valid Command
!AAEVV[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (00 to FF)
E
0:the host watchdog is disabled 1:the host watchdog is enabled
VV
Two hexadecimal digits to represent the timeout value in tenths of a second. For example, 01 denotes 0.1 seconds and FF denotes 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. Example Command
~032
Response
!03190
Read the host watchdog timeout value of module 03 and returns 0x90, which denotes that the host watchdog is enabled and the host watchdog timeout value is 14.4 seconds ※Related Commands:~**、~AA0、~AA1、~AA3EVV、~AA4V、~AA5V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 49 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.28 ~AA3EVV Description Enables/disables the host watchdog and set the host watchdog timeout value of a module Syntax ~AA3EVV[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
3
Command to set the host watchdog
E
0:the host watchdog is disabled 1:the host watchdog is enabled
VV
Two hexadecimal digits to represent the timeout value in tenths of a second. Ex: 01 denotes 0.1 seconds and FF denotes 25.5 seconds
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (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 Example Command
~013164
Response
!01
Enables the host watchdog of module 01 and set the host watchdog timeout value to 10.0 seconds. The module returns a valid response Command
~012
Response
!01164
Read the host watchdog timeout value of module 01. The module returns 164, which denotes that the host watchdog is enabled and the host watchdog timeout value is 10.0 seconds. ※Related Commands:~**、~AA0、~AA1、~AA2、~AA4V、~AA5V ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 50 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.29 ~AA4V Description Read the power-on DO value or the safe DO value of a module Syntax ~AA4V[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
4
Command to read the power-on DO value or the safe DO value
V
P: Power On Value S: Safe Value
Response Valid Command
!AA(Data)[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid commandDelimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
(Data) Power ON Value or Safe Value 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. Example Command
~034P
Response
!030700
Read the power-on DO value of module 03 and returns 0700. Example Command
~034S
Response
!030F00
Read the safe DO value of module 03 and returns 0F00. ※Related Commands:~AA5V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 51 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.2.30 ~AA5V Description Set the current DO value as the power-on DO value or the safe DO value Syntax ~AA5V[CHKSUM](CR) ~
Delimiter character
AA
Address of the module to be configured in hexadecimal (00 to FF)
5
Command to set the power-on value or the safe DO value
V
P: Power On Value S: Safe Value
Response Valid Command
!AA[CHKSUM](CR)
Invalid Command
?AA[CHKSUM](CR)
!
Delimiter for a valid command
?
Delimiter for an invalid command
AA
Address of the module to be configured in hexadecimal (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 Example Command
@037
Response
>
Set DO0、DO1、DO2 to ON and DO3 to OFF Command
~035P
Response
!03
Set the power-on DO value and the module returns a valid response Example Command
@03F
Response
>
Set DO0、DO1、DO2 and DO3 to ON ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 52 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Command
~035S
Response
!03
Set the safe DO value and the module returns a valid response. ※Related Commands:~AA4V
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 53 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3
Modbus RTU Protocol Command set
The Modbus protocol is developed by Modicon Inc., originally developed for Modicon controllers. Detailed information can be found more valuable information at http://www.modicon.com http://www.modbus.org
Modbus RTU Command Format Field
Field
Field
Field
欄位
1
2
3
4~n
n+1~n+2
Module
Function
Sub
Configuration
Address
Code
function
field
CRC16
Function Code
Description
0x01
Read coils
0x02
Read discrete inputs
0x03
Read multiple registers
0x04
Read multiple input registers
0x05
Write single coils
0x0F
Write multiple coils
Example: A. To modify the power-on value of the module from 01, the following command should be sent 01 46 27 0F BB F9 B. To read the current DI value of channels 0 to 5, the following command should be sent: 01 02 00 00 00 05 B8 09 C. To write the DO value 0x0F from channels 0 to 4, the following command should be sent: 01 0F 00 00 00 04 01 FF
7E D6
D. To only set the DO value of channel 2 to 1, the following command should be sent: 01 05 00 02 FF 00
2D FA
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 54 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.1
Modbus Address Mapping Address Mapping
Address
Description
Attribute
00001
Digital Output Channel
R/W
00033
Digital Input Channel
R
10001
Digital Input Channel
R
00065
High Latched DI/O Channels
R
00097
Low Latched DI/O Channels
R
00129
Safe Value
R/W
00161
Power On Value
R/W
40485
Module address, valid range 1 ~ 247
R/W
(1) bits 5:0 (Baud rate) Valid range: 0x03-0x0A 40486
(2) bits 7:6 (Data Format) 00:no parity, 1 stop bit
R/W
10:even parity, 1 stop bit 11:odd parity, 1 stop bit 00264
Clear Latched DI/O
W
00513
Clear DI Count
W
40481
Firmware version (low word)
R
40482
Firmware version (high word)
R
40483
Module name (low word)
R
40484
Module name (high word)
R
30001
DI Count Value
R
00270 40488 40492
Host watch dog timeout status, write 1 to clear host watchdog timeout status. Modbus reponse delay time in ms (Valid range:0~30 ms) Host watchdog timeout count,write 0 to clear
R/W R/W R/W
Modbus host watchdog mode 00260
0:same as I-7000 1:can use AO and DO command to clear host
R/W
watchdog timeout status
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 55 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
00261
1 : enable; 0 : disable host watchdog
R/W
40489
Host watchdog timeout value, 0~255, in 0.1s
R/W
00257
Protocol, 0: DCON, 1: Modbus
R/W
Reset status 10273
1: first read after powered on,
R
0 : not the first read after powered on 312345 412345
Informs all modules that the host is OK
R
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 56 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.2 PLC Address Mapping Function code
Description
Section
0x01
Read coils
3.1
0x02
Read discrete inputs
3.2
0x03
Read multiple registers
3.3
0x04
Read multiple input registers
3.4
0x05
Write single coils
3.5
0x06
Write multiple registers
3.6
0x0F
Write multiple coils
3.7
0x46
Read/Write module settings
3.8
If the function specified in the message is not supported, then the module responds as follows. Address mapping of Protocol(Base 0). Error Response Number
Description
Length
Value
00
Address
1
1 to 247
01
Function code
1
Function code + 0x80
02
Exception code
1
01
Note: If a CRC mismatch occurs, the module will not respond.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 57 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.3 01(0x01)Read Coils Description This function code is used to read the current digital output readback value of the ZT-2000 I/O device Request Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x01
Starting channel 02-03
numbers or
2
address mapping
Value
DO
0x0000 ~ 0x001F
DI
0x0020 ~ 0x003F
DI/O Latch High
0x0040 ~ 0x005F
DI/O Latch Low
0x0060 ~ 0x007F
Safe Value
0x0080 ~ 0x009F
Power On Value
0x00A0 ~ 0x00BF
Read WDT Mode
0x0103
Read WDT Enable
0x0104
Read WDT Status
0x010D
Read Protocol
0x0100
Read Reset Status
0x0110
Output channel 04-05
number or
2
0x0001-0x0020 (Bit count)
bit count Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x01
02
Byte Count
1
Byte count of response (B=(bit count + 7)/8)
03
Bit values
B
(Bit values)
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x81
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 58 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
Response
05 01 00 00 00 04 [ 3C 4D ] Byte 1
01 (Function Code)
Byte 2~3
00 00 (starting channel numbers)
Byte 4~5
00 04 (output channel number)
Byte 6~7
3C 4D (CRC)
05 01 01 06 [ D0 BA ] Byte 1
01 (Function Code)
Byte 2
01 (Byte count of response)
Byte 3
06 (DO0~DO3 Value)
Byte 4~5
D0 BA (CRC)
Read digital output value Examples Command
05 01 00 40 00 04 [ 3D 99 ]
Response
05 01 01 07 [ 11 7A ]
Read digital input high latch Examples Command
05 01 01 03 00 01 [ 0D B2 ]
Response
05 01 01 00 [ 50 B8 ]
Read modbus host watchdogʼs mode Examples Command
05 01 01 10 00 01 [ FC 77 ]
Response
05 01 01 01 [ 91 78 ]
Read reset status of modules Examples Command
05 01 01 04 00 01 [ BC 73 ]
Response
05 01 01 00 [ 50 B8 ]
Read host watchdog setting (enabled or not) Examples Command
05 01 01 0D 00 01 [ 6C 71 ]
Response
05 01 01 00 [ 50 B8 ]
Reset the host watchdog timeout status of a module ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 59 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Supported modules – ZT-2060
Items
Valid Starting channel
DO
0x0000 ~ 0x0003
DI
0x0020 ~ 0x0025
High Latched DI Channel
0x0040 ~ 0x0045
High Latched DO Channel
0x0046 ~ 0x0049
Low Latched DI Channel
0x0060 ~ 0x0065
Low Latched DO Channel
0x0066 ~ 0x0069
Safe Value
0x0080 ~ 0x0083
Power On Value
0x00A0 ~ 0x00A3
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 60 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.4 02(0x02)Read Discrete Inputs Description This function code is used to read the current digital input value of the ZT-2000 I/O module.
Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x02
2
DI
2
0x0001-0x0020 (Bit count)
Starting channel 02-03
numbers or
0x0000 ~ 0x001F
address mapping Output channel number or
04-05
bit count
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x02
02
Byte Count
1
Byte count of response (B=(bit count + 7)/8)
03
Bit values
B
(Bit values)
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x82
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 61 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
Response
01 02 00 00 00 08 [ 79 CC ] Byte 1
02 (Function Code)
Byte 2~3
00 00 (starting channel numbers)
Byte 4~5
00 08 (output channel number)
Byte 6~7
79 CC (CRC)
01 02 01 FF [ E1 C8 ] Byte 1
02 (Function Code)
Byte 2
01 (Byte count of response)
Byte 3
FF (DI0 ~ DI7 Value)
Byte 4~5
E1 C8 (CRC)
Read digital iutput value
Supported modules – ZT-2060
Item
Valid Starting channel
DI
0x0020 ~ 0x0025
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 62 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.5 03(0x03)Read Multiple Registers Description This function code is used to read the current digital input counter value of the ZT-2000 I/O device Request Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x03
Starting channel numbers or
02-03
2
address mapping
Value
DI
0x0000 ~ 0x001F
Module Address
0x01E4
Firmware Version
0x01E0
Module Name
0x01E2
Modbus Response Time 0x01E7 Timeout Count
0x01EB
Timeout Value
0x01E8
Host OK
0x3038
Output channel 04-05
number or
2
0x0001-0x0020 (Bit count)
bit count Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x03
02
Byte Count
1
Byte count of response (B=2 * word count)
03~
Bit values
B*2
Register values
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x83
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 63 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
Response
01 03 01 E2 00 02 [ 65 C1 ] Byte 1
03 (Function Code)
Byte 2~3
01 E2 (starting channel numbers)
Byte 4~5
00 02 (output channel number)
Byte 6~7
65 C1 (CRC)
01 03 04 20 60 00 00 [ F2 ED ] Byte 1
03 (Function Code)
Byte 2
04 (Byte count of response)
Byte 3
20 60 00 00 (Module Name)
Byte 4~5
F1 ED (CRC)
Read moduleʼs name Examples Command
05 03 01 E4 00 01 [ C4 45 ]
Response
05 03 02 00 05 [ 89 87 ]
Read address of modules Examples Command
01 03 00 00 00 08 [ 44 0C ]
Response
01 03 10 00 15 00 15 00 15 00 15 00 15 00 15 00 15 00 15 [ 2D 56 ]
Read address of modules Examples Command
05 03 01 E7 00 01 [ 34 45 ]
Response
05 03 02 00 00 [ 49 84 ]
Read modbus response delay time Examples Command
05 03 01 EB 00 01 [ F4 46 ]
Response
05 03 02 00 00 49 84
Read the host watchdog timeout value of a module
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 64 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
00 03 30 38 00 01 [ 0B 16 ]
Response
No response
Informs all modules that the host is OK
Supported modules – ZT-2060
Item
Valid Starting channel
DI Count Value
0x0000 ~ 0x0005
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 65 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.6 04(0x04)Read Multiple Input Registers Description This function code is used to read the current digital input counter value of the ZT-2000 I/O device Request Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x04
Starting channel numbers or
02-03
2
address mapping
Value
DI
0x0000 ~ 0x001F
Module Address
0x01E4
Firmware Version
0x01E0
Module Name
0x01E2
Modbus Response Time
0x01E7
Timeout Count
0x01EB
Timeout Value
0x01E8
Host OK
0x3038
Output channel 04-05
number or
2
0x0001-0x0020 (Bit count)
bit count Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x04
02
Byte Count
1
Byte count of response (B=2 * word count)
03~
Bit values
B*2
Register values
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x84
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 66 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
05 04 01 E2 00 02 [ D1 85 ]
Response
05 04 04 20 60 00 00 [ B5 9A]
Read moduleʼs name Examples Command
01 04 01 E4 00 01 [ 70 01 ]
Response
01 04 02 00 01 78 F0
Read moduleʼs name Examples Command
01 03 00 00 00 02 [ C4 0B ]
Response
01 03 04 00 15 00 15 [ 2A 38 ]
Read DI count of modules Examples Command
05 04 01 E7 00 01 [ 81 85 ]
Response
05 04 02 00 00 [ 48 F0 ]
Read modbus response delay time Examples Command
00 04 30 38 00 01 [ BE D6 ]
Response
No response
Informs all modules that the host is OK
Supported modules – ZT-2060
Item
Valid Starting channel
DI Count Value
0x0000 ~ 0x0005
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 67 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.7 05(0x05)Write Single Coils Description This function code is used to write the digital output value of the ZT-2000 I/O device. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x05 DO
0x0000 ~ 0x001F
DI Counter Value 0x0200 ~ 0x021F
02-03
Starting channel numbers
2
Safe Value
0x0080 ~ 0x009F
Power On Value
0x00A0 ~ 0x00BF
Clear Latched
0x0107
Set WDT Mode
0x0103
Set WDT Enable
0x0104
Clear WDT Status 0x010D 04-05
Output value
2
A value 0xFF00 set the output to ON; A value 0x0000 set the output to OFF
Response Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x05
02~03
Address
2
04~05
Output channel numbers
2
Value
This value is the same as byte 02 and 03 of the Request This value is the same as byte 04 and 05 of the Request
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x85
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 68 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
05 05 00 83 FF 00 [ 7C 56 ]
Response
05 05 00 83 FF 00 [ 7C 56 ]
Set DO3 power-on value to ON Examples Command
05 05 02 00 FF 00 [ 8C 06 ]
Response
05 05 02 00 FF 00 [ 8C 06 ]
Clear digital input counter Examples Command
05 05 00 02 FF 00 [ 2C 7E ]
Response
05 05 00 02 FF 00 [ 2C 7E ]
Set DO2 to ON Examples Command
05 05 01 07 FF 00 [ 3D 83 ]
Response
05 05 01 07 FF 00 [ 3D 83 ]
Clear DIO latch of modules Examples Command
05 05 01 03 FF 00 [ 7C 42 ]
Response
05 05 01 03 FF 00 [ 7C 42 ]
Set host watchdog mode (Mode 1) Examples Command
05 05 01 03 00 00 [ 3D B2 ]
Response
05 05 01 03 00 00 [ 3D B2 ]
Set host watchdog mode (Mode 0) Examples Command
05 05 01 04 FF 00 [ CD 83 ]
Response
05 05 01 04 FF 00 [ CD 83 ]
Set host watchdog enable
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 69 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
05 05 01 0D FF 00 [ 1D 81 ]
Response
05 05 01 0D FF 00 [ 1D 81 ]
Set host watchdog enable
Supported modules – ZT-2060
Item
Valid Starting channel
DO
0x0000 ~ 0x0003
Clear DI Count Value
0x0200 ~ 0x0205
Safe Value
0x0080 ~ 0x0083
Power ON Value
0x00A0 ~ 0x00A3
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 70 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.8 06(0x06)Write Multiple Registers Description This function code is used to set the settings of the module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x06 Set
02-03 Address mapping
04-05
Register value
2
2
modbus
response
delay
time
0x01E7
Clear watchdog timeout count
0x01EB
Set watchdog timeout value
0x01E8
Set watchdog timeout value
Response Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x06
02~03 Address mapping
2
04~05
2
Register value
Value
The value is the same as byte 02 and 03 of the Request Register value
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x86
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
Response
05 06 01 E7 00 10 [ 38 49 ] Byte 1
06 (Function Code)
Byte 2~3
01 E7 (Address mapping )
Byte 4~5
00 10 (delay 16 ms )
Byte 6~7
65 C1 (CRC)
05 06 01 E7 00 10 [ 38 49 ] ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 71
Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
05 06 01 E8 00 C8 [ 08 10 ]
Response
05 06 01 E8 00 C8 [ 08 10 ]
Set host watchdog timeout value (0~255,in 0.1s) Examples Command
09 06 01 EB 00 00 [ F9 4A ]
Response
09 06 01 EB 00 00 [ F9 4A ]
Set host watchdog timeout value (0~255,in 0.1s)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 72 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.9 15(0x0F)Write multiple coils Description This function code is used to write the digital output value of the ZT-2000 I/O device. Request Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x0F
02-03
04-05
Starting channel numbers Output channel number
06
Byte Count
2
Value
DO
0x0000 ~ 0x001F
Clear DI count value
0x0200 ~ 0x021F
Safe Value
0x0080 ~ 0x009F
Power ON Value
0x00A0 ~ 0x00BF
2
0x0001 ~ 0x0020 (Bit count)
1
B=(bit count + 7)/8 A bit corresponds to a channel. When the bit is
07
Output value
2
ʻ1ʼ it denotes that the value of the channel that was set is ON. If the bit is ʻ0ʼ it denotes that the value of the channel that was set is OFF.
Response Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x0F
02~03 04~05
Starting channel numbers Input channel number
2 2
Value
The value is the same as byte 02 and 03 of the Request 0x0001 ~ 0x0020
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x8F
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 73 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
Examples Command
05 0F 00 A1 00 03 01 07 [ 72 BF ]
Response
05 0F 00 A1 00 03 [ 45 AC ]
Set Safe value (DO1-DO3) Examples Command
05 0F 00 00 00 03 01 FF [ CE E4 ]
Response
05 0F 00 00 00 03 14 4E
Set DO value (DO0-DO3) Examples Command
01 0F 02 00 00 08 01 FF [ BF 37 ]
Response
01 0F 02 00 00 08 55 B5
Clear DI count (DI0-DI7)
Supported modules – ZT-2060
Item
Valid Starting channel
DO
0x0000 ~ 0x0003
Clear DI Count Value
0x0200 ~ 0x0205
Safe Value
0x0080 ~ 0x0083
Power ON Value
0x00A0 ~ 0x00A3
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 74 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
4.3.10 70(0x46)Read/Write module settings Description 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 Sub-Function code
Description
Section
00 (0x00)
Read the module name
A.1
05 (0x05)
Read the communication settings
A.2
32 (0x20)
Read the firmware version
A.3
33 (0x21)
Set the DI count edge
A.4
34 (0x22)
Read DI count edge setting value
A.5
39 (0x27)
Set the DO power-on value
A.6
40 (0x28)
Read the DO power-on value
A.7
41 (0x29)
Set the DI/O active status
A.8
42 (0x2A)
Read the DI/O active status
A.9
53 (0x35)
Read the response delay time
A.10
54 (0x36)
Set the response delay time
A.11
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 75 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.1 00(0x00) Read Module Name Description This sub-function code is used to read the name of a module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x00
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x00
03~06
Module name
4
0x54 0x20 0x60 0x00 for ZT-2060
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 00 [ 12 60 ]
Response
01 46 00 54 20 60 00 [ 3C 9C ]
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 76 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.2 05(0x05) Read Communication Description This sub-function code is used to read the communication protocol settings of a module Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x05
03
Reserved
1
0x00
Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x05
03
Protocol support
1
1: DCON and Modbus RTU supported
04
Baud Rate
1
0x0A
05
Reserved
1
0x00
06
Parity
1
0=N,8,1; 2=N,8,2; 3=E,8,1; 4=O,8,1
07
Reserved
1
0x00
08
Cureent Protocol
1
0=DCON; 1=Modbus RTU; 3=Modbus ASCII
09~10
Reserved
2
0x00 0x00
Response Value
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
02 46 05 00 [ E3 19 ]
Response
02 46 05 03 0A 00 00 00 01 00 00 [ 6B 12 ]
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 77 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.3 32(0x20) Read Firmware Version Description This sub-function code is used to read the firmware version information of a module Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x20
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x20
03
Major version
1
0x00 ~ 0xFF
04
Minor version
1
0x00 ~ 0xFF
05
Minor version
1
0x00 ~ 0xFF
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 20 [ 13 B8 ]
Response
01 46 20 01 00 00 [ D2 05 ]
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 78 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.4 33(0x21) Set Digital Input Count Edge Description This sub-function code is used to set the digital input counter trigger edge value of a module Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x20
03
Edge setting value
1
0x00 ~ 0xFF (DI0 ~ DI7)
04
Edge setting value
1
0x00 ~ 0xFF (DI8 ~ DI15)
05
Edge setting value
1
0x00 ~ 0xFF (DI16 ~ DI23)
06
Edge setting value
1
0x00 ~ 0xFF (DI24 ~ DI31)
(1 = rising edge; 0 = falling edge) For example, 0x03 denotes that channels 0~1 are set as rising edge and channels 2~3 are set as falling edge Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x21
03
Edge setting value
1
0 : OK; Others : Error
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 21 FF [ B8 1D ]
Response
01 46 21 00 [ F8 5D ]
Examples Command
01 46 22 [ 92 79 ]
Response
01 46 22 FF [ B8 ED ] ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 79
Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.5 34(0x22) Read Digital Input Count Edge Description This sub-function code is used to read the digital input counter trigger edge value of a module Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x22
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x21
03
Edge setting value
1
0x00 ~ 0xFF (DI0 ~ DI7)
04
Edge setting value
1
0x00 ~ 0xFF (DI8 ~ DI15)
05
Edge setting value
1
0x00 ~ 0xFF (DI16 ~ DI23)
06
Edge setting value
1
0x00 ~ 0xFF (DI24 ~ DI31)
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
05 46 21 3F [ B9 7D ]
Response
05 46 21 3F [ B9 7D ]
Set DI0-DI5 count edge (Rising edge) Examples Command
05 46 22 [ D3 B8 ]
Response
05 46 22 [ D3 B8 ]
Set DI0-DI5 count edge (Rising edge)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 80 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.6 39(0x27) Set Power-on Value Description This sub-function code is used to set the power-on value of a module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x27
03
Power ON Value
1
0x00 ~ 0xFF (DO0 ~ DO7)
04
Power ON Value
1
0x00 ~ 0xFF (DO8 ~ DO15)
05
Power ON Value
1
0x00 ~ 0xFF (DO16 ~ DO23)
06
Power ON Value
1
0x00 ~ 0xFF (DO24 ~ DO31)
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x27
03
Power ON Value
1
0 0x00=OK; Others=Error
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
05 46 27 0F [ BA C9 ]
Response
05 46 27 00 [ FA CD ]
Set DO0-DO3 power-on value Examples Command
05 46 28 [ 53 BF ]
Response
05 46 28 0F [ BF 39 ]
Set DO0-DO3 power-on value
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 81 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.7 40(0x28) Read Power-on Value Description This sub-function code is used to read the power-on value of a module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x28
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x27
03
Power ON Value
1
0x00 ~ 0xFF (DO0 ~ DO7)
04
Power ON Value
1
0x00 ~ 0xFF (DO8 ~ DO15)
05
Power ON Value
1
0x00 ~ 0xFF (DO16 ~ DO23)
03
Power ON Value
1
0x00 ~ 0xFF (DO24 ~ DO31)
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 82 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.8 41(0x29) Set DI/O Active Status Description This sub-function code is used to set the DI/O active states of a module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x29
03
DI/O Active Status
1
0x00 ~ 0x03
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x29
03
DI/O Active Status
1
0x00 = OK; Others = Error
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 29 02 [ 7E 5C ]
Response
01 46 29 00 [ FF 9D ]
Set the DI/O active states Examples Command
01 46 2A [ 93 BF ]
Response
01 46 2A 02 [ 7E AC ]
Read the DI/O active states
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 83 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
7
6
5
4
3
2
Reserved
1
0
OAS
IAS
DO Active Status 0:output value 0 for relay inactive OAS
output value 1 for relay active 1:output value 0 for relay active output value 1 for relay inactive DI Active Status 0:input value 1 for non-signal or the low voltage
IAS
input value 0 for high voltage 1:input value 0 for non-signal or the low voltage; input value 1 for high voltage
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 84 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.9 42(0x2A) Read DI/O Active Status Description This sub-function code is used to read the DI/O active states of a module Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x2A
Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x2A
03
DI/O Active Status
1
0x00 ~ 0x03
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 29 02 [ 7E 5C ]
Response
01 46 29 00 FF 9D
Set the DI/O active states Examples Command
01 46 2A [ 93 BF ]
Response
01 46 2A 02 [ 7E AC ]
Read the DI/O active states
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 85 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
7
6
5
4
3
2
Reserved
1
0
OAS
IAS
DO Active Status 0:output value 0 for relay inactive OAS
output value 1 for relay active 1:output value 0 for relay active output value 1 for relay inactive DI Active Status 0:input value 1 for non-signal or the low voltage
IAS
input value 0 for high voltage 1:input value 0 for non-signal or the low voltage; input value 1 for high voltage
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 86 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.10 53(0x35) Read the Response Delay Time Description This sub-function code is used to read modbus response delay time of a module. Request Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x35
Response Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x35
1
(Data)
03
Response Delay Time
Value
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
Examples Command
01 46 36 1E [ 77 A5 ]
Response
01 46 36 1E [ 77 A5 ]
Set modbus response delay time (30ms) Examples Command
01 46 35 [ D2 77 ]
Response
01 46 35 1E [ 77 55 ]
Read modbus response delay time (30ms)
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 87 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
A.11 54(0x36) Set the Response Delay Time Description This sub-function code is used to set modbus response delay time of a module Request Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x36
1
(Data)
03
Response Delay Time
Value
Response Byte
Description
Length
00
Address
1
1 - 247
01
Function code
1
0x46
02
Sub-Function code
1
0x36
1
(Data)
03
Response Delay Time
Value
Error Response Byte
Description
Length
Value
00
Address
1
1 - 247
01
Function code
1
0xC6
02
Exception code
1
Refer to Modbus standard for more details
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 88 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
5
Troubleshooting
(1) Technical Support. If you are any difficulties using the ZT-2000 I/O device, please send the description of DIP switch status to the ZT-2000 I/O device. Please also save the configurations of ZT-2000 coordinator via using the described below. Please provide a description of problem and attach file to an email and send it to
[email protected]
a.
Set the DIP switch of the ZT-255x device to the [ZBSET] position then reboot the device. Launch the ZT Configuration Utility and select [Save Log] icon to save the configuration of ZT-255x as a file.
b. After clicking the [Save Log] icon, enter the “File Name” and “File Path” in the Windows save dialog. Once the configuration has been successfully saved, the following message will be displayed.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 89 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6
Appendix
6.1
INIT Mode
Each ZT-2000 I/O device has a build-in EEPROM to store configuration information such as address, Pan ID, ZigBee Channel and other information. User may forget the configuration of module. Therefore, the ZT-2000 I/O device have a special mode named “INIT mode”. When the module is powered on in INIT mode the configuration of the module is reset as follows : 1. Node ID(Address):0x00。 2. ZigBee Pan ID:0x0000。 3. ZigBee RF Channel:0x00。 4. Baud Rate:None,The same with the ZT-2550/ZT-2570。 5. CheckSum disabled。 6. Protocol:DCON。 The configuration information stored in the EEPROM is not changed and can be read by sending the $FF2(CR) command
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 90 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6.2
Dual Watchdog operation
Dual Watchdog = Module Watchdog + Host Watchdog The Module Watchdog is a hardware reset circuit that monitors the operating status of the module. While working in harsh or noisy environments, the module may be shut down by external signals. The circuit allows the module to work continuously without disruption. The Host Watchdog is a software function that monitors the operating status of the host. Its purpose is to prevent problems due to network/communication errors or host malfunctions.
When a host watchdog timeout occurs, the module
will reset all outputs to a safe state in order to prevent any erroneous operations of the controlled target. ZT-2000 series devices include an internal Dual Watchdog, making the control system more reliable and stable.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 91 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6.3
Reset Status
The reset status of a module is set when the module is powered-on or when the module is reset by the module watchdog. It is cleared after the responding of the first $AA5 command. This can be used to check whether the module had been reset. When the $AA5 command responds that the reset status is cleared, that means the module has not been reset since the last $AA5 command was sent. When the $AA5 command responds that the reset status is set and it is not the first time $AA5 command is sent, it means the module has been reset and the digital output value had been changed to the power-on value.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 92 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6.4
Digital Output
Besides setting by the set digital output commands, the digital outputs can be set by two other conditions. When the host watchdog is enabled and a host watchdog timeout occurs, the “safe value” is loaded into the digital output ports. The set digital output commands have no effect on the digital output ports until the host watchdog timeout status is cleared. The host watchdog timeout status is saved in the EEPROM. The status is not changed even after power-on reset. It can be cleared only by the reset host watchdog timeout status command ~AA1. See Section A.2 for host watchdog details. When the module is powered on and the host watchdog timeout status is cleared, the “power-on value” is loaded into the digital output ports. If the host watchdog timeout status is not cleared on power-on, then the safe value is loaded into the digital output ports. Both the safe value and power-on value are set by the ~AA5Vcommand. Refer to Section 4.2.30 for details.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 93 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6.5
Latched Digital Input
The ZT-2000 devices provide commands to read the latched high digital input and latched low digital input status. Following is an example to show the usefulness of the latched digital input. When we want to read the key stroke of a key switch which is connected to the digital input channel of a module, the input signal of the key stroke is a pulse signal as shown in the following figure.
If we just use the read digital input status command to readthe signal and we cannot send the command during the B period due to some reasons, then we will lose the key stroke information. However, with the read latched digital input command, we can still get the key stroke information even we are not able to send command in B period. For details of the read latched digital input command, please refer to Sections 4.2.17.
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 94 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.
6.6
LED Display Status
An LED indicator is used for the PWR, the ZigBee, and each DI or DO channel status.
LED Indicator
Status
RL1-
DI2-
PWR-
RL2-
DI3-
ZigBee-
RL3-
DI4-
DI0-
RL4-
DI5-
DI1-
Introduction
ZigBee Coordinator (Host) Steady Lit
ZigBee network is establish
Blink to Steady Lit Rejoin ZigBee network or it has occupied ZigBee Net
ZigBee Router (Slave)
(Green LED)
Steady Lit
Signal Strength
Blinking (500 ms)
Signal Available
Blinking (1s)
Signal Weak
Blinking (2s)
Signal Terrible or No ZigBee Network
The status of module board ZigBee PWR (Red LED)
Steady Lit
Power on
Blinking (200ms)
Module Initialization failure
Blinking (1s)
Watchdog enabled
Steady Unlit
Power off
The status of DI/DO channels ZigBee DI/DO
Steady Lit
Enabled
Steady Unlit
Disabled
ICP DAS, ZT‐2060 User Manual, Version 1.0.0 Page 95 Copyright © 2013 by ICP DAS Co., Ltd. All Rights Reserved.