awiatech wirelesshart evaluation kit manual · wirelessharttm (wireless highway addressable remote...

47
AwiaTech WirelessHART TM Evaluation Kit Manual AwiaTech Corporation © 2011-2016. All rights reserved

Upload: others

Post on 23-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

AwiaTech Corporation © 2011-2016. All rights reserved

Page 2: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 2

FCC STATEMENT

1. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two

conditions:

(1) This device may not cause harmful interference, and

(2) This device must accept any interference received, including interference that may

cause undesired operation.

2. Changes or modifications not expressly approved by the party responsible for compliance

could void the user's authority to operate the equipment.

NOTE: This equipment has been tested and found to comply with the limits for a Class B digital

device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable

protection against harmful interference in a residential installation. This equipment generates

uses and can radiate radio frequency energy and, if not installed and used in accordance with the

instructions, may cause harmful interference to radio communications. However, there is no

guarantee that interference will not occur in a particular installation. If this equipment does cause

harmful interference to radio or television reception, which can be determined by turning the

equipment off and on, the user is encouraged to try to correct the interference by one or more of

the following measures:

Reorient or relocate the receiving antenna.

Increase the separation between the equipment and receiver.

Connect the equipment into an outlet on a circuit different from that to which the receiver

is connected.

Consult the dealer or an experienced radio/TV technician for help.

FCC Radiation Exposure Statement

This equipment complies with FCC radiation exposure limits set forth for an uncontrolled

environment. This equipment should be installed and operated with minimum distance 20cm

between the radiator & your body.

Page 3: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 3

Table of Contents

1. User Guide ............................................................................................................... 5

1.1 What is WirelessHARTTM?................................................................................. 5

1.2 AwiaTech WirelessHART Products ................................................................... 7

1.3 What is in the Evaluation Kit? ............................................................................ 7

1.4 Starting the Network .......................................................................................... 7

1.5 Explore and Evaluate ...................................................................................... 11

1.6 Setting up Awia Warrior................................................................................... 12

1.7 Accessing AwiaNet via HART-IP ..................................................................... 15

1.8 Using the Host application ............................................................................... 15

1.9 Awia Warrior Hardware Description ................................................................ 21

1.9.1 Analog Input Setup................................................................................... 22

1.9.2 Analog Output .......................................................................................... 23

1.9.3 AI/AO Calibration ..................................................................................... 24

1.9.4 AI/AO Application Notes ........................................................................... 29

1.10 Troubleshooting .............................................................................................. 30

2. Development Guide ............................................................................................... 31

2.1 System Architecture ........................................................................................ 31

2.2 Host API .......................................................................................................... 31

2.2.1 Definition .................................................................................................. 32

2.2.2 Usage ...................................................................................................... 33

2.2.3 Sample code ............................................................................................ 34

2.3 Device API ...................................................................................................... 36

2.3.1 Command 170 - Read Sensor Value (Host to Awia Warrior) .................... 37

2.3.2 Command 170 - Write Sensor Value (Sensor to Awia Warrior) ................ 38

2.3.3 Command 171 - Write Actuator Value (Host/Awia Warrior to Actuator) .... 38

2.3.4 Command 171 - Read Actuator Value (Actuator to Awia Warrior) ............ 38

2.3.5 Command 773 - Set Network ID ............................................................... 38

Page 4: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 4

2.3.6 Command 961 - Write Join Key................................................................ 39

2.4 Putting It All Together ...................................................................................... 39

2.4.1 Use Awia Net as a Data Transmission Medium ........................................ 39

2.4.2 Use Awia Warrior in Another WirelessHART Network .............................. 41

2.4.3 Use Awia Net as a WirelessHART Evaluation Tool .................................. 41

3. Technical Specifications ......................................................................................... 42

4. Glossary of Terms .................................................................................................. 43

5. Index ...................................................................................................................... 45

Read this manual before working with the product. For personal and system safety, and

for optimum product performance, make sure you thoroughly understand the contents

before installing, using, or maintaining this product.

By using all or any portion of the device, you are accepting all of the terms and

conditions of the accompanied End User License Agreement and any revised or

renewed versions thereof, as will be published on AwiaTech’s website at

www.awiatech.com. You agree that this agreement is enforceable like any written

agreement signed by you and legally binding between you and AwiaTech. If you do not

agree to all of these terms and conditions, please contact AwiaTech to return the device.

Page 5: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 5

1. USER GUIDE

1.1 What is WirelessHARTTM

?

WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-

standard wireless networking technology developed by the HART Communication

Foundation for industrial process control. It is also the first international wireless

standard for process control, IEC 62591. WirelessHART uses a time-synchronized, self-

organizing, and self-healing mesh network architecture. As a part of the HART 7

specification, WirelessHART supports operation in the 2.4 GHz ISM Band on IEEE

802.15.4 standard radios.

A typical WirelessHART network consists of the following components:

One or more WirelessHART field device(s)

One WirelessHART gateway (including Network Manager)

One WirelessHART access point

It may also contain:

WirelessHART adapter

WirelessHART router device

Figure 1 shows a WirelessHART network example.

Page 6: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 6

Figure 1 A WirelessHART network example

Figure 2 illustrates the architecture of WirelessHART protocol stack according to the OSI

7-layer communication model. It includes five layers: physical layer, data link layer,

network layer, transport layer and application layer.

Figure 2 Architecture of HART Communication Protocol

Application

Presentation

Session

Physical

Transport

Data Link

Network

Provides the User with Network Capable Applications

Converts Application Data Between Network and Local Machine Formats

Connection Management Services for Applications

Provides Network Independent, Transparent Message Transfer

Establishes Data Packet Structure, Framing, Error Detection, Bus Arbitration

Mechanical / Electrical Connection. Transmits Raw Bit Stream

Command Oriented. Predefined Data Types and Application Procedures

A Binary, Byte Oriented, Token Passing, Master/ Slave Protocol.

Simultaneous Analog & Digital Signaling. Normal 4-20mA Copper Wiring

End to End Routing of Packets. Resolving Network Addresses

Wired FSK/PSK & RS485 WIreless 2.4GHz

2.4GHz Wireless, 802.15.4 based radios, 10dBm Tx Power

Secure & Reliable ,Tme synched TDMA/CSMA, Frequency Agile with ARQ

Power-Optimized, Redundant Path,Self-Healing Wireless Mesh Network,

Auto-Segmented transfer of large data sets, reliable stream transport, Negotiated Segment sizes

OSI Layer Function HART

Page 7: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 7

1.2 AwiaTech WirelessHART Products

The Awia Warrior stack fully conforms to the WirelessHART standard. Any functionality

or interface described in this document that falls under the scope of the WirelessHART

standard will contain the same description as that standard.

Throughout this document, Awia Warrior refers to a hardware module with wireless radio

communication capabilities and running AwiaTech’s WirelessHART network stack, thus

it acts as a node to the network. Awia Vanguard refers to AwiaTech’s WirelessHART

Gateway, which includes Awia Commander, which is AwiaTech’s WirelessHART

Network Manager. Both Awia Vanguard and Awia Commander are software components.

Awia Captain refers to AwiaTech’s Access Point. Lastly, AwiaNet refers to a functioning

WirelessHART network consisting of at least one of each component mentioned above.

A complete list of AwiaTech’s product definitions is listed in Table 1.

Table 1 AwiaTech Product Definition

WirelessHART

Component

Corresponding AwiaTech

Product Name

AwiaTech Product Form

Network Stack Awia Warrior Stack Software

Device Module Awia Warrior Module Hardware + Software

Gateway Awia Vanguard Hardware + Software

Network Manager Awia Commander (as part of

Awia Vanguard) Software

Access Point Awia Captain (as part of Awia

Vanguard) Hardware + Software

Network AwiaNet Hardware + Software

1.3 What is in the Evaluation Kit?

Please make sure your evaluation kit is complete and familiarize yourself with its

contents.

This evaluation kit contains:

One(1) Awia Vanguard Captain (Gateway with power adapter)

Five(5) Awia Warriors (power adapter included)

Software Disc

1.4 Starting the Network

In order to set up the evaluation network, the following hardware/software is required:

Page 8: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 8

1. The evaluation kit

2. One (1) Ethernet Router (wired or wireless) with built-in DHCP server

3. One (1) PC (desktop or laptop) with the following software:

a. Windows XP/Vista/7 32-bit/64-bit

b. 32-bit Java Virtual Machine (available at

http://java.com/en/download/manual.jsp)

c. The software from the Software Disc

After the 32-bit Java Virtual Machine is installed, please copy the AwiaNet folder from

the Software Disc to the PC. There are two folders under AwiaNet: ManagerClient and

Host, whose usage is detailed in the following sections.

Here is a diagram to show the setup of the different components:

To start an AwiaNet.

1. Connect the Awia Vanguard to the Ethernet Router via an Ethernet cable.

2. Power on the Awia Vanguard.

3. Make sure your PC is also connected to the same Ethernet Router (through an

Ethernet cable or Wi-Fi). Then launch the Manager Client software on the PC by

double clicking the file ManagerGUI.jar under folder ManagerClient.

4. To connect to the Awia Vanguard, click on "File", then click "Connect".

Page 9: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 9

5. In the pop-up window, type in the IP Address of the Awia Vanguard on your Local

Area Network, followed by port number 8900. Then click "Connect".

6. After connecting to the Awia Vanguard, the Manager Client will display two dots:

the red dot represents the Gateway, and the yellow dot is the Access Point.

Page 10: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 10

7. Turn on Awia Warriors. The Manager Client will display Awia Warriors as blue

dots. In the example below, five Awia Warriors have joined the network.

8. To change the Awia Vanguard's network ID or join key, click on "Option", then

click "Network Configuration".

Page 11: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 11

9. In the WirelessHART Configuration window, change the Network ID, Join Key,

and/or Channel Map. Click "Save" when finished. Restart the Awia Net to apply

the changes.

10. Start the AwiaTech Host application. See section 1.8 for information on using the

Host

1.5 Explore and Evaluate

The evaluation kit allows you to explore and evaluate various scenarios in the field. You

will notice the topology change on Awia Vanguard. A few suggestions at the start:

1. Turn a single Awia Warrior on and off.

2. Move an Awia Warrior to a remote location.

3. Turn on Awia Warriors at the same time vs. one by one (after the prior Awia

Warrior has joined the network).

Notice that it may take up to five minutes for a new device to join the network. According

to the WirelessHART standard, the following steps are necessary for a new device to

join the network:

1. The new device listens on one physical channel at a time for a certain period

of time.

2. The network devices randomly broadcast advertisements.

Page 12: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 12

Therefore, the chance of the new device hearing an advertisement in a WirelessHART

network is random. AwiaTech increases this chance by advertising more frequently

during the network forming phase.

Notice that if you turn a device off, it may take several minutes to disappear from the

Manager GUI display. This timeout value is fixed in Awia Vanguard used in this

evaluation kit, but is configurable for product-level Awia Vanguard. If a device has no

incoming/outgoing traffic after this timeout, a path-down failure alarm will be generated

and Awia Vanguard will handle it accordingly.

1.6 Setting up Awia Warrior

Before an Awia Warrior can join a WirelessHART network, it has to be set up with a

network Id and join key. Awia Warrior can be configured via two wired maintenance

ports: a standard FSK based wired-HART port with a bit rate of 1200bps, and a

proprietary virtual serial port with a bit rate of 57600bps. Both interface ports accept

standard wired-HART PDU (Section 2.3). For details about the hardware interfaces,

please refer to Section 1.9.

Traditional wired-HART hosts, such as handhelds and control systems, can access Awia

Warriors via the standard FSK port. DD based hosts can operate Awia Warriors by

loading the DD provided by AwiaTech.

For your convenience, AwiaConfig, a software utility to set up Awia Warriors, is also

included in the Awia Evaluation Kit. The installer file can be found in folder AwiaConfig in

the CD.

Note: AwiaConfig is based on Java, so make sure the Java Runtime Environment

is installed on your machine before installing AwiaConfig.

AwiaConfig is a simple and user-friendly tool. Here is a brief guide on how to use

AwiaConfig :

1. Connect an Awia Warrior to PC via the mini-USB port (a mini-USB cable is

needed) or the FSK port (a HART modem is needed)

2. Turn on Awia Warrior, and start AwiaConfig

3. A list of available COM ports will be displayed on AwiaConfig. Select the correct

COM port. In most cases, AwiaConfig should be able to detect the correct port to

use

4. Select the appropriate baud-rate. For a standard FSK connection, select

1200bps; for a virtual USB-serial connection, please select 57600bps

5. Click the button “Connect”

Page 13: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 13

6. Once successfully connected, the controls in Configuration tab are enabled. Use

the Configuration tab to set new values for Network ID, Join Key and Long Tag1.

7. The message exchange between the PC and Awia Warrior are displayed in the

Message Log area

1 The changes will take effect after a device reset.

Page 14: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 14

8. In the Custom Command tab, you can send any HART command (including

universal commands, common practice commands and device-specific

commands) to Awia Warrior. The message exchanges shall be displayed in the

Message Log area. Please ensure that the Command Number (0~65535) is a

decimal number, and the payload bytes are in hexadecimal format

9. In the PV & Status tab, you can check the PV and wireless channel status from

the Awia Warrior manually. Click the Refresh button to update the readings.

Page 15: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 15

10. The Calibration tab is used to calibrate and test AI/AO. For details, please refer

to section 1.9.3

11. Click the Disconnect button after the setup is done

1.7 Accessing AwiaNet via HART-IP

Awia Vanguard has built-in HART-IP support, thus allowing customers to use their

favorite HART-IP clients to access the AwiaNet. To connect to the HART-IP server in the

Awia Vanguard, in addition to the IP address of the Awia Vanguard, please use the

following settings:

TCP/UDP Protocol: UDP

Port Number: 5094

For details on how to use HART-IP, please consult the manual included with your HART-

IP client software.

1.8 Using the Host application

In addition to a HART-IP client, you can also use the Host application included in this

evaluation kit to access the AwiaNet. The following is a simple guide to this Host

application.

Page 16: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 16

1. On the PC, launch the Host application. Note: some firewall applications may

initially block the Host. Be sure to allow the Host to pass through the firewall.

2. Click the "System" menu on the Host, then click on "Gateway Settings".

3. In the settings box, enter the IP address of Awia Vanguard. In the example below,

the IP address is 192.168.1.100. Confirm that the port number is 8890. Then click "OK".

4. Click the "System" menu on the Host, then click on "Connect to Gateway".

Page 17: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 17

The "Device List" area will be populated with the device tags of all Awia Warrior

devices that are currently joined to the network. The example below shows the device

tags of five Awia Warrior devices that have joined the network.

5. To enable data collection for a particular Awia Warrior, double-click on the device

tag in the Device List. In the pop-up window, select an update rate (the example below

uses 2 seconds), and select "Cmd 1" under "Burst Command". Finally, click "OK".

Page 18: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 18

Note: Recommended update rates are 2

seconds or longer.

Repeat this step for all Awia Warriors that

you wish to collect data from.

4. To monitor the data collected for a particular Awia Warrior, double-click on the

Awia Warrior's device tag under "Device List". Once the device tag is selected, The

"Received Data" textbox will show the data that has been received from the selected

Awia Warrior. The graph above the "Received Data" textbox displays a visual

representation of the received data.

By default, the Awia Warrior devices are configured to measure the light intensity

using the built in photoconductor (See Table 3).

Page 19: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 19

6. To stop data collection from a particular Awia Warrior, double-click on the Awia

Warrior's device tag under "Device List". In the window that appears, select "Stop" under

"Burst Command", then click "OK".

Repeat this step to stop collecting data from any other Awia Warriors.

7. The Host application will save a log of all data received. To access this log, open

the folder that the Host application is located in. The log is saved as "HostDataLog.txt".

Please make sure that the Host application is closed before you open

"HostDataLog.txt" to ensure that all data has been saved to the log.

This log will be overwritten each time the Host application is opened and starts to

receive sensor data. If you would like a permanent copy of the log, please make a copy

"HostDataLog.txt" in another location of your choice.

Page 20: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 20

A sample data log is shown below:

Page 21: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 21

1.9 Awia Warrior Hardware Description

An Awia Warrior is shown below. A detailed description is given in Table 2.

Table 2 Device Description

Item Description

Power switch Turns the device on or off.

FSK Port FSK maintenance port.

Analog Output Analog output terminal.

Analog Input Analog input terminal.

DC-In Power input. Connects with an AC-DC adaptor.

Power LED Power indicator. The LED is on when power is present.

Mini USB Communication interface, similar to FSK port for maintenance.

Can also be used as power input.

UART Serial Port Interface (Hardware shared with Mini-USB)

SPI / I2C Board Extension Port (Support UART, SPI and I2C).

LED 1 Communication indicator. Turns on when the device is transmitting or receiving data.

LED 2 Activity indicator. Indicates Application layer processing.

LED 4 Heartbeat indicator. Toggles between on and off every second to indicate the device is functioning normally.

Photoconductor Light sensor.

Page 22: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 22

Sensors/Actuators with a FSK interface can connect to Awia Warrior via the FSK port.

The setup of traditional 0~25mA analog input/output signals is described in the following

subsections.

1.9.1 Analog Input Setup

Awia Warrior supports two types of analog inputs: an external 0~25mA analog signal, or

an onboard photoconductor, which outputs a 0~25mA signal indicating the light intensity.

The table below shows how to select the desired analog input source using a hardware

switch.

Table 3. Selecting the AI channel using a switch

Analog

Input Type

Switch Position Analog Input Source

Onboard

Off position

Photoconductor

External

On position

External Analog Input

1.9.1.1 Onboard photoconductor

The circuit for onboard photoconductor's light intensity measurement is shown in Figure

3.

Page 23: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 23

Figure 3. Photoconductor schematic

The resistance of the photoconductor (CDS6528) changes based on the surrounding

light intensity. The circuit in Figure 3 converts the photoconductor’s resistance value into

a 0~2.5V voltage signal, and is fed to the AD1 input channel. When the photoconductor

is selected as the analog input source, the 0~2.5V signal is sampled and transformed

into a 0~25mA digital value, and stored as the primary variable (PV) value. HART hosts

can read this PV value (in mA).

1.9.1.2 External 0~25mA Analog Signal

The circuit for external 0~25mA analog signal measurement is shown in Figure 4.

Figure 4. External 0~25mA analog input circuit

Terminal P8 accepts an external 0~25mA loop current, which flows through an onboard

sensing resistor (R19: 100 ohm), and is converted to a 0~2.5V voltage signal. This signal

is fed to the AD0 channel. When the external signal is selected as the analog input

source, the 0~2.5V voltage signal is converted into a 0~25mA digital value, and stored

as the PV value. HART hosts can read this PV.

1.9.1.3 Notes

Although the hardware circuits support two concurrent AI signals, only one channel can

be selected (based on the switch position) at any given time, and stored into the device's

PV value.

1.9.2 Analog Output

1.9.2.1 Circuit Schematic

The circuit for 0~25mA current sink output is shown in Figure 5.

AD0 AD0 1 2

P8 AI+

AD1 AD1

VCC

Page 24: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 24

Figure 5. 0~25mA AO schematic

The DA output from the device is a voltage signal in the range 0~2.5V, which drives the

AO output current in the range 0~25mA. The external 24V loop power and AO are

connected via terminal P5.

1.9.2.2 Notes

a) The AO port functions as a current sink. An external 24V loop power is required

to generate the 0~25mA loop current. Figure 6 shows the connection for the AO

port.

Figure 6. System connections for the AO block

b) The external loop power range is 6~35V. Considering the device's internal loop

current adjustment resistor is 100ohm (R28 in Figure 5), the external total

resistance value should be limited according to the loop power voltage value.

1.9.3 AI/AO Calibration

Before AI/AO can be put into production use, it may require calibration for higher

input/output precision. Calibrations on AI and AO channels can be performed via the

software utility AwiaConfig and external high precision AI and AO reference source.

1.9.3.1 4~20mA AI Calibration

4~20mA analog input channel can be calibrated via AwiaConfig with the help of a high

accuracy reference analog input signal2.

Please follow the steps below to calibrate AI channels:

2 A transmitter or a current signal generator with 0.1% accuracy is recommended for calibration.

DA0 DA0

VCC

1 2 3 4

P5 24V+

AO+ AO- 24V-

Page 25: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 25

1) Connect the Awia Warrior to the PC via a mini-USB cable or a FSK modem.

Connect the reference AI input source to the AI port of Awia Warrior. Power on

Awia Warrior and reference input AI signal

2) Launch AwiaConfig, select the appropriate COM port and baud rate, and click the

Connect button. Then switch to the Calibration tab

3) To calibrate minValue, adjust the reference analog input signal to a value

between 3.8~4.2mA, keeping the input stable. Enter the actual input value into

the “min (3.8mA-4.2mA)” field. Then click the Set button on the right. AwiaConfig

will send command 82 with the new min Value to Awia Warrior, and Awia Warrior

will calibrate the AI channel based on the this value

4) To calibrate maxValue, adjust the reference input signal to a value between

18~22mA, keeping the input stable. Enter the actual input value into the “max

(18mA-22mA)” field. Then click the Set button on the right. AwiaConfig will send

command 82 with the new max Value to Awia Warrior, and Awia Warrior will

calibrate the AI channel based on this value

Page 26: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 26

5) The calibration is done. Refresh the PV value on the PV & Status tab to verify.

Page 27: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 27

1.9.3.2 4~20mA AO Calibration

The 4~20mA analog output channel can be calibrated via AwiaConfig with the help of an

external reference current measurement meter.

Calibration of the 4~20mA AO is performed through a 2-point output trim process, just

like the HART standard analog output trim method supported by most transmitters.

HART command 40, 45 and 46 are used in the calibration.

Please follow the steps below to calibrate AO:

1) Connect the Awia Warrior to the PC via a mini-USB cable or a FSK modem.

Connect the reference current measurement meter to the Awia Warrior's AO port.

Power on Awia Warrior and reference input AI signal

2) Launch AwiaConfig, select the appropriate COM port and baud rate, and click the

Connect button. Then switch to the Calibration tab

3) Enter "4" into the “Output” field and click the Set button on the right. Command

40 will be sent to Awia Warrior, which set the AO output to be close to 4mA

4) Read back the actual AO value with the external reference current meter, and

input this value into the “4 mA” field. Then click the Set button on the right.

Command 45 will be sent to Awia Warrior and the 4mA output current will be

trimmed by Awia Warrior automatically

Page 28: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 28

5) Enter "20" into the “Output” field and click the Set button on the right. Read back

the actual AO value with the external reference current meter, and input this

value into the “20 mA” field. Then click the Set button on the right. Command 46

will be sent to Awia Warrior and the 20mA output current will be trimmed

automatically

Page 29: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 29

6) After these 2 points are trimmed, any AO value can be entered in the “Output”

field and verified via the reference current meter. Be sure to return the AO back

to normal mode by entering 0 in the Output field and clicking the Set button on

the right.

1.9.4 AI/AO Application Notes

a) Figure 7 shows the typical connection setup for AI/AO/FSK.

b) Since the AI and AO blocks are not electronically isolated from each other, it is

recommended to keep the power sources for each block isolated, as shown in

Figure 7. An alternative is to use isolators in the system.

Page 30: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 30

Figure 7. Port connection overview

c) The AO CANNOT be directly connected to AI, as they share the same electronic

reference ground inside. Such a connection will damage the device.

Figure 8. Do not connect AI directly to AO

1.10 Troubleshooting

Due to the vast number of configuration possibilities for the Windows OS on the PC, you

may encounter some issues. For an updated list of troubleshooting, please visit the FAQ

section at www.awiatech.com. If you are unable to find a solution, please email us at

[email protected].

Page 31: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 31

2. DEVELOPMENT GUIDE

2.1 System Architecture

An AwiaNet provides a wireless medium to transport sensor data to the Host application

and other data from the Host to the sensors/actuators. There are two interfaces, one to

the sensors/actuators and one to the Host application, as shown in

Figure 9.

In a WirelessHART network, the conventional gateway is divided into three components:

1) the access point that talks wirelessly to the network, 2) the gateway (GW) that

interfaces with the Host applications, 3) and the network manager (NM) that manages

the wireless network. In the Awia network, the access point (Awia Captain) is a hardware

module installed inside the Awia Vanguard. The gateway and network manager are

software running inside the Awia Vannguard. The Awia Warriors are the network nodes

and represent the rest of the Awia network.

Figure 9. AwiaNet Network Diagram

The AwiaTech WirelessHART evaluation kit is a demo system with all the components

within the AwiaNet (as shown in the large rectangle area of Figure 9) plus a demo Host

application. There is an on-board photoconductor on each Awia Warrior that can be

activated in the demo system.

The AwiaTech WirelessHART evaluation kit provides the interfaces for Host application

developers and sensor developers.

Page 32: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 32

2.2 Host API

Users can develop their own Host applications using the API defined below. The demo

Host is written in JAVA. Users can choose any programming language because the

communication with the gateway is via the standard socket.

2.2.1 Definition

The Host application talks to the Awia Vanguard via socket communication. The port

number of the Awia Vanguard gateway is 8890. The port number of the Host application

is 8891.

The gateway and the Host application exchange messages. The message data format is

defined in Table 44.

Table 4 Host API Message Format

Protocol Number Payload

The Protocol Number is a one byte field indicating the different communication protocols

used. This evaluation kit only supports Protocol 10, the “simple data access”. In other

words, this field must be set to 10. The Protocol 10 message payloads are formatted as

commands. The payload is a one-byte command number followed by the command

content, whose sizes differ for different commands.

The commands are:

Table 5 Command numbers

Cmd # Name (content in the

parenthesis)

Definition Host->GW GW->Host

1 ReadTagList() Read the list of devices in the network. Yes No

2 Subscribe(device tag,

update rate, burst

command number)

Instruct the device to publish data to

the Host. The data is also saved in the

gateway cache.

Yes No

3 Unsubscribe(device tag) Stop publishing. Yes No

4 Read(device tag) Read data from the gateway cache. Yes No

5 TagList(tag list) Report the device list. No Yes

6 Data(device tag, data

value, timestamp)

Forward the published data from the

device or, as response to the Read()

command, report data in the gateway

cache.

No Yes

7 Write(device tag, data

value)

Write data to the device's attached

sensor/actuator.

Yes No

8 HARTCmd Request Send a HART command. Yes No

Page 33: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 33

(device tag, command

number, command

content)

9 HARTCmd Response

(device tag, command

number, command

content, timestamp)

Receive a HART command response. No Yes

The content parameters are:

Table 6 Payload parameters

1. device tag 6 bytes. Uniquely identifies a Warrior node.

2. update rate 1 byte. The frequency of which the Warrior will publish data. Its value v is

from 0 to 12. The update period = (2v ×250ms).

3. burst command

number

2 bytes.

- 0x00, 0x01 (Command 1): Burst from the simulated sensor in the

Warrior.

- 0x00, 0xAA (Command 170): Burst the data in the Warrior cache

updated by the real sensor.

4. data value - 0x00, 0x01 (Command 1): 4 bytes IEEE-754 (IEC 559) compatible single

precision floating-point number. The value is sampled from a sinusoid

curve in the range of [-1, 1]. Reference the source code in the sample

Host for its interpretation.

- 0x00, 0xAA (Command 170): Byte string the sensor put in the Warrior

cache. Maximum size is 72 bytes.

5. command number 2 bytes. A valid HART command. Most significant byte first.

6. command content The payload of the HART command. The first byte is the status byte if it is a

command response from the Warrior.

7 timestamp 8 bytes. The time that the data was received in the Gateway.

Byte 0: Year (Upper two digits. e.g. "20" in "2013")

Byte 1: Year (Lower two digits. e.g. "13" in "2013")

Byte 2: Month

Byte 3: Day of the month

Byte 4: Hour (1 - 12)

Byte 5: Minute

Byte 6: Second

Byte 7: AM = 0, PM = 1

As an example, the Host wants to read the network ID from device 0x00001b1e0002. It

will send HART command 774 (0x0306) to that device. The Host will then send message

Page 34: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 34

byte string 0x010800001b1e00020306 to the gateway. The message the Host gets back

will be 0x010800001b1e0002030600AAAA, which says the network ID is 0xAAAA.

2.2.2 Usage

In this section we describe how to set up the Host to receive burst data from the Awia

Warrior.

First, the Host application establishes the socket connection with the gateway. Next, the

Host application should call ReadTagList() periodically to find new sensors in the

network.

Once having received TagList(), the Host application calls Subscribe() to activate sensor

data publishing. The sensor will then periodically send data to the cache in the gateway,

which will forward the data to the Host via Data().

Whenever the Host wants to view the latest cached data, it sends Read() to the gateway,

which will respond by sending Data() back.

2.2.3 Sample code

The demo Host application serves as the sample code in JAVA. The following is the

sample code in C++.

Receive

// load and create socket WORD myVersionRequest; WSADATA wsaData; myVersionRequest=MAKEWORD(1,1); int err; err=WSAStartup(myVersionRequest,&wsaData); serSocket=socket(AF_INET,SOCK_STREAM,0); SOCKADDR_IN addr; addr.sin_family=AF_INET; addr.sin_addr.S_un.S_addr=inet_addr(OPC_SERVER_ADDR); addr.sin_port=htons(OPC_SERVER_PORT); bind(serSocket,(SOCKADDR*)&addr,sizeof(SOCKADDR)); listen(serSocket,5); // listening loop while(true) { SOCKET serConn=accept(serSocket,NULL,NULL); char receiveBuf[200]; int len = recv(serConn,receiveBuf,strlen(receiveBuf)+1,0); if(len!=-1) { char* npdubytes = new char[len]; memcpy(npdubytes,receiveBuf,len); this->m_gwProcessor->addNpduBytes(npdubytes,len); }

Page 35: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 35

} // handle commands if(*(m_queryBytes+0) == 1) { m_apiIndex = *(m_queryBytes+1); switch((int)m_apiIndex) { case 1://ReadTagList() break; case 2://Subscribe(deviceTag, updateRate) break; case 3://Unsubscribe(deviceTag) and Read(deviceTag) break; case 4: break; case 5://TagList(tag list) - copies a variable amount of deviceTags into byte array. m_tagListLength = m_queryLength - 2; m_tagList = new char[m_tagListLength]; memcpy(m_tagList,m_queryBytes+2,m_tagListLength); break; case 6://Data(deviceTag, dataValue) if(len<18) m_isenough = 0; else if(len>18) {m_istoomuch = 1; m_isenough = 1; m_remaindata = new char[len-18]; memcpy(m_remaindata, m_queryBytes+18,len-18); m_remaindataLength = len-18; } else {m_isenough=1; m_istoomuch=0;}; if(m_isenough ==1) { m_queryLength = 18; m_deviceTag = new char[devicetagLength]; memcpy(m_deviceTag,m_queryBytes+2,devicetagLength); m_dataValueLength = m_queryLength - 8; m_dataValue = new char[m_dataValueLength]; memcpy(m_dataValue,m_queryBytes+8,m_dataValueLength); m_timestamp = new char[m_timestampLength]; memcpy(m_timestamp, m_queryBytes+12,m_timestampLength]; } break; } }

Send

// Form command message: ReadTagList() - 2 bytes m_queryBytes = new char[2]; m_queryLength = 2; *(m_queryBytes+0) = 1; *(m_queryBytes+1) = index; // =1 m_apiIndex = index; // Send command

Page 36: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 36

int err; WORD versionRequired; WSADATA wsaData; versionRequired=MAKEWORD(1,1); err=WSAStartup(versionRequired,&wsaData); SOCKET clientSocket=socket(AF_INET,SOCK_STREAM,0); SOCKADDR_IN clientsock_in; clientsock_in.sin_addr.S_un.S_addr=inet_addr(GW_ADDR); clientsock_in.sin_family=AF_INET; clientsock_in.sin_port=htons(GW_PORT); connect(clientSocket,(SOCKADDR*)&clientsock_in,sizeof(SOCKADDR)); send(clientSocket, message, len, 0); closesocket(clientSocket); WSACleanup();

2.3 Device API

As shown in

Figure 9, a sensor can use the serial port (COM or virtual COM over USB) to

communicate with the Awia Warrior stack. The serial port is configured as follows:

Parity: Odd

Data Bits: 8

Stop Bits: 1

Baud Rate: 57600

Flow Control: None

The messages exchanged over the serial port follow the traditional HART command

format and is shown in

Request Command: Sensor / Actuator to Awia Warrior

Preambles 0x82 Address Command Byte

Count Data

Check

Byte

Response Command: Awia Warrior to Sensor / Actuator

Preambles 0x86 Address Command Byte

Count

Response

Code

Device

status Data

Check

Byte

Request Command: Sensor / Actuator to Awia Warrior

Preambles 0x82 Address Command Byte

Count Data

Check

Byte

Page 37: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 37

Preambles (5 bytes): The preambles are a fixed sequence of 5 bytes (0xFF 0xFF 0xFF

0xFF 0xFF) to indicate the start of the command.

Delimiter (1 byte): When sending request commands to the Awia Warrior, use "0x82" as

the delimiter; this indicates a request command. When the Awia Warrior sends a

response back to the sensor or actuator, “0x86” is used as a delimiter, to indicate a

response command.

Address (5 bytes): Since this is a point to point connection, the address field is not used

and should be set to all zeros.

Command (1 byte): This is the command number. In case of a 2-byte WirelessHART

command, this command byte is set to 31 (0x1F), and the actual 2-byte command

number is put at the beginning of the Data field. Remember to increase the Byte Count

by 2 bytes to accommodate the two inserted bytes.

Byte Count (1 byte): The number of bytes in the Data field. For Response commands,

the Byte Count is the number of bytes in the Response Code, Device Status, and Data

fields (1 + 1 + DataLength).

Response Code (1 byte): For response commands only. Indicates the result of

processing a request command. A response code of 0 indicates success / no error. Each

command has its own set of defined response codes, please refer to the command's

specification for details.

Device Status (1 byte): For response commands only. Indicates the current status of

the device, based on the Command Summary Specification (HCF_SPEC_099).

Data (n bytes): The data bytes of a request or response command. Some commands do

not require any data bytes (such as Command 0, Read Unique Identifier), and therefore

the Data field is empty. Please refer to the command's specification for interpretation of

the data bytes.

Check Byte (1 byte): A check byte is used to check for errors in message transmission.

To calculate the check byte, XOR each byte in the message, starting from the Delimiter,

and ending on the last byte in the Data field.

The following two subsections describe the usage of device specific command 170 and

171. Other commands that are commonly used in normal WirelessHART operations are

also described below.

Response Command: Awia Warrior to Sensor / Actuator

Preambles 0x86 Address Command Byte

Count

Response

Code

Device

status Data

Check

Byte

Page 38: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 38

2.3.1 Command 170 - Read Sensor Value (Host to Awia Warrior)

When the Host application sends request command 170 wirelessly from the Gateway to

the Awia Warrior, this is interpreted as "Read Sensor Value". The Awia Warrior will then

send a response command 170 containing the latest data value received from the

sensor in the response command 170's data field.

When sending command 170 from the Host to the Awia Warrior, the data field of

command 170 is empty. In other words, the byte count is zero. Any bytes in the data

field are ignored by the Awia Warrior.

The Host can be used to subscribe to the Awia Warrior with command 170, so that the

Awia Warrior periodically publishes the latest sensor value via response command 170.

This eliminates the need for a user to manually send command 170 multiple times.

2.3.2 Command 170 - Write Sensor Value (Sensor to Awia Warrior)

When the sensor sends request command 170 via the serial port to the Awia Warrior,

this is interpreted as "Write Sensor Value". The Awia Warrior will save the data payload

in command 170 to a local cache. This data is sent to the Gateway and Host under two

conditions: the Host manually sends command 170 to read the sensor value, or the Awia

Warrior is configured to periodically publish command 170.

When the Awia Warrior receives request command 170 from a sensor, the Warrior will

send a response command 170 back to the sensor, to confirm that the request

command 170 was received and processed. The response command 170 will contain

the same data bytes found in the request command 170.

Command 170 supports any data value up to 72 bytes; the sensor can also write an

empty data value (0 bytes) if desired.

2.3.3 Command 171 - Write Actuator Value (Host/Awia Warrior to Actuator)

To write a data value into an actuator, use the Host to send command 171 to the Awia

Warrior. The Awia Warrior will forward command 171 to its attached actuator. Note that it

does not matter if the attached device is a sensor or actuator, as long as the attached

