background image

 

dS2824

dS2824

 

  

                                                         User Manual v4.09

dS2824

dS2824

User Manual Version 4.09

Copyright 

© 2016-2021,

 Devantech Ltd.

All rights reserved.

www.robot-electronics.co.uk

1

Содержание dS2824

Страница 1: ...dS2824 dS2824 User Manual v4 09 dS2824 dS2824 User Manual Version 4 09 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 1 ...

Страница 2: ...encer 27 Sequencer commands 28 K Outputs 29 Sequencer Examples 29 Schedules 34 Counter Timers 36 The application page 39 Application page security 40 Accessing your webpage from the internet 41 Boolean equations 42 TCP IP command sets 44 ASCII command set 44 Binary command set 46 AES binary command set 49 Modbus commands 51 Function 01 0x01 Read Coils 51 Function 04 0x04 Read Input Registers 51 Fu...

Страница 3: ...mperature 57 Power relays 58 Analogue Digital flexible I O s 59 Connection examples 59 Temperatue sensor 60 Power supply input voltage 60 Analogue channels 60 Serial port connections 62 dS2824 dimensions 63 Notes 64 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 3 ...

Страница 4: ...ittent module not found error on firmware update V4 06 Added system reboot button to config status screen dScript updated to support dS2832 See dScript v4 xx manual V4 07 Added new features Ping Used to ping other machines to check if responding Sequencer Added a 120 step 12 output sequencer v4 08 Added display of MAC address to network configuration page Bugfix NTP Real time clock startup failed ...

Страница 5: ...mm Controlled graphically by secure webpage or optionally one of ASCII Binary or Modbus com mand 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 10 counts second Max Also available when optionally programming in dScri...

Страница 6: ... 12v 1 5Amp power supply such as this one http www robot electronics co uk universal 12vdc html The dS2824 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 ...

Страница 7: ...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 dS2824 index htm You should now see the application webpage and you can control r...

Страница 8: ...thernet 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 if you have a DHCP server on your network your router is normally the DHCP server then the dS2824 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...

Страница 9: ...our modules that are connected to your LAN DevantechModuleFinder jar If you do not have a DHCP server the dS2824 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 2021 Devantech Ltd All rights reserved www robot electronics co uk 9 ...

Страница 10: ...ers to change So with the USB ca ble 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...

Страница 11: ...e 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 The system reboot button should be used with caution If the module is at a remote site and you change the IP address you may not be able to reach it again Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 11 ...

Страница 12: ... 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 ...

Страница 13: ...xt 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 Phone App confiqures the module for control with our IO network 2 ap...

Страница 14: ...verted 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 num...

Страница 15: ...word protection enter a password into the Password box You can use any char acters 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 upper case lowercase numbers and symbols Accessing a special webpage _pw htm will install the password on your browser To do this make sure the Enable ...

Страница 16: ...e _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 ...

Страница 17: ... virtual relays they have no physi cal presence but otherwise behave the same as the real ones I O lines may be linked to vir tual 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...

Страница 18: ...low 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...

Страница 19: ...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 2021 Devantech Ltd All rights reserved www robot electronics co uk 19 ...

Страница 20: ...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 ...

Страница 21: ... for connecting to digital circuits 3 3v or 5v that supply the in put voltage The with pullup option turns on a weak pull up to 12v actually nearer 7 8v be cause of the input design This is useful for directly connecting volt free contacts such as relay contacts or switches They are connected between the pin P and ground 0v To use as inputs make sure the output drive is off or the NPN transistor w...

Страница 22: ...ut 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 When you have configured the I O wait for the Update Pending light to go out and press the reset button as new I O modes are set on power up Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 22 ...

Страница 23: ... wait for the Update Pending light to go out 5 seconds after last change and reboot the module Repeat Time This is how often the ping is repeated in seconds 10 sends a ping every 10 seconds Attempts The number of failed pings no response before failure is reported by setting the ping time to zero If set to 5 it will take 5 consecutive failed responses to trigger a failure If a response is received...

Страница 24: ...machine A relay can be used to reboot the target machine This may be by connecting to its reset input or even removing and restoring power The details of this are left to you In this example we are going to generate a reset pulse by pulsing Relay1 for 2 seconds when the ping time goes to zero To do this enter 2000 in the pulse follow box and P1 1 in the Set Relay box If you are going to reboot by ...

Страница 25: ... 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...

Страница 26: ...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...

Страница 27: ... line 01 it delays 1 second and turns on the K1 output Line 02 delays 1 second and turns off the K1 output Line 03 jumps back to line 1 and the cycle repeats forever The K1 K12 outputs may be used in boolean equations to control relays send emails etc Placing K1 in a relays Pulse Follow box will make the relay follow the K1 output in this case pulsing the relay on and off every two seconds Copyrig...

Страница 28: ...None of the following commands will update the K outputs If you specify anything in these check boxes they will be ignored The instructions are executed immediately with no delays J1 Jumps to the specified line C9 Calls the specified line The sequencer has a 4 deep call return stack The line following this one is pushed onto the stack and control transferred to the specified line X eXit Returns fr...

Страница 29: ... and perform one of two control sequences depend ing on the input We will need a loop to check the inputs and transfer to the appropriate se quence when active If D1 becomes active control transfers to line 10 If D2 becomes active control transfers to line 20 Otherwise they arrive at line 3 and jump back to line 1 The sequence will loop around these three lines until one of the digital inputs beco...

Страница 30: ...stop the traffic with Amber for 3 seconds followed by Red Again we hold both lights at Red for 30 sec onds before letting the other queue through at line 6 To watch it happen set relays 21 25 29 to K1 K2 K3 and set relays 24 28 32 to K4 k5 K6 Then look at the application page Adding a pedestrian crossing to the sequence Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co...

Страница 31: ...t to cross button Before changing our sequence code we need to provide a latching request signal because pedestrians expect to give the request but ton a brief push not hold it down Lets use relay 22 for the latched request D1 will set the re lay and K7 will clear it Enter D1 in relay 22 Set Relay box and as the relay will be reset by the sequencer enter K7 in the Reset Relay box Also enter K8 and...

Страница 32: ... a call to line 13 which is on page 2 This will keep the pedestrian routine on one page for easier reading Also remove all ticks from K1 K12 on these lines The Call instruction will ignore them anyway but it s good to keep things clear Enter the following on page 2 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 32 ...

Страница 33: ...2 and jumps to line 16 if active otherwise it continues with line 15 which just return to the caller on page 1 Line 16 turns the pedestrian signal to Green for 15 seconds and also clears the request signal Line 17 returns the pedestrian signal to Red and waits a further 5 seconds for pedestrians to complete the crossing Line 18 returns to the main sequence on page 1 Give it a try Copyright 2016 20...

Страница 34: ...to control the relay When high lighted 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 a...

Страница 35: ...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 auto mation field Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk...

Страница 36: ... 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...

Страница 37: ...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 ...

Страница 38: ...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 sched ule 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 tim...

Страница 39: ...changes The I O indicators show grey when the I O is inactive When an active input is applied they show green Red indicates an active output from the module The I O s are clickable just like the relay buttons to turn them on and off The first 4 of the 8 counters are shown together with their capture registers Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 39 ...

Страница 40: ...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...

Страница 41: ...use port 80 for the webpage How ever 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 t...

Страница 42: ...and the relay will 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 con nected to a temperature sensor and R2 controls a heater well you get the idea Analog com par...

Страница 43: ... 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...

Страница 44: ... 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 ASCII commands are all two character commands and are not case sensitive Type ST followed by the return key This is the STatus command You will see Cop...

Страница 45: ...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 12 bit analog value GC Counter Number GC 1 Get Counter 1 responds with count capture values Note on the dS2824 GI and GA are identical getting the digital state or analogue value de pending on the port configuration in the I O Ty...

Страница 46: ...Set Relay 7 byte 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 24 0x01 0x18 0x01 Turn relay on 0x00 for off This is ignored when following pulse time is 100 0x00 high byte Pulse time 0...

Страница 47: ... on The next four 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 Inpu...

Страница 48: ...d is used to update all relays with one command returning an ACK NACK byte ACK 0 NACK non zero If a bit is high 1 the corresponding relay will be turned on If a bit is low 0 the corresponding relay will be turned off This command therefore affects all relays The bit order is the same as the Get Relay command 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 ...

Страница 49: ...he C and Java applications are com plete and may be used or modified as you wish To prevent re play or Playback attacks the command packet includes a Nonce This takes the form of a 32 bit 4 byte random number in positions 12 13 14 15 of the 16 byte data packet For example when you send a Get Status command 0x30 you will get a 16 byte block returned The first 8 bytes 0 7 will be as defined for the ...

Страница 50: ...ponse 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 xx xx xx xx xx xx xx xx xx xx xx 0xF1 0xE2 0xD3 0xC4 Set Output 0x32 0x04 0x01 xx xx xx xx xx xx xx xx xx 0xF1 0xE2 0xD3 0xC4 Response 0x00 xx xx xx xx xx xx xx xx xx xx xx 0x5C 0x47 0x9B 0xED If the Nounce you send with the command does not ...

Страница 51: ...Counter1 high word 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 Cou...

Страница 52: ...es greater than 32 for functions 1 5 or greater than 8 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 con fig screen the module will assume this i...

Страница 53: ...cumentation 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 computer it contains both dScript source code examples and associated we...

Страница 54: ...Older versions will not work with the new application 6 Now look in the Module panel you should see v1 01 indicates it s the boot loader that is running 7 Load the project File Open project dScriptPublish 4 09 Examples app dS2824 v4 09 app dS2824 v4 09 dsj 8 Click the build button white triangle on green button This will update the system firmware and load the application 9 When done the new versi...

Страница 55: ...n the right panel is quickest Just below this is a commented out line 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 will continue to reset everything each time you powe...

Страница 56: ...dS2824 dS2824 User Manual v4 09 dS2824 hardware Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 56 ...

Страница 57: ...ion The Red LED lights when the module is in bootloader mode this is when the IDE is uploading system firmware to the module The Green LED lights the board begins running user programs All three LEDs are available and can be controlled as digitalports 33 35 digitalport LedBlue 33 digitalport LedGreen 34 digitalport LedRed 35 The FlashingLeds example provides a colourful display showing how to use ...

Страница 58: ...osed output and a normally open output The relay coil is powered by the 12vdc incom ing 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 dS2824 is here HF115FD datasheet Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 58 ...

Страница 59: ... eas ier just wire the switch between a pin P and ground 0v When the switch closes the input will become active Make sure you use the 1 option in the digital port declaration to enable the ports passive pull up 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 W...

Страница 60: ...proximate temperature in C Power supply input voltage A simple resistive divider on analogue channel 101 is used to measure the 12v input voltage analogport PSU 101 DC power voltage int32 Volts Volts PSU 18369 100000 calc input voltage This will give you volts 10 So 119 11 9v 120 is 12 0v Analogue channels 100 Temperature 101 Voltage Channels 1 8 are Flexport channels 12 bit resolution using 5v fr...

Страница 61: ...e modes and set by the option in the digitalport declaration in digital modes Q1 controls the open collector NPN output It is set by writing to the port D1 is the ports input It supplies the 12bit ADC in analogue modes and is read as 0 or 1 in digital modes Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 61 ...

Страница 62: ...ply can source up to 200mA Keep the leads short and away from high voltages RS485 serial port Referred to as serial port 3 in dScript The 12v power is not part of the RS485 speci fication 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 labeled on the PCB The two pin link near t...

Страница 63: ...dS2824 dS2824 User Manual v4 09 dS2824 dimensions Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 63 ...

Страница 64: ...dS2824 dS2824 User Manual v4 09 Notes Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 64 ...

Отзывы: