background image

 

tcp184

tcp184

  

  

 

  

                                                       User Manual v4.10

Schedules

The scheduler can schedule regular events. These can be once or twice daily with the two start

and stop times and can happen on any selected weekdays.

The Schedule No. is one of eight schedules that can be set up. 

The target relay is the local relay that you want this schedule to control. 

W/Days selects the days of the week you want this schedule 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 an internet time server. It is read only and cannot be 
changed. Therefore you must have an internet connection for the scheduler to operate cor-

rectly.

Copyright 

© 2016-2021,

 Devantech Ltd.

All rights reserved.

www.robot-electronics.co.uk

33

Summary of Contents for tcp184

Page 1: ...tcp184 tcp184 User Manual v4 10 tcp184 tcp184 User Manual Version 4 10 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 1 ...

Page 2: ...eer to Peer 25 Sequencer 26 Sequencer commands 27 K Outputs 28 Sequencer Examples 28 Schedules 33 Counter Timers 35 The application page 38 Application page security 38 Accessing your webpage from the internet 39 Boolean equations 40 TCP IP command sets 42 ASCII command set 42 Binary command set 44 AES binary command set 47 Modbus commands 49 Function 01 0x01 Read Coils 49 Function 04 0x04 Read In...

Page 3: ...old configuration settings 53 tcp184 PCB 54 LED indication 55 Power supply 55 Operating temperature 55 Power relays 56 Analogue Digital flexible I O s 57 RS485 Serial Port Connection 58 Notes 59 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 3 ...

Page 4: ...t 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 under some circumstances Renamed command counters to setcounters V4 09 Ad...

Page 5: ... Module size 170mm x 104mm DIN rail mounted 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 Up to 2KHz counting on all inpu...

Page 6: ... with or without pull up resistors The tcp184 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 with optional AES encryption Modbus Functions 1 4 5 and 15 supported And if you should wish to modify the supplied firmware ...

Page 7: ...he 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 Win10 PC open your browser and into the address bar not the search bar type http tcp184 index htm You should now see the application webpage and you can control relays and vi...

Page 8: ...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 tcp184 will get its IP address from that Log on to your router and navigate to the LAN client list Abov...

Page 9: ...our modules that are connected to your LAN DevantechModuleFinder jar If you do not have a DHCP server the tcp184 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 ...

Page 10: ...n the RUN position the _config pages are not accessible This is a 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 link in the RUN position 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...

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

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

Page 13: ...e 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 _pw htm box is checked When the Update Pending light goes out re boot the module and go to yourIP _pw htm You will see something like this The password is now loaded on your browser Do the same for any furth...

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

Page 15: ...t 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 a test applications written in C and Java to demonstrate AES encryption Phone App confiqures the module for control with our IO network 2 a...

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

Page 17: ...n the application page 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 about the limit on a vertical phone screen Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 17 ...

Page 18: ...ow 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 ...

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

Page 20: ... 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 but 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 ...

Page 21: ...v or 5v that supply the input voltage The with pull up option turns on a weak pull up to 5v 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 The analogue mode converts the input voltage to a digital number in the range 0 4095 12 bit conversion The input voltage range is selectable between 0 4 096v Ref4 o...

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

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

Page 24: ...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 equation section...

Page 25: ...an 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 w...

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

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

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

Page 29: ...or 60 seconds We then 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 Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 29 ...

Page 30: ...al input for the request 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 Rela...

Page 31: ... 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 Line 13 is the 30 second delay where we hold all lights at Red These are the two delays from Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 31 ...

Page 32: ...ontinues 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 2021 Devantech Ltd All rights reserved www robot ...

Page 33: ...hen 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 an internet time server...

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

Page 35: ...nto 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 at up to 20Hz HSC4 will count at up to 2KHz Make sure the input is correctly configured in the Input output tab Note that HSC4 directs the system to use the high speed counter HSC4 cannot be part of a...

Page 36: ...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 37: ...l 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 Now go back to counter1 and add S1 to the reset input Now our time base t...

Page 38: ...d Instead you will be served a page saying You do not have permission to view this page The _pw htm page which contains the javascript that loads the password into your browser will only be served 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 39: ...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...

Page 40: ...ue to obtain a true false boolean result In this example we have set I O8 to be an analogue input with a 5v reference 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 than and greater than symbols only There is ...

Page 41: ... 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 42: ... 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...

Page 43: ...nput 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 Counter1 responds with count capture values Note on the tcp184 GI and GA are identical getting the digital state or analogue value de pending on the port configuration in the I O Types tab Typical PuTTY session Copyrigh...

Page 44: ...al 0x31 0x02 0x01 0x00 0x00 0x00 0x00 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 8 0x01 0x08 0x01 Turn relay on 0x00 for off This is ignored when following pulse ti...

Page 45: ...e the second byte packs the states of all 7 inputs Bit 7 is unused Bit 6 is input 7 through to bit 0 which is input 1 If the bit is high the input is active Byte 2 Bit No 7 6 5 4 3 2 1 0 Input x 7 6 5 4 3 2 1 0x35 Get Analogue inputs 1 byte command returning 14 bytes This returns all 7 possible analogue inputs 14 bytes are returned 2 for each analogue input Byte 1 byte 2 for example 0x02 0x3E comb...

Page 46: ...18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0x38 0xnn 0xnn 0xnn 0xnn Set selected relays 5 byte command returning 1 byte Set only those relays with a corresponding high in the bit pattern returning an ACK NACK byte ACK 0 NACK non zero Same bit order as command 0x37 above Relays with a corresponding low 0 are NOT affected and remain on off as previously set 0x39 0xnn 0xnn 0xnn 0xnn Clear selected ...

Page 47: ...Java and Python The 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...

Page 48: ... 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 xx xx xx xx xx xx xx xx xx xx xx 0xF1 0xE2 0xD3 0xC4 If the Nounce you send with the command does not match the last one sent to you then the Relay or Output will not be changed ...

Page 49: ... values Register 9 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 w...

Page 50: ...ror 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 is for another Modbus module connected to the RS485 port It will use the UID as the Module address...

Page 51: ...mentation 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 web ...

Page 52: ... Older versions will not work with the new application 7 Now look in the Module panel you should see v1 01 indicates it s the boot loader that is running 8 Load the project File Open project dScriptPublish 4 10 Examples app tcp184 v4 10 app tcp184 v4 10 dsj 9 Click the build button white triangle on green button This will update the system firmware and load the application 10 When done the new ver...

Page 53: ... in 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 po...

Page 54: ...tcp184 tcp184 User Manual v4 10 tcp184 PCB Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 54 ...

Page 55: ...d Red are available for status indica tion The Red LED lights when the module is in bootloader mode this is when the IDE is up loading system firmware to the module The Green LED lights the board begins running user programs The Blue LED flashes 3 times on power up to indicate that the default app is run ning All three LEDs are available and can be controlled as digitalports 33 35 digitalport LedB...

Page 56: ...lly closed output and a normally open output A full datasheet for the relays used on the tcp184 is here HF115FD datasheet The representative relay circuit used on the tcp184 showing the snubber components between the Normally Open NO and Common contacts Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 56 ...

Page 57: ...put without no pull up resistor suitable for driving with a 0 5v signal 3 Analogue input using a 4 096v reference 12 bit 4 Analogue input using a 5v reference 12 bit 5 High speed counter up to 2000 counts second Representative input circuit The transistor is used to turn on off the 10k pull up resistor Another 10k resistor and 10n capacitor provides an input filter Copyright 2016 2021 Devantech Lt...

Page 58: ...t app to provide a Modbus Gateway When programming in dScript it is freely available for your own purpose A two pin link near to the RS485 terminal block should be shorted to use the on board 120 ohm terminating resistor Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 58 ...

Page 59: ...tcp184 tcp184 User Manual v4 10 Notes Copyright 2016 2021 Devantech Ltd All rights reserved www robot electronics co uk 59 ...

Reviews: