ICP DAS USA | tZT-P4C4 | User manual | ICP DAS USA tZT-P4C4 User Manual

ICP DAS USA tZT-P4C4 User Manual
User Manual
Version 1.0.0 February 2018
tZT-P4C4
(ZigBee Wireless IO Module)
Written by Bernie Wu
Edited by Kalia Huang
Table of Contents
1.
Introduction ------------------------------------------------------------------------------------------ 4
1.1 Introduction to ZigBee -------------------------------------------------------------------------- 4
1.2 Introduction to tZT-P4C4 ---------------------------------------------------------------------- 4
1.3 Features ------------------------------------------------------------------------------------------- 5
2.
Information to the Hardware -------------------------------------------------------------------- 6
2.1 System Specifications -------------------------------------------------------------------------- 6
2.2 I/O System Specifications --------------------------------------------------------------------- 7
2.3 Pin Assignments --------------------------------------------------------------------------------- 8
2.4 BlockDiagram ------------------------------------------------------------------------------------ 8
2.5 Wire Connections ------------------------------------------------------------------------------- 9
3.
Setting up the tZT-P4C4 ------------------------------------------------------------------------ 10
3.1 Introduction to the Configuration Parameters ------------------------------------------ 10
3.2
Starting the tZT‐P4C4 ------------------------------------------------------------------------ 11
3.3
3.4
Default parameter ----------------------------------------------------------------------------- 11
Communications Testing --------------------------------------------------------------------- 12
4.
DCON/Modbus RTU Command Set --------------------------------------------------------- 14
4.1 How to communication with tZT-P4C4---------------------------------------------------- 14
4.2 DCON Protocol Command Set ------------------------------------------------------------- 14
4.2.1 Checksum ---------------------------------------------------------------------------------- 15
4.2.2 Overview the DCON Command Sets ------------------------------------------------ 16
4.3 The Modbus RTU Protocol Command Set ----------------------------------------------- 24
4.3.1 PLC Address Mapping ------------------------------------------------------------------ 25
4.3.2 Overview the ModBus Command Sets ---------------------------------------------- 26
4.3.3 Read/Write the Module Settings (0x46) --------------------------------------------- 31
5.
Troubleshooting ---------------------------------------------------------------------------------- 32
6.
Appendix A ----------------------------------------------------------------------------------------- 33
6.1 Dual Watchdog Operation ------------------------------------------------------------------- 33
6.2 Reset Status ------------------------------------------------------------------------------------ 33
6.3 Digital Output ----------------------------------------------------------------------------------- 33
6.4 Latched Digital Input -------------------------------------------------------------------------- 34
6.5 LED Display Status --------------------------------------------------------------------------- 35
7.
Appendix B. Revision History ---------------------------------------------------------------- 36
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 2
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Important Information
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, not for any infringements of patents or other rights of third
parties resulting from its use.
Copyright
Copyright @ 2016 by ICP DAS Co., Ltd. All rights are reserved.
Trademark
Names are used for identification purpose only and may be registered
trademarks of their respective companies.
Contact us
If you encounter any problems while operating this device, feel free to contact us
via mail at: service@icpdas.com . We guarantee to respond within 2 working
days.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 3
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
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 a rea
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.
1.2 Introduction to tZT-P4C4
The tZT-P4C4 provides 4 channels for digital input and 4 channels for digital output,
each of which features photocouple isolation. The tZT-P4C4 supports sink-type output
with short circuit protection, while input is source -type. All input channels can be used a
16-bit counters. There are options for configuring power-on and safe digital output values.
4 kV ESD protection and 3750 VDC intra-module isolation are also provided.
The tZT series products of ICP DAS have the advantage of low cost and low power
consumption of ZigBee. Provide wireless communication capability up to 700 meters
(LOS) standard transmission distance. Coupled with the dynamic mesh network, users
can easily catch DIO data in difficult-to-wire environments.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 4
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
1.3 Features

ISM 2.4 GHz Operating Frequency

Fully Compliant with 2.4G IEEE 802.15.4 / ZigBee 2007 Pro Specifications

Wireless Transmission Range up to 300 m

Adjustable RF Transmission Output Power

GUI Configuration Software (Windows Version)

Supports AES-128 Encryption for the Wireless Communication (Passive)

Supports ZigBee Repeater Function

4 Digital Input Channels and 4 Digital Output Channels

All Digital Input Channels can be used as 16-bit Counters

Sink-type Digital Output Channels with Overload Protection

Surge and ESD Protection

Configurable Power-on Value and Safe Value Settings

DIN-Rail Mountable
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 5
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
2. Information to the Hardware
2.1 System Specifications
Module
Communication Interface
Wireless Standards
Transmission Power
2.4GHz Antenna
Transmission
Range(LOS)
Protocols
Watchdog
LED Indicators
ZigBee Communication
Power
EMS Protection
ESD (IEC 61000-4-2)
EFT (IEC 61000-4-4)
Power
Range
Input Voltage Range
Power Consumption
Mechanical
Dimensions(W x L x H)
Installation
Environment
Operating Temperature
Storage Temperature
tZT-P4C4
ZigBee 2007 Pro
11dBm (Max. 19dBm)
2.4 GHz - PCB Antenna (3dBi, 50Ω)
300m
Supports DCON and ModBus
Module(1.6seconds),Communication(Programmable)
1LED, Green
1LED, Red
±4 kV Contact for each Terminal
±1 kV for Power
+10 V DC ~ +30 V DC
1W Max.
52mm x 98mm x 27mm
DIN-Rail Mounting
-25 ~ +75℃
-30 ~ +80℃
10 ~ 95% RH(Non-condensing)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 6
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
2.2 I/O System Specifications
Module
Digital Input / Counter
Input Channels
Type
On Voltage Level
Off Voltage Level
Channels
Max. Counts
Max.
Counters
4
Wet Contact (Source)
+6 VDC ~ +50 VDC
Max. +5 VDC
4
65535 (16-bit)
Input
Frequency
Min.
tZT-P4C4
100Hz
Pulse
Width
5ms
Input Impedance
Overvoltage Protection
Digital Output
10 KΩ , 0.66W
± 70 VDC
Output channels
Type
Load Voltage
Max. Load Current
Overvoltage Protection
Overload Protection
Power On Value
Safe Value
4
Isolated Open Collector (Sink)
+3.5 ~ +50 VDC
700mA / channel
Yes
Yes
Yes, Programmable
Yes, Programmable
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 7
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
2.3 Pin Assignments
2.4 Block Diagram
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 8
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
2.5 Wire Connections
Digital
ON State
OFF State
Input/
Readback as 1
Readback as 0
Source
+6 ~ +50 VDC
OPEN or < 5VDC
Output
ON State
OFF State
Type
Readback as 1
Readback as 0
Drive
Relay ON
Relay OFF
Counter
Relay
Resistance
Load
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 9
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
3. Setting up the tZT-P4C4
3.1 Introduction to the Configuration Parameters
i.
Pan ID:parameter is the group identity for a ZigBee network, and must the same
for all devices in the same ZigBee network.
(tZT-P4C4 module use range:0x0000~0x3FFF)
ii.
Address / Node ID:parameter is the undivided identity of a specific the ZigBee
module, and must be unique for each device connected the same ZigBee
network.
(tZT-P4C4 module use range:0x01~0xFF)
iii.
RF Channel:parameter indicates the radio frequency channel, and must be set
to the same value as other modules 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 the Wi-Fi frequencies based.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 10
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
3.2 Starting the tZT‐P4C4
As the ZigBee network is controlled by the ZigBee coordinator, the ZT-2550/ZT-2570
(ZigBee coordinator) must be configured first. Please refer to documents shown below for full
details of how to configure these devices.
Once configuration of the ZigBee coordinator has been completed. Set the ”Pan ID” and
the “RF Channel” values for the tZT‐P4C4 to the same values as the network, and then reboot
the device. The module will automatically start to function on the ZigBee network using 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-25xx device Coordinator)
http://ftp.icpdas.com.tw/pub/cd/usbcd/napdos/zigbee/zt_series/utility/
3.3 Default parameter
The tZT-P4C4 has a default wireless parameter values in Init mode. Just set the
switch to Init and reboot the module, you can connect the module through the following
parameter.
(If you don’t want to change existing ZigBee Coordinator settings, you can connect via
RS-232)
Protocol
DCON
CheckSum
Disable
PAN ID
0x1234
Node ID
0x01
RF Channel
0x0E
RF Power
0x07
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 11
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
3.4 Communications Testing
Once the tZT-P4C4 has joined the ZigBee network, the signal quality can be
confirmed by monitoring the status of the ZigBee Net LED indicators. If the LED indicator
shows a steady light, communication with the tZT-P4C4 has been successfully
established for data acquisition and control.
ICP DAS also provides the “DCON Utility”, which can be used to simulate
DCON/Modbus communication. This software can also be used to verify the device
settings and ZigBee I/O functions.
※
The DCON Utility can be download from:
http://ftp.icpdas.com/pub/cd/8000cd/napdos/driver/dcon_utility/
※ Simulating I/O channel operation via the DCON Utility
i.
Launch the DCON Utility and select the appropriate COM Port settings to
connect to the ZigBee Coordinator (ZT-2550/ZT-2570).
ii.
Click the “Search” to start searching for tZT-P4C4 and connected to the
ZigBee network.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 12
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
iii.
If any tZT-P4C4 are found, they will be displayed in the device list window.
Double-click the list of the module name to start the platform to operate the I/O
channels.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 13
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4. DCON/Modbus RTU Command Set
4.1 How to communication with tZT-P4C4
ICP DAS tZT-P4C4 can operate using both the DCON and the Modbus RTU protocol,
and the I/O channel can be easily controlled and monitored via wireless transmission.
The document available at the following link gives details of the DCON and Modbus RTU
protocol command sets.
http://ftp.icpdas.com/pub/cd/8000cd/napdos/7000/manual/modbusdio.pdf
4.2 DCON Protocol Command Set
tZT-P4C4 are controlled via wireless broadcast commands, so each device must
have a unique address that is saved in the EEPROM of the device to denote the
difference.
Consequently, all command and response formats contain the destination address of
the module. When an I/O device receives a command, it will determine whether or not to
respond based on the address contained in the command. However, there are two
exceptions, the #** and ~** commands.
DCON Request Command Format:
Leading Character
Module Address
Command
[CheckSum]
CR
Data
[CheckSum]
CR
DCON Response Command Format:
Leading Character
Module Address
Note:’CR’ (Carriage Return) is the character used to end a frame.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 14
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.2.1
Checksum
※ Calculate the Checksum:
Sum the ASCII code of all the characters contained in the command in addition to the ʻCRʼ
terminator. The Checksum is the sum value expressed in Hexadecimal format.
※ Example: Request Command ”$012(CR)”
Sum = ʻ$ʼ + ʻ0ʼ + ʻ1ʼ + ʻ2ʼ = 24h + 30h + 31h + 32h = B7h
Checksum = “B7”
DCON Request 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 Command with Checksum = “!01200600AA(CR)”
※ Note: Checksum is the sum value expressed in capital letters.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 15
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.2.2
Overview the DCON Command Sets
DI/O Command Sets
Command
@AA
Access
R
Response
>(Data)
Description
Read the status of DI/O.
AA:address of the module
(Data):four-digital hexadecimal value
representing the status of the DI/O
[1-2]:DO value
@AA(Data)
W
>
[3-4]:DI value
Set the value of DO0~DO3 channels
AA:address of the module
#AA00(Data)
#AA0A(Data)
W
>
(Data):set value
Set the value of digital output specified
channels.
AA:address of the module
00、0A:DO0~DO7
#AA1c(Data)
#AAAc(Data)
W
>
(Data):set value
Set a single digital output channel of the
specified channels.
AA:address of the module
1、A:DO0~DO7
#AAN
R
!AA(Data)
c:digital output channel to be set (0-7)
(Data)
00:Sets the digital output channel to
OFF
01:Sets the digital output channel to
ON
Read the digital input counter .
AA:address of the module
N:specified channel to be read
(Data):counter value
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 16
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Command
$AA6
Access
R
Response
!(Data)
Description
Read the DI/O status.
AA:address of the module
6:read status command
(Data):a six-digit hexadecimal value
indicating the status of the digital
input/output channels
[1-2]:DO value
[3-4]:DI value
$AAC
W
!AA
[5-6]:00 (reserved)
Clear the status of the latched digital
input and output channels.
AA:address of the module
$AACN
W
!AA
C:clear command
Clear the digital input counter for
specified channel.
AA:address of the module
C:clear command
$AALS
R
!(Data)
N:specified channel
Read the latched DI status
AA:address of the module
L:read latched status command
S:status
1:read high latched status
0:read low latched status
(Data) : latched status
[1-2]:DO latched
[3-4]:DI latched
[5-6]:00 (reserved)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 17
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Command
~AAD
Access
R
Response
!AAVV
Description
Read the DI/O active status.
AA:address of the module
D:read active status
~AADVV
W
!AA
VV:wo-digit hexadecimal value
indicating the active status of the DI/O
Bit1 (OAS)& DO value status table
DO
0
1
OAS
0
Relay
Relay
Inactive
Active
1
Relay
Relay
Active
Inactive
Bit0 (IAS) & DI value status table
DI
0
1
IAS
0
High
No signal
voltage
or low
voltage
1
No signal
High
or low
voltage
voltage
Set the DI/O active status.
AA:address of the module
D:read active status command
VV:two-digit hexadecimal value
indicating the active status of the DI/O
Bit1 (OAS)& DO value status table
DO
0
1
OAS
0
Relay
Relay
Inactive
Active
1
Relay
Relay
Active
Inactive
Bit0 (IAS) & DI value status table
DI
0
1
IAS
0
High
No signal
voltage
or low
voltage
1
No signal
High
or low
voltage
voltage
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 18
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Host Watchdog Command Sets
Command
~**
~AA0
Access
W
R
Response
--
Description
Informs all modules that the host is OK.
!AASS
**:host OK command
Read the status of the host watchdog.
AA:address of the module
SS:Two hexadecimal digits that
represent the status of the host
watchdog
Bit2 high:WDT Enable
Bit2 low:WDT disable
Bit7 high:WDT occurred
~AA1
W
!AA
Bit7 low:WDT not occurred
Reset the status of the WDT.
AA:address of the module
~AA2
R
!AAVV
1:reset status command
Read the WDT value.
AA:address of the module
2:read WDT value command
~AA3EVV
W
!AA
VV:two hexadecimal digits to represent
the timeout value in tenths of a second
Ex:01 denotes 0.1 seconds
Set the WDT enable and value.
AA:address of the module
3:set WDT enable and value command
E:status
1:enable the host watchdog
0:disable the host watchdog
VV:two hexadecimal digits to represent
the timeout value in tenths of a second
Ex: 0A denotes 1.0 seconds
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 19
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Command
~AA4V
Access
R
Response
!AA(Data)
Description
Read the power-on or safe DO value
AA:address of the module
4:read power-on or safe DO value
command
V:
P:Power-on Value
S:Safe Value
~AA5V
W
!AA
Set current DO status for power-on or
safe DO value.
AA:address of the module
5:set current DO status for power-on or
safe DO value command
V:
P:Power-on Value
S:Safe Value
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 20
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
General Command Sets
Command
Access
%AANNTTCCF W
F
Response
!AA
Description
Set the module configuration.
AA:address of the module
NN:new address of the module
TT:new type code, DI/O device always
0x40
CC:new baud rate, ZigBee I/O devices
always 0x0A
FF:two hexadecimal digits to represent
the direction of the DI counter and
checksum
Bit 6 high/low:checksum enable/disable
$AA2
R
!AATTCCFF
Bit 7 high/low:rising/falling edge
Read the module configuration.
AA:address of the module
2:read the module configuration
command
TT:type Code of the module should be
0x40
CC:Baud Rate of the module should be
0x0A
FF:two hexadecimal digits to represent
the direction of the DI counter and
checksum
Bit 6 high/low:checksum enable/disable
$AA5
R
!AAS
Bit 7 high/low:rising/falling edge
Read the reset status.
AA:address of the module
5:read the reset status command
S:
1:first read after powered on
$AAF
R
!AA(Data)
0:not first read after powered on
Read the firmware version
AA:address of the module
F:read the firmware version command
(Data):firmware version of the module
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 21
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Command
$AAM
Access
R
Response
!AA(Data)
Description
Read the module name
AA:address of the module
M:read the module name command
(Data):name of the module
tZT-P4C4:tZT-P4C4
$AAP
R
!AASC
Read the communication protocol
AA:address of the module
P:protocol command
S:support protocol
0:DCON
1:DCON and Modbus RTU
C:protocol is current used
0:DCON
1:Modbus RTU
$AAPN
W
!AA
Set the communication protocol
AA:address of the module
P:protocol command
N:Set protocol
0:DCON
1:DCON and Modbus RTU
~AARP
R
!AAN
Read the RF Power
AA:address of the module
RP:RF Power command
N:Set Value (0x07 ~ 0x0F)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 22
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Command
~AARPN
Access
W
Response
!AA
Description
Set the RF Power
AA:address of the module
RP:RF Power command
~AARNC
R
!AAPPPPY
N:Set Value (0x07 ~ 0x0F)
Read the PAN ID & RF Channel
AA:address of the module
RNC:PAN ID & RF Channel command
~AARNCPPPP
Y
W
!AA
PPPP:PAN ID value
Y:RF Channel (0~F)
Set the PAN ID & RF Channel
AA:address of the module
RNC:PAN ID & RF Channel command
PPPP:PAN ID value
Y:RF Channel (0~F)
Synchronized Command Sets
Command
#**
$AA4
Access
W
R
Response
No Response
Description
Synchronized sampling
!S(Data)
**:Synchronized sampling command
Reads the synchronized data
AA:address of the module
4:read the synchronized data command
S:status
1:first read after sampling
0:not first read after sampling
(Data):synchronized sampling data
[1-2]:synchronized sampling DO value
[3-4]:synchronized sampling DI value
[5-6]:00 (reserved)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 23
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.3 The Modbus RTU Protocol Command Set

Modbus RTU Command Format
Field 1
Field 2
Field 3
Field 4~n
Field n+1~n+2
Module Address
Function Code
Sub function
Configuration 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
※ Examples:
i.
To modify the power-on value for module 01, the following command should be sent :
01 46 27 0F BB F9
ii.
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
iii.
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
iv.
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
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 24
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.3.1
PLC Address Mapping
Function Code
Description
0x01
Read coils
0x02
Read discrete inputs
0x03
Read multiple registers
0x04
Read multiple input registers
0x05
Write single coils
0x06
Write multiple registers
0x0F
Write multiple coils
0x46
Read/Write module settings
If the function specified in the message is not supported, then the module will respond as
below. Note that the Address mapping of the Protocol is base 0.
Error Response
Number
Description
Length
Value
00
Address
1
0x01 to 0xF7
01
Function Code
1
Function code + 0x80
02
Exception Code
1
01
Note:If a CRC mismatch occurs, the module will not respond.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 25
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.3.2
Address
(base1)
00001 ~
00004
00033 ~
00036
00065 ~
00068
00069 ~
00072
00097 ~
00100
00101 ~
00104
00129 ~
00132
Overview the ModBus Command Sets
Address
(base0)
(Dec/Hex)
0~3
(0x00~0x0
3)
Function
Code(s)
Access
Data
Type
Name
Comments
01, 02
R
Byte
Digital output
value of
channel 0 ~ 3
05
W
Word
Read the
status of the
DO.
Write word to
set one DO
value.
0F
W
Byte
32~35
(0x20~0x2
3)
64~67
(0x40~0x4
3)
72~75
(0x48~0x4
B)
96~99
(0x60~0x6
3)
104~107
(0x68~0x6
B)
01, 02
R
Byte
01, 02
R
Byte
01, 02
R
Byte
01, 02
R
Byte
01, 02
R
Byte
128~131
(0x80~0x
83)
01, 02
R
Byte
05
W
Word
0F
W
Byte
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Digital input
value of
channel 0 ~ 3
High latched
values of
digital input
High latched
values of
digital output
Low latched
values of
digital input
Low latched
values of
digital output
Safe value of
digital output
channel 0 ~ 3
Version1.0.0
0xFF00:set
ON
0x0000:set
OFF
Write byte to
set all DO
value.
Read the
status of the
DI.
Read the
status of DI
high latched.
Read the
status of DO
high latched.
Read the
status of DI
low latched.
Read the
status of DO
low latched.
Read the
status of DO
safe value.
Write word to
set one DO
safe value.
0xFF00:set
ON
0x0000:set
OFF
Write byte to
set all DO safe
value.
Page: 26
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Address
(base1)
00161 ~
00164
00257
00260
Address
(base0)
(Dec/Hex)
160~163
(0xA0~0xA
3)
256
(0x100)
259
(0x103)
Function
Code(s)
Access
Data
Type
Name
Comments
01, 02
R
Byte
Power on
value of digital
output channel
0~3
05
W
Word
Read the
status of DO
power on
value.
Write word to
set one DO
power on
value.
0F
W
Byte
01, 02
R
Bit
01, 02,
R
Bit
05
W
Word
Use protocol
WDT mode
0xFF00:set
ON
0x0000:set
OFF
Write byte to
set all DO
power on
value.
Read use
protocol.
0:DCON,
1:Modbus
RTU
Read the mode
of the host
watchdog
0:same as
I-7000
1: can use AO
and DO
command to
clear host
watchdog
timeout status.
Set the mode
of the host
watchdog
0xFF00:Set 1,
0x0000:Set 0.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 27
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Address
(base1)
00261
Address
(base0)
(Dec/Hex)
260
(0x104)
Function
Code(s)
Access
Data
Type
Name
Comments
01, 02,
R
Bit
WDT enable
Read the
status of the
host watchdog
1:Enable
05
W
Word
00108
263
(0x107)
05
W
Byte
Clear latched
00270
269
(0x10D)
01, 02,
R
Byte
WDT status
05
W
Word
01, 02
R
Bit
00273
272
(0x110)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Reset status
Version1.0.0
0:Disable
Write the
status of the
host watchdog
0xFF00:
enable
0x0000:
disable
Write word to
Clear latched.
0xFF00:Clear.
Read the
status of the
host watchdog
Bit2:WDT
enable
Bit7:WDT
timeout
Clear the
status of the
host watchdog
0xFF00:Clear
status.
Read reset
status
1:first read
after powered
on.
0:not first read
after powered
on.
Page: 28
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Address
(base1)
00513
Address
(base0)
(Dec/Hex)
512~515
(0x200~0x
203)
Function
Code(s)
Access
Data
Type
Name
Comments
05
W
Byte
Clear DI count
0F
W
Byte
Clear DI count
0xFF00:Clear
times.
Write byte to
clear count
1:Clear times.
30001~3
0004
0~3
(0x00~0x0
3)
03, 04
R
Word
30481
480
(0x01E0)
03, 04
R
Byte
30482
481
(0x01E1)
03, 04
R
Byte
Firmware
version
(high byte)
30483
482
(0x01E2)
03, 04
R
Byte
Module name
(low byte)
30484
483
(0x01E3)
03, 04
R
Byte
Module name
(high byte)
30485
484
(0x01E4)
488
(0x01E8)
R
W
W
R
Word
Word
Word
Word
Module
address
30489
03, 04
06
10
03, 04,
06
W
Word
03, 04,
R
Byte
06
W
Byte
30492
491
(0x01EB)
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Digital input
counter value
of channel 0 ~
3
Firmware
version
(low byte)
Timeout value
Timeout count
Version1.0.0
0:Ignore.
Read the
status of the
digital input
count.
Read the
firmware
version.
(low byte)
Read the
firmware
version.
(high byte)
Read the
module name.
(low byte)
Read the
module name.
(high byte)
Read node ID.
Write node ID.
Write node ID.
Read
watchdog
timeout value.
Write
watchdog
timeout value.
Read
watchdog
timeout times.
Clear
watchdog
timeout times.
Page: 29
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Address
(base1)
30503
30504
Address
(base0)
(Dec/Hex)
502
(0x01F6)
503
(0x01F7)
30505
312345
504
(0x01F8)
12344
(0x3038)
Function
Code(s)
Access
Data
Type
Name
Comments
03, 04
R
Byte
RF Power
value
06
W
Byte
03, 04
R
Byte
06
W
Byte
03, 04
06
03, 04
R
W
W
Word
Word
--
Read RF
Power.
Write RF
Power.
Read RF
Channel.
Write RF
Channel.
Read Pan ID.
Write Pan ID.
Informs all
modules that
the host is OK.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
RF Channel
Pan ID
Host OK
Version1.0.0
Page: 30
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
4.3.3 Read/Write the Module Settings (0x46)
Sub-function Access Data
Name
Comments
Type
0
R
Word
Module name
(0x00)
Read the Name of the
module.
tZT-P4C4:byte0(Address)
46 00 17 44 00 00
4
W
Byte
Module address
Write the module node ID.
R
Long
Communication
Read the communication
setting
setting.
(0x04)
5
(0x05)
32
R
Word
Firmware version Read the firmware version.
W
Byte
DI Counter Edge
Write DI counter edge
Value
value.
DI Counter Edge
Read DI counter edge
Value
value.
Power on value
Write the status of the
of digital output
digital output power on
channel 0 ~ 3
value.
Power on value
Read the status of the
of digital output
digital output power on
channel 0 ~ 3
value.
DI/O Active
Write the DI/O active
Status
status.
DI/O Active
Read the DI/O active
Status
status.
(0x20)
33
(0x21)
34
R
Byte
(0x21)
39
W
Byte
(0x27)
40
R
Byte
(0x28)
41
W
Byte
(0x29)
42
R
(0x2A)
Byte
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 31
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
5. Troubleshooting
(1) Technical Support.
If you have any difficulties using your tZT-P4C4, please send a description of the
problem to service@icpdas.com
Include the following items in your email:

A copy of the configuration file for the coordinator. This file can be obtained
using the procedure outlined below and should be attached to your email.
a. Set the DIP switch of the ZT-25xx device to the [ZBSET] position then reboot the
device. Launch the ZT Configuration Utility and select [Save Log] icon to save the
configuration of the ZT-25xx as a file.
After clicking the [Save Log] icon, enter the “File Name” and the “File Path” in the
Windows “Save” dialog box. Once the configuration has been successfully saved, the
following message will be displayed.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 32
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
6. Appendix A
6.1 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 Watchdog circuit allows the module to operate
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.
tZT-P4C4 include an internal Dual Watchdog, making the control system more
reliable and stable.
6.2 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, and is cleared after responding to the first
$AA5 command. This can be used to check whether the module had been previously
reset. When the response $AA5 to the command indicates that the reset status has been
cleared, it means that the module has not been reset since the last $AA5 command was
sent. When the response $AA5 to the command indicates that the reset status has been
set, and it is not the first time the $AA5 command has been sent, it means that the
module has been reset and the digital output value has been changed to the power -on
value.
6.3 Digital Output
In addition to configuring the module using digital output commands, the digital
output channels can be configured under two other conditions.
Safe Value
When the Host Watchdog is enabled and a Host Watchdog timeout occurs, the “safe
value” is loaded to the digital output channels. Any digital output commands have no
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 33
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
effect on the digital output ports until the Host Watchdog timeout status is cleared. The
Host Watchdog timeout status is saved in the EEPROM, and the status will not be
changed, even after a power-on reset. The timeout status can only be cleared by sending
the Reset Host Watchdog timeout status command, ~AA1. See Section 6.1 for detailed
information regarding the Host Watchdog.
Power-on Value
When the module is powered on and the Host Watchdog timeout status is cleared,
the “power-on value” will be loaded to the digital output channels after a power -on reset.
If the Host Watchdog timeout status has not been cleared during the power -on process,
then the safe value will be loaded to the digital output channels.。
6.4 Latched Digital Input
tZT-P4C4 module allows commands to be used to read the status of both the latched high
digital input channels and latched low digital input channels. The following is an example that
shows the usefulness of latched digital input.
If we read the input of a key switch that is connected to the digital input channel of a module,
the input signal is a pulse signal, as shown in the following figure.
In this diagram, it can be seen that during periods A and C, the sign al is active, but
during period B, the signal is inactive for some unknown reason.
If we attempt to use the Read Digital Input Status command (@AA) to read the signal,
but we cannot send the command during period B because of an unknown reason, then
the input information will be lost. However, by using the Read Latched Digital Input
command ($AALS), we can still retrieve the input information, even if we are not able to
send a command during period B.
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 34
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
6.5 LED Display Status
An LED indicator is used to display the status of the power (PWR), the ZigBee network.
LED
Status
Introduction
ZigBee Net
ZigBee Coordinator (Host)
(Green LED)
Steady Lit
ZigBee network is Establish
Blink to Steady Lit
Rejoin ZigBee network or it has occupied
ZigBee Router (Slave)
Steady Lit
The Signal is Strong
Blink (500 ms)
The Signal is Available
Blink (1s)
The Signal is Weak
Blink (2s)
The Signal is unstable or there is no
available
ZigBee PWR
The status of module board
(Red LED)
Steady Lit
The Power is ON and the Module
Initialization is Correct
Blink (500 ms)
Module Initialization Failure
Blink (1s)
Watchdog is Enabled and the status of the
I/O channel has been changed to the Safe
Value. Reset the module via the power
switch or configuration commands.
Steady Unlit
The Power is OFF
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Version1.0.0
Page: 35
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
7. Appendix B. Revision History
This chapter provides revision history information to this document.
The table below shows the revision history.
Revision
Date
1.0.0
January 2018
tZT-P4C4 (ZigBee 4 DI & 4 DO Module) User Manual
Description
Initial issue (Written by Bernie Wu)
Version1.0.0
Page: 36
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising