Technical Note 1 – Digital Integration of Rotronic devices

The Rotronic HygroClip2 was launched around four years ago and is used as standard with most of our devices. Underpinning the HygroClip2’s performance beyond the Rotronic sensor element is some impressive technology.

The Airchip3000 is the chip that provides high resolution measurement of the raw sensor outputs, temperature compensation and calibration correction tables which ultimately provides the high accuracy measurements our customers demand.  In addition, the Airchip provides digital and analogue communications. All the Rotronic instrumentation communicates digitally to these probes but these interface methods are possible without using a Rotronic handheld/logger/transmitter etc.

Lets explore what is possible…

Connections

Devices can be connected to your software or systems via USB, Ethernet, Serial or Wireless depending on the physical connections available. The AirChip itself has a simple RS232 output so additional hardware will be required for for anything but direct RS232 interface (to a Raspberry Pi GPIO for example).

Rotronic DLL

The Rotronic DLL provides a link between Rotronic devices and your software program (as well as our HW4 software). The DLL allows you to call up all functions within our devices that are accessible via our software. We have several example packages to make developing your own systems easier including;

– C++
– Visual Basic
– LabView
– Excel

The DLL can be integrated into wider software systems, if you have sufficient technical know-how. For example using using ctypes in Python allows the integration of Windows DLL. Python programs can then be used cross platform (Windows, Mac and Linux etc).

This approach is typically used when integrating our HC2 range of probes via our AC3001 Probe-USB converter cable. This way you can utilise our highest accuracy probes in a simple and efficient manor without any loss of accuracy due to digital-analogue conversions. It is also possible to quickly add the measured values into your existing projects. This is how our HygroGen2’s Autocal system communicates to the Rotronic probes during automated calibration and adjustment runs.

Example programs and DLL itself can be downloaded here

If you require support integrating our sensors into your systems please do not hesitate to contact us!

Direct Device Interface

In certain situations utilsing our DLL may not be appropriate for your project. So it is also possible to directly communicate with the Airchip3000 devices avoiding the DLL and using direct protocol commands. This is often a far simpler method and more commonly used when integrating to industrial systems.

With Ethernet and Serial devices communication if very easy using a terminal program (eg Putty) or direct from your Linux terminal (For USB some extra step are required explained at the end of this article).

1. Connecting to Rotronic devices via Putty (!!! USING USB? READ THE NOTE AT THE BOTTOM OF THIS POST !!!

Firstly, you simply need to connect to the relevant comm port or IP Address and send your commands. Serial interface settings are detailed below. For Ethernet simply use RAW connection and select port 2101 or use Telnet with Port 2001 (you will need your devices IP address)

Step 1 – Setup Serial Settings in Putty

Putty Setup

Step 2 – Force Echo On / Line Editing
I strongly recommend changing the Terminal settings to Force Echo (so you can see what you type and edit it)…

Putty Setting Echo

Step 3 – Connect
Now simply open your session…

Putty Open

All Airchip devices will respond to the command below, an example response is shown from a HC2-S probe.

Sent Command
{ 99rdd}

Return String
{F00rdd 001; 36.30;%rh;000;=; 24.30;°C;000;=;nc;—.- ;°C;000; ;001;V2.0-2;0061176056;HC2 ;000;C

Explaination ( “;” separated values)
{
F = Device Type
00 = RS485 address
rdd = command
001 = Device type

36.30 = value 1
%rh = value 1 units
000 = value 1 alarm condition
= = trend

24.30 = value 2
°C = value 2 units
000 = value 2 alarm condition
= = trend

nc = calculated value selected
—.- = calculated value
°C = calculated value units
000 = calculated value alarm condition
= calculated value trend

001 = hardware version
V2.0-2 = firmware version
0061176056 = serial number
HC2 = device name
000 = sensor alarm
C = checksum

Important Note! Using USB interface with Putty

By default all Rotronic USB interface cables will link to the Rotronic driver and try to use the DLL. However if you configure the cable to be a Virtual Comm Port you can use the simple serial connection method described above! So you can see every device  connection type can be interfaced using this method 🙂

To do this you need to force windows to use the standard FTDI driver and setup the Virtual Comm Port.

Step 1 Install FTDI Drives

Select the relevant drivers from this page for you OS http://www.ftdichip.com/Drivers/D2XX.htm

Step 2 – Force Windows to use new driver

Go to device manager (Control Panel, System, Device Manager)

1 – Click Update Driver
2 – Select Browse my computer for Driver
3 – Choose ‘Let my pick from a list’
4 – Click Have Disk
5 – Go to the FTDI folder and click  ftdibus.ini
6 – Select the USB Serial Port

Now you will see a new USB Serial Port in Device Manager under Ports (COMM AND LPT) – right click and select properties. Ensure the Port Settings are as below.

Baud rate : 19200
Data bits : 8
Parity : none
Stop bits : 1
Flow Control : none

You can now use the Virtual Comm Port in putty or other projects.

In my experience with bespoke software packages for a single device type the terminal connection is very simple.

For example a simple Python code to communicate with an Ethernet device is below…

try:
session = telnetlib.Telnet(192.168.1.1, 2001, 0.5)
except socket.timeout:
print (“socket timeout”)
else:
session.write(“{ 99RDD}”.encode(‘ascii’) + b”\r”)
output = session.read_until(b”/r/n/r/n#>”, timeout )
session.close()
print(output)

We will look at direct interface to the AirChip and available protocol options next time!

Comments or queries – let us know!!

Dr. Jeremy Wingate
Rotronic UK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s