device supports command 171. After receiving command 171, the actuator can process

and act upon the data payload in command 171. In this case, the actuator do NOT need

to send command 171 response to Awia Warrior.

Command 171 supports any data value up to 72 bytes, including an empty data value (0

bytes).

2.3.4 Command 171 - Read Actuator Value (Actuator to Awia Warrior)

An actuator can also read the latest data value that the Host has written using command

171. This is achieved by sending command 171 with an empty data field from the

actuator to the Awia Warrior; any bytes in the data field are ignored by the Awia Warrior.

Page 39: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 39

The Warrior will respond with the most recent command 171 that it has received from

the Host.

2.3.5 Command 773 - Set Network ID

This is a standard WirelessHART command. This command configures the Awia Warrior

to recognize the proper Network ID. After changing the network ID, the device must be

restarted for the change to take effect. In this command, the data field is the two-byte

network ID, represented in big-endian.

Command 773 Data Bytes

Byte Format Description

0-1 Unsigned-16 Network ID

2.3.6 Command 961 - Write Join Key

This is a standard WirelessHART command. This command is used to set the join key of

the Awia Warrior. The join key is used for authentication with the network manager

during the join process. In this command, the data field is the 16 byte join key.

Command 961 Data Bytes

Byte Format Description

0-15 Unsigned-128 Join key value

2.4 Putting It All Together

2.4.1 Use Awia Net as a Data Transmission Medium

Just like other network infrastructure, the Awia Net can serve as a medium for two peers

to exchange data. In this case the peers are the Host application and the

sensors/actuators in the field. For this purpose, the Awia Net receives data from the Host

and delivers to the sensor, and vice versa.

From Host to sensor/actuator: To write data, the Host application sends command 171

with a string of bytes to be sent to the sensor/actuator. The AwiaNet will route the data to

the Warrior associated with that sensor, and then Warrior will send command 171 to the

sensor/actuator with the same payload.

To read the current sensor data, the Host application can send command 170 to the

Awia Warrior. The response command from the Awia Warrior will contain the most

recent data value from the sensor. Manually sending command 170 from the Host

should be reserved for occasional use; enable command 170 bursting on the Awia

Warrior for periodic updates.

Page 40: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 40

From sensor to Host: The sensor sends command 170 to Awia Warrior with a string of

bytes. The Awia Warrior will cache the bytes. If bursting is established by the Host, the

Awia Warrior will periodically publish the data in its cache to the gateway. This is an

efficient method for the Host to stay constantly updated with the latest sensor values.

Upon the reception of an update from the Awia Warrior, the gateway puts the data in its

own cache and forwards it to the Host by calling Data(). Occasionally, the Host can

perform Read(), and the gateway will call Data() in response, which will forward the

string of data in its cache to the Host application.

The Host application should first call Subscribe() with the burst command number set to

170. Calling Subscribe() with the burst command number set to 1 will activate the built-in

temperature sensor in the Awia Warrior; the data from the external sensor will not be

transmitted to the gateway.

Host to sensor protocol: It is up to the user to define the protocol between the Host

and the sensor, i.e., the semantics of the byte string exchanged between the two. The

Host and sensor should manage the acknowledgement and retry; it is possible that the

wireless network may lose a message. In addition, since there is a limit of 72 bytes per

message, the user should handle data larger than 72 bytes by breaking it up in the

sender and reassembling in the receiver.

Table 88 shows example message field values for Command 170 and 171 that occur

between the Awia Warrior and the sensor. In this example the data from the Host to the

sensor is “0x12 0x34 0x56” and the data from the sensor to the Warrior is “0xAB 0xCD

0xEF”.

Command 171:

Awia Warrior -> Sensor

Command 170:

Sensor->Awia Warrior

Preambles 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

Delimiter 0x86 0x82

Address 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Command Number 0xAB 0xAA

Byte Count 0x05 0x03

Response Code 0x00 (N/A)

Device Status 0x90 (N/A)

Data 0x12 0x34 0x56 0xAB 0xCD 0xEF

Check Byte 0xC8 0xA2

Table 8 Command 170 messages field value

An example: In this application, the first byte of the byte string will be a handle. The

Host increments the handle each time it sends to the sensor asking for new data. The

sensor sends back the data with the handle copied to the first byte.

Page 41: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 41

The Host could call a read() function whenever it needs to read new data from the

sensor. The pseudo code of read() is as follows:

char handle = 0; char data[100]; char * read() { handle++; do { HARTCmd(deviceTag, 171, handle); receive_HARTCmd(retDeviceTag, &cmdNo, data); sleep(1s); } while ((retDeviceTag != deviceTag) || (cmdNo != 171) || (data[1] != handle)) return &(data[2]); // data[0] is the HART status byte }

The sensor could implement the following endless loop:

char handle = 0; char data[100]; while (1) { receive_Command171(&handle); if (handle != data[0]) { Handle = data[0]; read_sensor(&(data[1])); } Command171(data); }

2.4.2 Use Awia Warrior in Another WirelessHART Network

Awia Warrior could be experimented as a standalone WirelessHART device. Generally,

a WirelessHART device has to be configured before being deployed. This step is

required for normal operation and security concerns. Awia Warrior is designed to require

minimal configuration. There are only two required parameters for normal operations:

first, the network that the device intends to join; second, the join key. The user could use

the serial communication to write the join key and network ID into the Warrior. Or the

user could configure the targeted network with the network ID (0x1236) and join key

(0x00001236000000000000000000000000) used in the evaluation kit. With these pieces

of information, a device equipped with Awia Warrior can join the designated

WirelessHART network automatically upon power-on.

2.4.3 Use Awia Net as a WirelessHART Evaluation Tool

A major purpose of the AwiaTech WirelessHART evaluation kit is for users to explore

and learn about WirelessHART. A WirelessHART network could be set up right out-of-

the-box with the parts in the kit, as is described in Section 1. The user can also run the

Page 42: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 42

Wi-Analys tool from the HART Communication Foundation side-by-side with this kit to

view the WirelessHART network traffic.

Page 43: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 43

3. TECHNICAL SPECIFICATIONS

WirelessHART Software

WirelessHART User Guide. HCF_LIT-84

Coexistence Test Plan. HCF_LIT-85

Approved IEEE 802.15.4 Transceivers. HCF_LIT-088

IEEE STD 802.15.4-2006. Wireless Medium Access Control (MAC) and Physical

Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks

(WPANs). 2006

Awia Warrior 220

Peripherals/Software

Input UART/RS232, FSK, SPI, 4-20mA Analog Input

Radio IEEE802.15.4 radio module

Hardware Chip EnergyMicro GG230F512 + Atmel AT86RF233 (MCU+RF)

Electrical & Mechanical

Input Voltage 4.5 – 12v DC

Main Board Dimensions 2.28in(W) x 3.54in(L); 5.8cm(W) x 9.0cm(L)

Certifications

EMI FCC (FCC-ID: ZCO-220), CE

Standard WirelessHART-conforming, registration ready

Default Configurations

Network ID 0x1236

Join Key 0x00001236000000000000000000000000

Subject to change without prior notice.

Page 44: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 44

4. GLOSSARY OF TERMS

Awia Captain: AwiaTech’s Access Point product.

Awia Commander: AwiaTech’s WirelessHART Network Manager, which also includes

AwiaTech WirelessHART Security Manager.

AwiaNet: A WirelessHART network consisting of AwiaTech’s WirelessHART products.

Awia Vanguard: AwiaTech’s WirelessHART Gateway.

Awia Warrior: a hardware module running AwiaTech’s WirelessHART network stack,

thus acting as a node to the network. It is usually attached to a sensor device.

Channel: RF frequency band used to transmit a modulated signal carrying packets.

Frame: A Data-Link Layer "packet" which contains the header and trailer information

required by the physical medium. That is, Network Layer packets are encapsulated to

become frames.

Frequency channel: allocation of the frequency spectrum in a given frequency range.

Gateway: Network device containing at least one Host interface such as serial or

Ethernet, acting as ingress or an egress point enabling communication between Host

applications and field devices.

Graph: Routing structure that forms a directed end-to-end connection between network

devices.

Graph ID: Identifier used to indicate a specific graph entry.

Join: Process by which a network device is authenticated and allowed to participate in

the network. NOTE: A device is considered Joined when it has the network key, a

network manager session and a normal (not join) superframe and links.

Join key: Security key that is used to start the join process.

Latency: Time it takes for a packet to cross a network connection, from sender to

receiver.

Link: Full communication specification between adjacent devices in a network and it

includes the communication parameters necessary to move a DLPDU one hop. NOTE:

A Link is a function of source and destination address pairing, slot and channel offset

assignment, direction of communication, dedicated or shared communication, and type.

Links are assigned to superframes as part of the scheduling process.

Master: A device that initiates communication activity by sending request APDU to a

device and expecting a response PDU.

Page 45: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 45

Medium access control: Lower of the two data-link layer levels. NOTE: This level

controls the access to the communication channel.

Neighbor: Adjacent node in the network such that the receive signal level (RSL) from it

suggests that the communication is possible in at least one direction.

Network device: Device with a direct physical layer connection to the network.

Network ID: Identifier used to indicate a network to which all intercommunicating

devices are connected. NOTE: A device connected to one network can not send a PDU

to another device connected to a different network.

Network manager: Entity that is responsible for configuration of the network, scheduling

communication between network devices, management of the routing tables and

monitoring and reporting the health of the network. NOTE: There is one and only one

network manager per instance of Type 20 network. Although the network manager need

not have a direct physical layer connection, it still has a unique address.

Node: Addressable logical or physical device attached to the network.

Security Manager: An application that manages the Network Device's security

resources and monitors the status of the network security.

Slot: Fixed time interval that may be used for communication between neighbors.

Superframe: Collection of slots repeating at a constant rate; each slot has a link

associated with it.

Time division multiple access: Medium access control technique that uses time slots

where communications between devices can occur. NOTE: It provides collision free,

deterministic communications.

Transaction: Exchange of related, consecutive frames between two peer medium

access control entities, required for a successful transmission. NOTE: A transaction

consists of either (a) a single PhPDU transmission from a source device, or (b) one

PhPDU from the source device followed by a second, link-level acknowledgement

PhPDU from the destination device.

Page 46: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 46

5. INDEX

Access Point, 7

application layer, 6

Awia Captain, 7, 43, 46

Awia Commander, 7, 43, 46

Awia Vanguard, 7, 8, 11, 12, 32, 43, 46

Awia Warrior, 7, 11, 31, 33, 36, 38, 39,

40, 41, 42, 43, 46

AwiaNet, 7, 8, 12, 31, 43, 46

Baudrate, 36

data link layer, 6

DataBit, 36

FlowControl, 36

Gateway, 5, 7, 43

IEC 62591, 5

IEEE 802.15.4, 5, 42

Join Key, 42

network ID, 33, 39, 41

Network ID, 42

network layer, 6

OSI, 6

Parity, 36

physical layer, 6, 44

StopBit, 36

transport layer, 6

WirelessHART, 5, 6, 7, 11, 31, 38, 39,

41, 42, 43, 46

Page 47: AwiaTech WirelessHART Evaluation Kit Manual · WirelessHARTTM (Wireless Highway Addressable Remote Transducer) is an open-standard wireless networking technology developed by the

AwiaTech WirelessHARTTM Evaluation Kit Manual

Rev. 4.1 47

AwiaTech Corporation © 2011-2014. All rights reserved.

AwiaTech, Awia Warrior, Awia Vanguard, Awia Commander, Awia Captain, and AwiaNet are trademarks

of AwiaTech Corporation. HART and WirelessHART are trademarks of the HART Communication

Foundation. Other company and product names mentioned herein may be trademarks of their respective

companies.

Mention of third-party products is for informational purposes only and constitutes neither an endorsement

nor a recommendation. AwiaTech assumes no responsibility with regard to the performance or use of these

products. All understandings, agreements, or warranties, if any, take place directly between the vendors and

the prospective users. Every effort has been made to ensure that the information in this manual is accurate.

AwiaTech is not responsible for printing or clerical errors.

The product described in this manual incorporates copyright protection technology that is protected by

method claims of certain U.S. patents and other intellectual property rights owned by AwiaTech

Corporation and other rights owners. Use of this copyright protection technology must be authorized by

AwiaTech Corporation. Reverse engineering or disassembly is prohibited.