background image

Revision 1.1

WebSwitch™ Users Manual

A Simple LAN connected to the Internet

The LAN in the example above can be connected to the Internet by adding a router and an Internet 
connection. The router has two network connections. It has an Ethernet network connection that 
connects to the LAN, and it has another connection that connects to the Internet (this is called the WAN 
or Wide Area Network connection). Each network connection on the router has an IP address. In our 
example, the IP address on the LAN side of the router has an address of 192.168.1.1. The IP address 
on the WAN side of the router has an IP address that has been assigned by the Internet Service 
Provider such as 266.70.164.97 (note that this is not a valid IP address because each number cannot be 
larger than 255, but it is used in this example for illustration purposes only).

In the example, when a user on the computer needs to access a server on the Internet, the computer 
sends the request to the router at 192.168.1.1. The router sends the request to the server on the 
Internet. The server does not send the response directly to the computer on the LAN, but to the router at 
the IP address of 266.70.164.97. The router then forwards the response to the computer. This way, all 
devices on the LAN share a single public IP address. This is called Network Address Translation.

Port Forwarding

The network can be configured to allow outside access to WebSwitch™ and the WebRelay™. All 
requests to any device on the network use the public IP address ( 266.70.164.97). With only a single IP 
address, TCP ports are used to identify the specific devices the incoming message should be sent to. 

Xytronix Research & Design, Inc.

87

Figure Appendix C.1- Local Area Network

Figure Appendix C.2 - LAN connected to the Internet

Содержание WebSwitch XRDI-WS3

Страница 1: ...Switch a division of Xytronix Research Design Inc North Logan Utah USA 2012 Xytronix Research and Design Inc Users Manual Revision 1 1 Covers XRDI WS3 XRDI WS3P...

Страница 2: ...nection 2 2 2 Outlet Connection 2 2 3 Network Connection 2 2 4 Terminal Connector 2 3 Establishing Communications for Setup 2 3 1 Option 1 Assign a temporary IP address to WebSwitch 2 3 2 Option 2 Ass...

Страница 3: ...3 3 4 4 Write Single Coil Modbus Function Code 05 0x05 3 4 5 Write Multiple Coils Modbus Function Code 15 0x0F 3 4 6 Write Multiple Registers Modbus Function Code 16 0x10 3 5 Email Notification 3 5 1...

Страница 4: ...the purchaser of this product Xytronix Research Design Inc assumes no responsibility for any errors that may appear in this document Whereas reasonable effort has been made to make the information in...

Страница 5: ...e foregoing warranty shall not apply to defects or damage resulting from improper use or misuse unauthorized repair tampering modification improper connection or operation outside the electrical envir...

Страница 6: ...ons may cause interference to radio communications There is no guarantee however that interference will not occur in a particular installation If this equipment does cause harmful interference to radi...

Страница 7: ...me security precautions that should be observed If WebSwitch is installed on the Internet it is recommended that passwords be enabled for the Control Page Make sure secure passwords are used Passwords...

Страница 8: ...e required Automatic Reboot mode can be used to reboot devices when they fail to respond to PING requests Built in web server provides direct access to the device no external servers services or subsc...

Страница 9: ...ith DHCP Note WebSwitch Plus sends out email messages only Most wireless carriers provide free services to convert email messages to text messages 1 2 Applications WebSwitch can be used with servers c...

Страница 10: ...iscrete inputs event scheduling logging and additional relay contact protection 1 3 1 Optional Accessories Accessory Description Part Number Temperature Sensor Digital temperature sensor with 12 inch...

Страница 11: ...the front panel One LED is labeled Power and is illuminated green when the module is powered Two LEDs are labeled Out 1 and Out 2 These are illuminated when the associated outlet is powered The other...

Страница 12: ...or applications that require a quick simple solution that does not need to be accessible to more than a few people This configuration is simple to setup simple to use and can be accessed from any comp...

Страница 13: ...installations where ambient air temperature is expected to be high To mount WebSwitch to a wall use two 8 screws Attach the screws to the wall horizontally spaced 6 3 8 inches 162 mm apart The head o...

Страница 14: ...Input of WebSwitch to a power source 120 240V AC 2 2 2 Outlet Connection Connect one or both of the outlets on WebSwitch using the IEC 320 C13 Female Connectors to the device s to be controlled WARNIN...

Страница 15: ...straight through cable should be used WebSwitch can be used indirectly on a wireless network This is done by using a wireless Ethernet bridge or a wireless router The network connection of WebSwitch...

Страница 16: ...below IMPORTANT MAKE SURE WIRES ARE PROPERLY ATTACHED TO THE TERMINALS AND THAT THE TERMINALS ARE TIGHT 5 pin connector pinout for XRDI WS3P Only Pin Description Data Temperature Humidity Data This is...

Страница 17: ...of the outlets is needed switches can be connected to the inputs and the unit can be configured such that they control the outlets Connect one terminal of sensor or switch to the input terminal Input...

Страница 18: ...to the unit or they can be daisy chained as shown in Figure 2 2g Many factors will determine the maximum length of cable used to connect sensors to WebSwitch Plus Some of these factors include but are...

Страница 19: ...handling Avoid sensor runs adjacent to industrial equipment power cables These cables have high current spikes that may induce noise on the sensor signals Similarly avoid running sensor cables near a...

Страница 20: ...e power is lost and restored WebSwitch will use the IP address assigned in the setup page and not the temporary address assigned here This means that once communications are established the desired IP...

Страница 21: ...xx Serial number format is ss ss ss ss ss ss For example to set a WebSwitch with serial number 00 0C C8 01 00 01 to 10 10 10 40 the following command would be used sudo arp s 10 10 10 40 00 0c c8 01 0...

Страница 22: ...art menu and then clicking on Control Panel Figure 2 3a Note The control panel shown Figure 2 3b is in Classic View If the control panel is in Category View select the Classic View option before proce...

Страница 23: ...ections The window shown below will pop up Note To access the Network Connections folder in Windows Vista select the Windows Icon Start Menu and enter ncpa cpl into the search bar and press Enter Xytr...

Страница 24: ...om of the menu labeled Properties The Local Area Connection Properties window will appear Scroll down to and highlight Internet Protocol TCP IP then click the button labeled Properties Step 4 The foll...

Страница 25: ...the values need to be recorded then re entered once the IP address of WebSwitch is successfully changed 2 3 3 Open Configuration Web Page Once the network is set up open the setup page as described i...

Страница 26: ...is admin and the default password is webswitch password is case sensitive 2 4 1 Main Tab This is the initial page that is displayed when setup html is entered into the address bar of the browser It di...

Страница 27: ...rs Manual Firmware Revision This is the current product revision of the unit s firmware Serial Number This is the serial number of this unit The serial number is also the MAC address of the unit Xytro...

Страница 28: ...ess at the same time It may be necessary to clear the arp cache each time you swap ControlByWeb products on the network this is because each unit has the same default IP address but a different MAC ad...

Страница 29: ...must know the IP address of the server If a server gets its IP address dynamically the IP address may not always be the same so client devices may not be able to find the server For this reason server...

Страница 30: ...ult setting for this field is 10Mbps Mode This option allows the Ethernet port to be set to Half Duplex or Full Duplex Legacy Ethernet operates in Half Duplex mode which means that devices can either...

Страница 31: ...te that although WebSwitch will send email messages with any email address specified in this field some email filters spam filters will not allow messages through that include an invalid email address...

Страница 32: ...s interoperability with software and devices from other manufacturers This is enabled by selecting Yes in this field The default setting for this field is No Note Modbus communications are disabled wh...

Страница 33: ...n enables or disables Remote Services If Yes is selected Remote Services will be enabled as soon as the submit button is pressed and WebSwitch will immediately attempt to make a connection with the re...

Страница 34: ...SNMP manager The default setting for this field is 192 168 1 25 SNMP Port When SNMP is used this field is used to specify the SNMP port that WebSwitch listens on The default setting for this field is...

Страница 35: ...on the internet address 10 143 100 32 IP Filter Range 1 192 168 1 0 192 168 1 255 IP Filter Range 2 10 143 100 32 10 143 100 32 Note The address specified for the Remote Services server if applicable...

Страница 36: ...switch also all lower case Re enter Setup Password When the setup password is changed it must be entered twice One time in the previous field and a second time in this field If the password is not ent...

Страница 37: ...sers require that a user name be entered In this instance enter none as the user name The default control password is webswitch Re enter Control Password When the control password is changed it must b...

Страница 38: ...p down list offers two options for setting the time Manually or Sync with NTP server Note The options that follow this field will change based upon how this option is set Manually is selected when the...

Страница 39: ...ate Time 24 Hour Format Enter the time as HH MM SS HH represents hours in 24 hour format 00 23 MM represents minutes 00 59 SS represents seconds 00 59 The following parameters 5 8 are available when S...

Страница 40: ...MT It is common for many servers and data loggers to use GMT as their official time even when they are not located within the GMT time zone The default value for this field is 7 Mountain Standard Time...

Страница 41: ...By default this is set to the 2nd Sunday in March which is the date used in the United States Daylight Savings End This is the date that daylight savings will end Note that on this date at 12 02 AM 00...

Страница 42: ...ed logging are supported The logged data is stored in internal non volatile memory and can be retrieved by entering the command http WebSwitch IP address log txt WebSwitch can be configured to log on...

Страница 43: ...ure humidity measured by a sensor changes by the amount specified in this field This can be set from 1 0 to 24 0 degrees in 0 1 increments The default setting for this field is 2 0 degrees Logging Con...

Страница 44: ...those XML requests will not be shown in the log Likewise by selecting Writes any log created by changing the state of the relay will not be shown in the log file Default selection is None Note When XM...

Страница 45: ...ion 1 1 WebSwitch Users Manual 2 4 7 Outlets Tab This page provides configuration options for the two outlets Xytronix Research Design Inc 44 Figure 2 4h Outlets Tab Normal Mode Automatic Reboot set t...

Страница 46: ...o the left of the corresponding outlet status on the Control Page and in the email message when email alerts are enabled Up to 24 characters may be entered in this field The default text is Outlet On...

Страница 47: ...esses the message will be sent Email addresses specified on the Network setup tab will be displayed next to each check box By default no boxes are checked Remote Service SNMP When this box Send State...

Страница 48: ...ill change states When the input is open the outlet will remain in its current state toggle outlet when input 1 off When the input is open the outlet will change states When the input is tied to groun...

Страница 49: ...Revision 1 1 WebSwitch Users Manual The following parameters are available only when Automatic Reboot is On Xytronix Research Design Inc 48 Figure 2 4i Outlets Tab Automatic Reboot On...

Страница 50: ...tch to determine in less time that the device is not functioning After each unsuccessful ping WebSwitch will wait this time interval in seconds before the next ping attempt This time can be set from 1...

Страница 51: ...rol inputs Description This text field is used to describe the function of the selected input The text appears to the left of the corresponding input status on the Control Page and in email messages w...

Страница 52: ...nt due to input changes Send Email when input on Email notifications will be sent when input state changes to on Send Email when input off Email notifications will be sent when input state changes to...

Страница 53: ...below are the same for each sensor Sensor Description The text in this field appears to the left of the corresponding temperature humidity reading on the Control Page This text also appears in the ema...

Страница 54: ...High and Low radio buttons indicate whether the alarm is triggered as a high or low alarm A high alarm is triggered when the sensor reading exceeds the alarm value and a low alarm is occurs when the...

Страница 55: ...Alarm 2 or when Normal conditions are regained Use Email Address If email messages are to be sent out based on alarm conditions these check boxes specify to which email addresses the message will be s...

Страница 56: ...listed here Period The duration of the event Count The number of times the event will occur Outlet Which of the two outlets if any will be affected by the event Outlet Action If either of the two out...

Страница 57: ...tered by first selecting the correct month and year by using the left and right arrows at the top of the calender The single arrows and change the month and the double arrows and change the year Once...

Страница 58: ...outlet s specified in the Affected Outlet s field to operate as follows Outlet State at Power up Pulse Reboot Outlet Action On Outlet will Pulse Off when event occurs and then turn on after the Pulse...

Страница 59: ...Var0 This option clears extvar0 sets it to 0 when the event occurs See description of set extVar0 for more information Affected Outlet s This drop down menu is used to specify which of the outlets tur...

Страница 60: ...e is 2K bytes Notes on writing a basic program for WebSwitch Plus can be found in Appendix G Basic Scripts BASIC Script This field displays the txt file that is uploaded to WebSwitch Plus Text display...

Страница 61: ...xternal Variables are variables that can be used in BASIC scripts They are called External Variables because their values can be changed externally to the BASIC script using xml requests or through th...

Страница 62: ...on 2 Label This text field is used to describe the function of button 2 of the selected extVar The text also appears to the right of the corresponding extVar status Up to 15 characters may be entered...

Страница 63: ...When set to No the web page will need to be manually refreshed to show the current status of the unit in the control page Refresh Rate When the Auto Refresh Page option is set to Yes this field specif...

Страница 64: ...Operation Once WebSwitch is set up users can access the Control Page using a web browser by typing the IP address of WebSwitch into the web browser address bar For example using the default IP addres...

Страница 65: ...n the Outlets tab Input 1 and 2 Model XRDI WS3P only These rows display the current state of the two inputs Each row can be displayed as shown or not displayed by checking or unchecking the appropriat...

Страница 66: ...the following XML page datavalues relay1state 0 relay1state relay2state 0 relay2state reboot1state 0 reboot1state reboot2state 0 reboot2state failures1 0 failures1 failures2 0 failures2 rbtAttempts1 0...

Страница 67: ...h time 1253030401 Time displayed in epoch time number of seconds since January 1 1970 X is replaced by the Outlet number Input number Sensor number or extvar number XML Control Commands can be sent to...

Страница 68: ...second pulse to outlet 1 you would issue the following commands Command Description state xml relay1State 2 This will pulse Outlet 1 for the preset time 1 5 seconds state xml relay1State 2 pulseTime1...

Страница 69: ...est is sent from another application and not a browser the html request will need to contain the password encoded using the base 64 encoding scheme The html request header without the password looks l...

Страница 70: ...e X in the tag represents the event number 0 49 active This field indicates whether or not the event is active The text yes indicates that the event is active and the event will occur at the next even...

Страница 71: ...Outlet will turn off when event occurs Pulse Outlet will pulse when event occurs Toggle Outlet will toggle state when event occurs pulseDuration When the event causes the outlet to pulse this field i...

Страница 72: ...ys There is an internal capacitor that can power the real time clock for an extended period of time even if the main power is lost If the real time clock loses power the time will have to be reset By...

Страница 73: ...er of times the event will occur 0 continuous 0 Outlet Number 0 Outlet 1 1 Outlet 2 2 Both Outlets 4 Outlet Action 0 No Action 1 Turn outlet on 2 Turn outlet off 3 Pulse outlet 4 Toggle outlet 5 Disab...

Страница 74: ...the Modbus function code memory type and an address The second sometimes called PLC addressing requires the address only Under PLC addressing the function code memory type is a given based on the PLC...

Страница 75: ...function 05 Addr 1 Addr 1 Read Discrete Inputs function 02 Addr 1001 Addr 10001 Read Holding Registers function 03 Addr 4001 Addr 40001 For example to read the state of Outlet 1 coil 1 the Modbus func...

Страница 76: ...ead the inputs only you may read 0x0002 bits and use the starting address of 0x0002 On the other hand you may want to read the second outlet state only This can be achieved by starting at address 0x00...

Страница 77: ...x08 11000 High Low Off Off 0x09 11001 High Low Off On 0x0A 11010 High Low On Off 0x0B 11011 High Low On On 0x0C 11100 High High Off Off 0x0D 11101 High High Off On 0x0E 11110 High High On Off 0x0F 111...

Страница 78: ...01 and using a quantity of 0x0001 Request Modbus TCP Transaction identifier 2 Bytes 0x0001 Protocol identifier 2 Bytes 0x0000 Length 2 Bytes 0x0006 Unit identifier 1 Byte 0xff Modbus Function code 1 B...

Страница 79: ...ption code 1 Byte 0x01 or 0x02 Exception Codes 0x01 Function code not supported 0x02 Incorrect starting address quantity of outlets combination Character String Example char read_inputs_mb_response 0x...

Страница 80: ...ficant word being sent first In other words the 32 bit floating point number represented as 1234 ABCD is sent as ABCD 1234 For example if we were to read two registers starting at address 0x110 and se...

Страница 81: ...g Example char write_coil_mb_request 0x00 0x01 0x00 0x00 0x00 0x06 0xff 0x05 0x00 0x00 0xff 0x00 Response Modbus TCP Transaction identifier 2 Bytes 0x0001 Protocol identifier 2 Bytes 0x0000 Length 2 B...

Страница 82: ...e first line displayed in the body of the message shows what triggered the message The text Trigger will always appear and cannot be changed The remaining text includes the Trigger the current state o...

Страница 83: ...for information about BASIC scripts or can be explicitly defined for each outlet input and sensor under Outlets Inputs and Sensors tabs For each outlet input and sensor trigger the Email Option field...

Страница 84: ...s a toothpick through the small hole in the back of the unit to press the small button located inside the unit When the object is inserted a tactile feel can be detected as the button is pressed While...

Страница 85: ...on on the web site Note that only a WebSwitch image can be installed on WebSwitch so make sure the correct image is being downloaded Copy this image to the same directory as the cbwProgrammer utility...

Страница 86: ...d While holding the reset button press the Upload Firmware button at the bottom of the ControlByWeb Programmer window e After the programming process begins the reset button can be released Step 8 Wai...

Страница 87: ...ess Every device that is directly connected to the Internet uses a public IP address Public IP addresses are addresses described in the paragraph above that identify a specific device on the Internet...

Страница 88: ...t it is used in this example for illustration purposes only In the example when a user on the computer needs to access a server on the Internet the computer sends the request to the router at 192 168...

Страница 89: ...uld be associated with port 8001 By doing this WebSwitch can be accessed from the Internet by entering the public IP address of the router plus the port number assigned to WebSwitch in the URL window...

Страница 90: ...ollowing command would be used http 192 168 1 25 8000 setup html To access the ControlByWeb units from the Internet enter the public IP address of the router plus the port number of the desired device...

Страница 91: ...ge that shows the entire system In addition the use of an external web server allows programmers to create custom user interfaces that take advantage of the additional resources typically available on...

Страница 92: ...ch can be configured to establish a connection when triggered by an event such as an Outlet state changing This is done by setting the Remote Service SNMP checkbox in the setup tabs When an event occu...

Страница 93: ...le from WebSwitch For example using the default IP address the following command would be used to request the log file http 192 168 1 2 log txt File format MM DD YYYY HH MM SS Outlet 1 Outlet 2 Input...

Страница 94: ...ame Email was not sent due to an incorrect user name Bad Password Email was not sent due to an incorrect password Authentication Required A user name and password are required by the mail server No Re...

Страница 95: ...nd would be used http 192 168 1 2 syslog txt If the TCP port has been changed not port 80 the port will be required to read the file For example using the default IP address and port 8000 the log file...

Страница 96: ...found in MIB for network management of TCP IP based internets The MIB for these objects usually come with SNMP manager software If it does not an internet search for RFC1213 MIB will turn up multiple...

Страница 97: ...1 ON 2 PULSE TRAPS WebSwitch also has the capability to send information to the SNMP manager as a result of alarm conditions through the use of TRAPS The following TRAPS are supported Sensors Model XR...

Страница 98: ...d in automatic reboot mode They are configured on the Outlets tab These traps will always send a 0 indicating that the outlet has been turned off Object Description Value webswitch 115 Outlet one rebo...

Страница 99: ...e within the script contains a single statement Line numbers are not used Statements are not case sensitive however variables are IF THEN FOR loops and DO loops can only be nested up to 5 times per co...

Страница 100: ...must always be followed with an END IF statement The format is IF variable expression THEN Function 1 ELSE Function 2 END IF Note In most BASIC interpreters Function 1 see above may be placed after t...

Страница 101: ...ge is only sent to the email addresses specified in the appropriate relay setup page under the Outlets tab EMAIL relay1 The third option EMAIL inputX where X represents the input number 1 or 2 sends a...

Страница 102: ...ned within quotation marks Note that the PRINT statement is only available for the PC version of the BASIC interpreter The device will not recognize the command The format is PRINT variable outlet var...

Страница 103: ...n outlet on 2 pulse outlet and 5 toggle outlet Note that the pulse time is specified in the Outlets setup tab Internal relays are designated as relay1 and relay2 which correspond to Outlet1 and Outlet...

Страница 104: ...date and time and can only be read They can then be used to compare the event date and times The following example demonstrates defining the event variables and comparing it to the current date and ti...

Страница 105: ...bsite for the use of testing and debugging The device will only acknowledge errors as it runs This means that if a path of the script is not encountered errors may still exist The Windows version of t...

Страница 106: ...s connect to dry contacts Maximum Input Voltage 5 VDC Minimum Hold Time 20ms Temperature Sensors Model XRDI WS3P only 1 Wire Digital Thermometer Dallas Semiconductor part DS18B20 Temperature Range 20...

Страница 107: ...e lost when power is disconnected Physical Operating Temperature 20 C to 40 C 4 F to 104 F Size 10 65 Inches 27 11 cm wide X 1 75 Inches 4 45 cm tall X 3 29 Inches 8 36 cm deep Tolerance 0 03 Inches W...

Страница 108: ...CISPR 22 CISPR 24 FCC 47CFR15 EU EN55024 EN55022 EN55022 2006 Class B EN61000 3 2 EN61000 3 3 EN55024 2006 IEC 61000 4 2 IEC 61000 4 3 IEC 61000 4 4 IEC 61000 4 5 IEC 61000 4 6 IEC 61000 4 8 IEC 61000...

Страница 109: ...Revision 1 1 WebSwitch Users Manual Appendix I Mechanical Information Xytronix Research Design Inc 108...

Отзывы: