background image

 

dS3484  

dS3484  

 

  

                                                   User Manual v3.01

dS3484

dS3484

User Manual Version 3.01

Copyright 

© 2016-2018,

 Devantech Ltd.

All rights reserved.

www.robot-electronics.co.uk

1

Summary of Contents for dS3484

Page 1: ...dS3484 dS3484 User Manual v3 01 dS3484 dS3484 User Manual Version 3 01 Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 1 ...

Page 2: ...n 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 41 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 configura...

Page 3: ...84 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 UID 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 a...

Page 4: ...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 a...

Page 5: ... 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 s...

Page 6: ...ded 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 r...

Page 7: ...ly 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 DHCP server If you have a DHCP server on your network your router is normally the DHCP server then the dS3484 will get its IP address from that Log on to your router and navigate to the LAN client list Abov...

Page 8: ...our modules that are connected to your LAN DevantechModuleFinder jar If you do not have a DHCP 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 Devantech Ltd All rights reserved www robot electronics co uk 8 ...

Page 9: ...hers 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...

Page 10: ...stem 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 Devantech Ltd All rights reserved www robot electronics co uk 10 ...

Page 11: ...will go off again 5 seconds after you stop changing anything Choose an IP address for the module something outside of the DHCP settings on your router so it will not assign anything to that address The subnet mask Gateway and DNS 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 m...

Page 12: ...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 ...

Page 13: ...erted 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 numb...

Page 14: ... 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 Pend...

Page 15: ... 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 Devantech Ltd All rig...

Page 16: ...irtual 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 ...

Page 17: ...w 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 a...

Page 18: ...t 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 Devantech Ltd All rights reserved www robot electronics co uk 18 ...

Page 19: ...ate 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 ...

Page 20: ...e 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 Devantech Ltd All rights reserved www robot electro...

Page 21: ... trigger event The trigger event uses the same boolean equation solver as the relay automation So if you want to trigger an email when digital input 1 I O1 becomes active just enter D1 The email message is automatically filled in with useful information on the state of the relays I O s etc Boolean equations are used for controlling relays as well as triggering email notifications See the Boolean e...

Page 22: ...n equation See the Boolean equation section later in this manual for full documentation Target IP Port Relay No should be set to locate the target relay Target action determines how the relay will be controlled 0 No action this Peer to Peer event is disabled 1 Follow Me the relay will follow the input or the Boolean result of any equation here 2 Set Relay the relay will be set by this event You wi...

Page 23: ...ontrol the relay When highlighted in red the weekday is active There are two sets of Start and Stop times for each of the eight schedules The relay is set when the start time transitions from inactive to active ie at the start time and reset when the stop time is reached It is not held on or off It can be changed by other events including the webpage buttons The current time originates from an int...

Page 24: ...ay be checked if required It advances the time by 1 hour between the last Sunday in March and the last Sunday in October As well as controlling a relay directly schedules may also be used in the boolean equation fields of other controls A relay could be controlled by placing S1 for schedule 1 in its automation field Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk ...

Page 25: ... Each counter timer is capable of being a timer by entering T1 into its count input box T1 is an internal 1Hz timer that will advance the count once per second If and input is specified then any pulses on that input will be counted D4 will count pulses on input 4 Capture Input This is the event that will cause the current counter value to be stored in the capture register The capture register is d...

Page 26: ...We need to know the number of pules per hour coming in First we need a 1 hour time base we ll use counter timer 1 for this Using T1 for the count input will make the counter increment once per second There are 3600 seconds in 1 hour so we reset the counter when its greater than 3599 with C1 3599 The counter will count from 0 3599 Next we will use counter 2 to do the counting of input 2 pulses The ...

Page 27: ...eal time derived from a schedule The target relay is set to zero as we don t need to use any relays for this All week days are set so we perform the synchronization every day Start stop time 1 is used to activate the schedule at 1 second past midnight each day The second start stop time is disabled as both times are identical Go back to counter1 and add S1 to the reset input Now our time base time...

Page 28: ...ation page so you can quickly see the results of your configuration changes The I O indicators show grey when the I O is inactive Red indicates an active input output The I O s are clickable just like the relay buttons to turn them on and off Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 28 ...

Page 29: ...rved when the enable _pw htm checkbox is checked on the Webpage Security tab If the password field is left blank the application page will always be served to anyone Entering a password means the application page will only be served to a browser that has the matching password set Everyone else will just just be served a simple webpage saying You do not have permission to view this page To summariz...

Page 30: ...use port 80 for the webpage However its a good idea to use a different port number for our boards as this will avoid conflict with any web server you may have on your network Pick a number I ll choose 19321 as our port number Just make sure its different from any TCP IP port number you are using The HTML port is set on the Webpage Security tab After you have re loaded the program you can access th...

Page 31: ...ll follow the input Analog inputs and Counter values are compared with a number to obtain a true false boolean result In this example we will use analogue input 1 Then we can enter A1 1000 in the relay2 automation box This will turn on relay 2 when the input A1 falls below 1000 If A1 is connected to a temperature sensor and R2 controls a heater well you get the idea Analog comparisons use the less...

Page 32: ... some hysteresis To do that we will use R2 in its own equation A1 1000 R2 A1 1234 R2 Assume R2 in inactive off The 2nd half of the equation A1 1234 R2 will have no effect So when A1 falls below 1000 the relay comes on Now the 2nd half of the equation is true and will stay true until A1 climbs above 1234 So the relay becomes active when A1 is below 1000 and inactive above 1234 We have hysteresis Co...

Page 33: ...nary and Binary with AES256 encryption ASCII command set The ASCII command set allows you to type commands using a TCP IP terminal program such as PuTTY Use PuTTy in raw mode Make sure you have you module set to ASCII mode and after the update Pending indicator has gone out re booted the module so the changes take effect Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics c...

Page 34: ...SR 1 on 1000 Set Relay 1 on for 1 second SO Output number on off SO 1 on Set Output 1 on SO 1 off Set Output 1 off GR Relay number GR 1 Get relay 1 status responds with Active or Inactive GI Input number GI 1 Get Input 1 status responds with Active or Inactive GA Analog Input number GA 1 Get Analog input 1 responds with the 10 bit analog value GC Counter number GC 1 Get Counter 1 responds with cou...

Page 35: ...dS3484 dS3484 User Manual v3 01 Typical PuTTY session Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 35 ...

Page 36: ...te command returning 1 byte This command turns a relay on or off or pulses it for a time period and returns an ACK NACK byte ACK 0 NACK non zero actually the unknown relay number 0x31 The actual command the rest are parameters 0x02 Relay number Valid numbers are 1 8 0x01 0x08 0x01 Turn relay on 0x00 for off This is ignored when following pulse time is 100 0x00 high byte Pulse time 0x00 mid high Th...

Page 37: ...ur bytes pack the states of all 32 relays virtual and actual relays Bit 7 of byte 2 is relay 32 through to bit 0 of byte 5 which is relay 1 Byte 2 Byte 3 Byte 4 Byte 5 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 If the bit is set the relay is on off otherwise 0x34 0x01 Get Input 2 byte comman...

Page 38: ...e as the Binary commands described above The only difference is that they are AES encrypted and always 16 bytes in length The first bytes are the same as described in the Binary command set The last 4 bytes is the Nonce a random number and the bytes in the middle are undefined The module will decrypt the command generate the response and encrypt it before returning it to you Your program that cont...

Page 39: ... 11 12 13 14 15 Get Status 0x30 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx Response 0x1E 0x02 0x12 0x01 0x02 0x7D 0x01 0x0B xx xx xx xx 0x89 0xAB 0xCD 0xEF Set Relay 0x31 0x02 0x01 0x00 0x00 0x00 0x00 xx xx xx xx xx 0x89 0xAB 0xCD 0xEF Response 0x00 xx xx xx xx xx xx xx xx xx xx xx 0x1A 0x2B 0x3C 0x4D Set Relay 0x31 0x03 0x01 0x00 0x00 0x00 0x00 xx xx xx xx xx 0x1A 0x2B 0x3C 0x4D Response 0x00 x...

Page 40: ...d Register 10 Counter1 low word Register 11 Counter2 high word Register 12 Counter2 low word Register 13 Counter3 high word Register 14 Counter3 low word Register 15 Counter4 high word Register 16 Counter4 low word Register 17 Counter5 high word Register 18 Counter5 low word Register 19 Counter6 high word Register 20 Counter6 low word Register 21 Counter7 high word Register 22 Counter7 low word Re...

Page 41: ...requested Addresses greater than 15 for functions 1 5 or greater than 7 for function 4 will generate this error Error code 3 This error is returned if an illegal data value is received Number of points zero will generate this as will an illegal data value for function 5 Modbus Gateway If the Modbus TCP IP frame has a UID that does not match the one you set in the TCP IP config screen the module wi...

Page 42: ...der will be five folders Installation USBdriver Examples Documentation Utilities Go to the Installation directory and click setup to install the dScript IDE if you have already installed a previous version you will need to uninstall it before installing the new one The USBdriver folder contains the USB com port driver for the modules Copy the Examples directory to a convenient location on your com...

Page 43: ...l you should see v1 1 indicates it s the boot loader that is running 7 Click the file open button or File Open and load dScriptPublish Examples app dS3484 v3 01 app dS3484 v3 01 dsj 8 Make sure the webpage folder is correctly set Substitute the path for where you placed the dScriptPublish folder Click the blue world button if you need to search for the folder 9 Click the build button white triangl...

Page 44: ...ange Locate the label main click the word in the right panel is quickest Just below this is a commented out line gosub init Uncomment this by removing the semicolon Now upload the application and it will reset the IP address along with all other variables Confirm the board is operating but don t change anything yet You need to replace the semicolon and upload the application again otherwise it wil...

Page 45: ...input from relay or switch contacts etc 4 analogue inputs 0 3 3v level 2 serial ports 3 3v level and an RS485 serial port The module is powered from a 12vdc supply which can be regulated or unregulated The relays are SPCO Single Pole Change Over types The normally open normally closed and common pins are all available on the screw terminals Copyright 2016 2018 Devantech Ltd All rights reserved www...

Page 46: ... The Green LED lights the board begins running user programs The three user LEDs are available and can be controlled as digitalports 32 34 digitalport LedBlue 33 digitalport LedGreen 34 digitalport LedRed 35 The FlashingLeds example provides a colourful display showing how to use them Power supply The dS3484 requires a 12v DC supply capable of supplying a minimum of 1A This is most easily provided...

Page 47: ...osed output and a normally open output The relay coil is powered by the 12vdc incoming supply on user command Coil C Relay in passive state NC NO Coil C Relay in powered state NC NO A full datasheet for the relays used on the dS3484 is here HF115FD datasheet Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 47 ...

Page 48: ... a high voltage comes out It means that the output has been activated That could result in the output sinking or sourcing current depending on its type The outputs will sink current up to 100mA max when active The same principle applies to the inputs these are designed to allow you to directly connect a VFC Volt Free Contact This could be from other relay contacts thermostat contacts alarm contact...

Page 49: ... active Example output connect a relay You can connect your own 12V relays the first coil pin of the relay is wired to the 12V supply terminals on the board the other is wired to the output pin P When the output pin becomes active it is driven down to 0V ground the relay will have 12V across the terminals and switch so COM is connected to NO Copyright 2016 2018 Devantech Ltd All rights reserved ww...

Page 50: ...t will read around 0 when nothing is connected 5V inputs can be used although the 3 3V to 5V region will merely read full scale Examples Example input connecting a potentiometer Connecting a potentiometer should be the simplest of tasks either end of the pot should be wired to the 5v and 0v respectively the output pin of the pot is then wired into the analogue A pin Please note the reading from th...

Page 51: ...dS3484 dS3484 User Manual v3 01 Representative Analogue Schematic Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 51 ...

Page 52: ...ules That is the reason 5v rather than 3 3v is available on pin1 to power external modules RS485 serial port The 12v power is not part of the RS485 specification it is there to provide convenient power for any 12v sensors you may wish to connect such as our SRF485 ultrasonic rangers Connections for the RS485 port are also clearly labelled on the PCB The two pin link near to the RS485 terminal bloc...

Page 53: ...dS3484 dS3484 User Manual v3 01 dS3484 dimensions Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 53 ...

Page 54: ...dS3484 dS3484 User Manual v3 01 Notes Copyright 2016 2018 Devantech Ltd All rights reserved www robot electronics co uk 54 ...

Reviews: