Devantech dS3484 User manual

dS3484
dS3484 User Manual v4.03
Table of Contents
ocumentation history....................................................................................................3
A quick look...................................................................................................................4
Introduction..................................................................................................................5
Getting started...............................................................................................................6
Locating the IP Address...........................................................................................................7
Configuring the dS3484..................................................................................................9
Status page.........................................................................................................................10
Network page.......................................................................................................................11
TCP/IP page.........................................................................................................................12
Webpage security.................................................................................................................14
Configuring relays.................................................................................................................16
Relay automation..................................................................................................................17
Naming I/O's........................................................................................................................20
Connecting I/O to Virtual Relays.............................................................................20
Email notifications.................................................................................................................21
Peer to Peer.........................................................................................................................22
Schedules............................................................................................................................ 23
Counter/Timers....................................................................................................................25
The application page.....................................................................................................28
Application page security.......................................................................................................29
Accessing your webpage from the internet................................................................................30
Boolean equations........................................................................................................31
TCP/IP command sets...................................................................................................33
ASCII command set..............................................................................................................33
Binary command set..............................................................................................................36
AES binary command set.......................................................................................................38
Modbus commands...............................................................................................................40
Function 01 (0x01) Read Coils................................................................................40
Function 04 (0x04) Read Input Registers.................................................................40
Function 05 (0x05) Write Single Coil.......................................................................40
Function 15 (0x0F) Write Multiple Coils....................................................................41
Error code 1.........................................................................................................41
Error code 2.........................................................................................................41
Error code 3.........................................................................................................41
Modbus Gateway..................................................................................................................41
Loading the application firmware....................................................................................42
Erasing old configuration settings............................................................................................44
dS3484 hardware.........................................................................................................45
LE indication......................................................................................................................46
Power supply........................................................................................................................46
Operating temperature..........................................................................................................46
Power relays........................................................................................................................47
igital IO.............................................................................................................................48
Connection Examples............................................................................................................49
Analogue inputs....................................................................................................50
Serial Port Connections..........................................................................................52
dS3484 dimensions......................................................................................................53
Notes..........................................................................................................................54
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 2

dS3484
dS3484 User Manual v4.03
Documentation history
V2.18 First release of separate dS3484 manual
V2.19 Added new features:
Peer to Peer Use events to control relays on another dSxxxx module.
Schedules Create regular timed events
Counters Count input transitions or seconds
v2.20 Minor update ocumentation unchanged
v3.01 Application update
Added ModBus function 15, Write Multiple Coils.
Increased to 32 relays. On dS3484, relays 5-32 are virtual relays.
Added CRC calculation to string arrays.
Added Modbus gateway to connect to downstream Modbus RTU modules.
Added settings for Modbus UI and downstream baud rate & parity.
Added independent Set, Reset and Toggle control boxes to relays.
Added ability to connect a virtual relay to a digital output.
Added power-up restore option for relays, restoring previous state.
Expanded application page to include virtual relays.
I E update
Updated to offer cross platform support
Now available under Windows, Linux & MAC OS X
v4.01 Major update to the underlaying dScript, now with functions and local variables.
Added “From Address” for easymail emails.
v4.02 Bug fixes for the underlaying dScript.
v4.03 Editor update, added support for multiple editor tabs.
Compiler update, added support for multiple files in project.
Compiler update, added support for #ifdef, #else, #endif
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 3

dS3484
dS3484 User Manual v4.03
A quick look
Ethernet connected module, 10/100Mb auto negotiated.
Relays – 4 x 16Amp 250Vac C/O.
I/O – 8 x digital I/O's NPN output, Volt free input.
4 x 10-bit analogue input
Power – 12V C 1Amp supply required. 2.1mm center positive.
Connections – Screw Terminals for N/O N/C and Common contacts
PCB size – 156mm x 84mm
Controlled graphically by secure webpage or optionally one of ASCII, Binary or Modbus
command sets over TCP/IP.
Email notifications – 8 selectable notifications, up to 100 emails/hour max.
Peer to Peer – Control relays on other modules.
Schedules – Able to schedule events based on time of day/week
Counter/Timers – Count or time events. 20 counts/second Max.
Also available when optionally programming in dScript are two TTL level serial ports and an
RS485 serial port.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 4

dS3484
dS3484 User Manual v4.03
Introduction
The dS3484 is an Ethernet connected relay module featuring 4 channels of 16Amp 250Vac
relays. Each relay has both normally open (NO) and normally closed (NC) as well as the
common available on three terminals.
In addition to the relays, the dS3484 has 8 digital I/O channels and 4 x 10-bit analogue input
channels (0v-3.3v input range).
The dS3484 requires a 12v 1Amp power supply such as this one:
http://www.robot-electronics.co.uk/universal-12vdc.html
The dS3484 has four built in control methods.
Primary control method is graphically by using its built in secure website.
Secondary control may be one of:
ASCII - type in commands via a program such as PuTTY.
Binary - Command set using binary codes
Modbus – Functions 1, 4, 5 and 15 supported
And if you should wish to modify the supplied firmware – you can.
Behind the scenes there is dScript, a powerful multi-threaded operating system and
programming language. The supplied firmware is written in dScript as well as HTML, CSS and
Javascript on the webpages and the full source is in the separately downloadable dScript
support package.
You do not need to use dScript at all, but its great to know its there - just in case you do.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 5

dS3484
dS3484 User Manual v4.03
Getting started
Start by plugging in the Ethernet cable to connect the module to your network, and the 12v
jack plug from your adapter. Switch on and the first thing you will note is that the blue LE will
flash 3 times. This indicates that the control firmware is loaded on the module. (If the blue led
does not flash you will need to load in the control firmware. Don't worry, this is very easy to
do. Just go to the chapter on installing the firmware and follow the instructions there).
If you are using a Win7/8/10 PC, open your browser and into the address bar (not the search
bar) type:
http://dS3484/index.htm
You should now see the application webpage and you can control relays and I/O's.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 6

dS3484
dS3484 User Manual v4.03
Locating the IP Address
If you are not using a windows PC then you will need to find the IP address of the module.
The simplest method is connect the module (Ethernet, USB then lastly, Power) and load up the
dScript editor.
Go to Module Select Port and make sure the correct serial port is selected as illustrated above.→
Now go to Module IP Address and the current IP address is displayed.→
Make sure the Ethernet is connected before you apply power. If you plug the Ethernet cable in
after the power, the module will already have booted with a default IP address.
Alternatively, you can find the IP address of the module by checking your HCP server. If you
have a HCP server on your network (your router is normally the HCP server) then the
dS3484 will get its IP address from that. Log on to your router and navigate to the LAN client
list.
Above is the entry from our ASUS RT-N66U router. So now you type:
192.168.0.64/index.htm
into your browser address bar and you should see the application webpage shown on the
previous page.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 7

dS3484
dS3484 User Manual v4.03
If you prefer, you can download a java program that will run on Windows, MAC or Linux, and
will list all of our modules that are connected to your LAN. evantechModuleFinder.jar
If you do not have a HCP server the dS3484 will use a default IP address of 192.168.0.123 so
make sure your PC is on the same subnet of 255.255.255.0 and its IP address is
192.168.0.xxx
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 8

dS3484
dS3484 User Manual v4.03
Configuring the dS3484
There are a set of configuration pages to get the dS3484 operating as you want it. These
pages are all _configx.htm, (that's a leading underscore character).
ie.
_config.htm
_config2.htm
Anything that starts with _config is considered a special name for configuration pages and can
only be seen if you have the the USB cable plugged in and connected to your PC.
Why only if the USB cable is plugged in?
Its an additional security measure. After you have configured and deployed the module, you
really don't want these configuration pages available for others to change. So with the USB
cable disconnected the _config pages are not available. If you try to access them you just get
served a “not authorised” page instead.
So for now, you do want to look over the config pages. If you have a Win10, Linux or MAC PC,
you can go right ahead and plug in the USB cable. These machines will install their own USB
drivers. We won't be sending anything to the board, its just the presence of the USB
connection that enables the config pages to be served. If you have a Win7 or Win8 PC you will
need to install the drivers. (go to the chapter on installing the firmware and follow the
instructions there).
With the USB cable connected, browse to:
192.168.0.64/_config.htm
(substituting your IP address)
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 9

dS3484
dS3484 User Manual v4.03
Status age
You should now see the following page:
This status page shows you the system and application firmware revisions as well as the
supplied voltage to the board and its internal temperature.
If you hover your mouse cursor over the menu buttons on the left, the help panel will give you
an overview of each one.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 10

dS3484
dS3484 User Manual v4.03
Network age
Notice that everything below the Host Name is greyed out and can't be changed. This is
because the “Enable HCP” box is checked and all the greyed out fields are supplied by the
HCP server. Although a quick way to get you connected, we really do not recommend this as
the HCP server can assign a different IP each time you power up. If you want to control this
module from the internet while you are away from the premises then you will be setting up
port forwarding on your router which requires a fixed IP address.
So lets do that first.
Uncheck the HCP box and you can then set all the other fields. Notice that the Red “Update
Pending” light comes on. It indicates there are changes which have not yet been written to the
flash memory. It will go off again 5 seconds after you stop changing anything.
Choose an IP address for the module, something outside of the HCP settings on your router
so it will not assign anything to that address.
The subnet mask, Gateway and NS can all be left as the defaults.
Network changes only take effect after the next re-boot, so wait until the “Update Pending”
light goes out and give the reset button on the module a quick press. The Green Led will light
and the Blue led will flash 3 times. You will now find the module at your new IP address. If the
Red led comes on after you press the reset button, its because you pressed it for too long (and
entered bootloader mode). Just have another go with the reset button for a bit less time.
Your browser won't know you have changed the IP address so it will still be showing the old,
now dead page. Make sure you change to your new IP address and load the page again.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 11

dS3484
dS3484 User Manual v4.03
TCP/IP age
The TCP/IP tab allows you to select one of three command sets to control the module. These
are independent of, and separate to the HTML webpage control.
Clicking on one of the four check boxes will select that command set. Only one command set
may be selected. You can disable all TCP/IP command sets by clicking on an already selected
box.
The ASCII command set is text based. You can use any program that can send text over
TCP/IP. We use PuTTY in raw mode. The Binary command set operates in a similar way to our
ETHxxx range of boards (but uses different commands), by sending binary commands to the
module. AES Binary adds encryption. Note the AES key MUST be 32 bytes long. We have test
applications written in C# and Java to demonstrate AES encryption.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 12

dS3484
dS3484 User Manual v4.03
When selecting the Modbus commands, an additional set of configuration boxes are available.
These allow you to select the UI , normally you will leave this at the default of 1. The dS3484
will respond to commands on this UI . If you send any other UI it will be treated as the
address of a Modbus module connected to the RS485 port. Commands to other UI ’s will be
converted to Modbus RTU format and sent out on the RS485 port. Any responses will be
converted back to Modbus/TCP format and returned to you.
The second box selects the baud rate of the Modbus RTU line and the third box selects even,
odd or no parity.
The Modbus command set implements functions 1, 4, 5 and 15.
When selecting the Modbus command set, make sure you select port 502 which is the official
port number for Modbus over TCP/IP.
A full description of the commands is in the “Command Sets” section later in this manual.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 13

dS3484
dS3484 User Manual v4.03
Web age security
Allows you to prevent unauthorised personnel from accessing the application webpage or using
it to control the module.
Leaving the Security Password blank will disable it and allow everyone to access the application
page to control the module.
To enable password protection enter a password into the Password box. You can use any
characters from the ASCII character set from 0x20 to 0x7E except “ (0x22). It may be up to
200 characters long and you don't have to memorise it, so make it a long one with plenty of
uppercase, lowercase, numbers and symbols.
Accessing a special webpage, _pw.htm, will install the password on your browser. To do this
make sure the Enable _pw.htm box is checked.
When the “Update Pending” light goes out, re-boot the module and go to
yourIP/_pw.htm
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 14

dS3484
dS3484 User Manual v4.03
You will see something like this:
The password is now loaded on your browser. o the same for any further browsers you want
to enable. When you have done uncheck the “Enable _pw.htm” box to prevent anyone else
from loading the password. When the “Update Pending” light goes out re-boot the module
again.
The default port used by html webpages is 80. You can change this if required. If you do so
then you will need to include the port number in the address.
If you change the port to 2345 then the webpage will be at:
YourIP:2345/index.htm
For example:
192.168.0.123:2345/index.htm
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 15

dS3484
dS3484 User Manual v4.03
Configuring relays
The next tab allows you to set the names of the 32 relays that will be displayed on the
application page.
Use the Relay No. box to select the relay to configure. There are 32 relays available. Relays 1-
4 are the physical relays on the module. Relays 5-32 are virtual relays, they have no physical
presence but otherwise behave the same as the real ones. I/O lines may be linked to virtual
relays to provide additional physical outputs, see next section for details.
Names may be up to 20 characters long,but keep them shorter if you want to use a phone as
the controller. Here we have renamed relay 1 as “YardLights” and those 10 characters are a
comfortable size on a vertical phone screen.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 16

dS3484
dS3484 User Manual v4.03
Relay automation
There are a set of control boxes that provide for autonomous relay operation. If you just want
to control the relays from the webpage or using one of the TCP/IP modes, then leave these
boxes blank.
Relay No. box
This selects the relay you wish to configure. There are 32 relays available. The first 4 relays
are the actual relays on the module. Relays 5-32 are virtual relays. They have no physical
presence but otherwise behave identically to the real ones. They can provide additional
processing and a larger control surface to your application.
Pulse/Follow box
If you place a number in this box then that is the pulse time for the relay in mS (1000mS = 1
second). The minimum value is 100mS. The maximum is 2147483647 (more than 24 days).
When the relay is toggled on, timing begins and at the end of the time period the relay goes
off again. If the button is pressed again during timing then the timing is restarted.
The above example will turn off the yard lights after 30 minutes. 1800000 mS is 1800 seconds.
1800 seconds is 30 minutes.
It also possible to insert a boolean equation into the box. Boolean equations are just simple
equations that evaluate to a 0 or 1.
For example Relay 1 is referred to a R1. Input1 is referred to as 1 ( igital 1). Analogue input
1 is referred to as A1.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 17

dS3484
dS3484 User Manual v4.03
Here's a very simple example:
Enter R2 into the Relay 1 Pulse/Follow box. This will make relay 1 copy whatever you do to
Relay 2. Try it!
Now change it to !R1.
The exclamation mark is read as “Not R1”. Now relay 1 will always be the opposite of relay 2.
Try it.
Boolean equations may be used for controlling relays and other objects such as email.
See the “Boolean equation” section later in this manual for full documentation.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 18

dS3484
dS3484 User Manual v4.03
Set Reset & Toggle boxes
When used, these three controls contain boolean equations. The “Set Relay” box will set the
relay when the boolean equation becomes true. The other two boxes reset and toggle the relay
when the boolean equation become true.
This is important! The Set, Reset and Toggle controls are transitory (edge triggered) controls.
The relays are only affected at the moment the boolean equation becomes true. This differs
from the Follow box where the relay continuously follows the output state of the equation.
In the previous example where we placed R2 in relay 1’s Follow control, relay one will always
be the same as relay 2. If relay 2 is off and we click relay 1 (YardLights) nothing will happen.
However if we want relay1 to be controlled by relay 2 as above, and also want to be able to
toggle it on/off from the webpage, we can put R2 in the “Set Relay” box and !R2 in the “Reset
Relay” box.
Try it.
Power-up restore
When checked, the relay is restored to the previous state it had when power was lost. If the
relay was on when power was lost or the module was turned off, then the relay will be turned
on when the module is powered up again.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 19

dS3484
dS3484 User Manual v4.03
Naming I/O's
The I/O Names tab is used to assign meaningful names to the I/O terminals.
As with relay names these may be up to 20 characters long, but do check it looks ok on a
mobile device or whatever you are using to control the module.
Connecting I/O to Virtual Relays
Any of the eight digital I/O lines may be connected to a virtual relay. This gives the digital
output the same automation capabilities as the relays. Enter the relay number in the link box
as shown above. Any relay may be selected for an I/O.
Copyright © 2016-2018, evantech Ltd.
All rights reserved. www.robot-electronics.co.uk 20
Other manuals for dS3484
1
Table of contents
Other Devantech Computer Hardware manuals