400 Series User’s Manual

To save a PDF version, press ctrl+P (cmd+P). Page formatting will differ by page size, find one that works best for you.

Section 1: Introduction

1.1 Overview and Features


The X-400 series™ products are a family of powerful web-enabled industrial I/O controllers with many advanced features. The family includes various modules, each with different combinations of inputs and outputs (I/O). The modules all have common setup, communication and operating features.

The modules in the X-400 Series have various combinations of relays, digital inputs, analog inputs, 1-Wire Bus (for temperature/humidity monitoring), etc. Most of the modules have fixed number of I/O; however, the X-400 has a ribbon-cable expansion bus which allows expansion I/O modules to be directly connected to the X-400, making its I/O customizable. The X-404 has an RS-485 bus that can be used to communicate with third-party modbus sensors and devices.

All of the X-400 Series modules can share I/O with other X-400 Series modules in its internal logic.

These modules have functional similarities to standard Programmable Logic Controllers (PLC’s), and in many cases they can be used as web-enabled PLC’s. However, there are differences between the X- 4xx modules and PLC’s. PLC’s are typically programmed using ladder logic, instead, the X-400 Series devices are programmed either by using its simple web-page-based “task builder” or by writing a BASIC script.

The X-400 Series modules are setup and operated using a web browser without the need for custom configuration software. The X-400 Series was built from the ground up for modern network connectivity and supports various protocols such as HTTP, HTTPS, Modbus/TCP, SNMP, and more.

400 Series Product Line Up

Inputs and Outputs (I/O)

Local I/O

Each X-4xx module has a basic selection of built-in I/O such as relays, digital inputs, analog inputs, or a 1-Wire Bus for monitoring temperature or humidity. The X-400 module has a ribbon cable expansion bus for connecting I/O expansion modules and the X-404 has an RS485 bus for connecting third-party modbus sensors and devices.

Shared or Remote I/O

In addition to local I/O, the can seamlessly communicate and share I/O with any other X- 400 Series modules (X-410, X-418, etc.) through the TCP/IP network. The I/O on other devices are referred to as “Remote I/O”. Remote I/O can be used by the for any function and works the same as “local I/O”. The I/O can be on a single remote device or it can be spread out between up to 32 remote and expansion devices.

Analog Inputs

The X-412, X-418, and X-420 modules include a 16-bit, analog data acquisition system for use with industrial sensors, wind direction sensors, pyranometers, pressure transducers, and much more. The X-412 and X-420 have 4 analog inputs and the X-418 has 8. Each analog input channel is configurable for single-ended or differential operation (differential inputs require two channels).

Programmable voltage ranges include; ±1.28V, ±2.56V, ±5.12V and ±10.24V. Four of the channels can be configured for 4-20mA operation (first four channels of the X-418 and all four channels of the X-420). The 4-20mA mode enables a precision internal shunt resistor and configures the A/D for ±5V operation. This feature allows direct connection to 0-20mA current loop transducers. Note that the four channels in the X-418 that do not support this feature can be used with 4-20mA sensors by adding a 250 Ohm resistor in parallel with the input.

For applications where digital inputs are needed with the X-418 and X-420, the analog inputs can be configured as pseudo digital inputs with a boolean (true/false) state. The input voltage is compared to a fixed threshold to determine a true/false state. The input is considered “on” when the voltage rises above 3.5V and “off” when it falls below 1.5V.

Digital Inputs

Several of the modules in the have digital inputs. Digital inputs are binary with on/off states where the presence of an input voltage is “on” and the absence of a voltage is “off”. The inputs use photo-coupler circuits to keep internal and external voltages isolated. With some modules the photocoupler circuits share a common input terminal so those inputs are not isolated from each other. Each digital input has the ability to measure the total-on time since power up, the total-on time since the input was last off, count the number of rising/falling edges, or act as a low frequency input. Digital inputs can be monitored and used to control logic.

Analog Outputs (X-417 Only)

The X-417 has up to five independent and scalable analog output channels. Each of these channels can be programmed to output a voltage or current. The analog outputs are similar to that of a Programmable Logic Controller (PLC). However, unlike a PLC, the X-417 is designed for web-based applications from the ground up. No add-on software or hardware is required.

Relays

Several modules have internal relays. The relays vary in size and configuration. Some modules share common terminal connections between relays with the contacts internally connected together and some modules have contacts that are completely isolated. The internal relays can be used to operate indicator lights, interposer relays, and other low-voltage devices. The screw terminals are internally connected directly to the relays with no internal fuse or other over-current protection. The relay contacts are isolated from all other circuits. Control the relays with a web browser, timers, input changes, or programmable logic.

1-Wire Sensor Bus

Many of the modules have a 1-Wire port for connecting digital sensors for measuring temperature, humidity and more. The sensors are available in several configurations, are interchangeable and require no calibration. The sensors require three connections for communications and power (+5V, Gnd, Data). Control relays or trigger email messages based upon these values. Up to sixteen digital sensors can be connected to each 1-wire bus.

Digital I/O (X-420 Only)

The X-420 has two digital I/O terminals. These I/O terminals are non-isolated, 5-volt logic and can be programmed as outputs or inputs. They have programmable pull-up or pull-down resistors when configured as inputs. They can be used as pulse counters with a maximum pulse rate of 200 Hz.

Frequency Input (X-420 Only)

The X-420 has an AC-coupled frequency input. This is suitable for use with magnetic and optical wind speed sensors or it can be used with an AC transformer to monitor AC line or generator frequency.

Built-in Web Server

Users can monitor and control the devices using a web browser, the CBW Mobile app, or custom applications written for a computer, PLC, or other automation controller. With the built-in web server users can access the  devices directly as a self-contained, stand-alone unit. No gateways, cloud servers, or external services are required. If desired, however, these devices can be used with our ControlByWeb.cloud cloud service to simplify network setup. The supports standard HTTP requests or encrypted HTTPS requests. The example below shows a web page which has a status display and on/off buttons for several relays. The relays can be renamed to show their operational function.

400 Series Control Page Example

Simple/Advanced Logic

Task Builder

The devices have a built-in Task Builder user interface which allows you to create custom “Tasks” for simple and advanced control logic, without the need for scripting. Easily create scheduled and conditional logic tasks. Tasks or logic can be configured to run all of the time, only during a normal schedule, or only during an over-ride schedule.

BASIC Script

The has a built-in BASIC interpreter for custom applications and logic not possible through the built-in Task Builder.

Cellular Network Connection (Cellular Devices only)

Some modules in this series include a built-in cellular modem which provides connectivity through cellular data networks in addition to Ethernet connectivity. The cellular network option can be used for primary communications for applications where no other network is available or it can be used as a backup when the local network fails. Note that cellular connectivity does not provide direct access to the built-in web pages. Instead, the cellular network can be used for outgoing alert messages and/or for connectivity through the cloud service. Note also that use of cellular network requires monthly service fees. Cellular connectivity is not shared with ethernet devices connected to cellular enabled devices.

Email/Text Message Notifications

Send email alerts based on any sensor or input conditions, such as: temperature, time, digital inputs, power supply levels, and more. Send text messages to a cell phone through a wireless carrier’s email bridge (many wireless carriers offer this as a free service). The also supports encrypted emails using either implicit or explicit TLS (STARTTLS).

User Permissions

The supports three types of users with different levels of access to the device’s settings and Control Pages. Each user type has a unique password and is configured by the administrator in the setup pages. User level passwords may be disabled however, administrator-level passwords are required.

Real-time Clock

The Real Time Clock is used for scheduled tasks and for logging. It can be set manually or automatically using NTP servers. When it is configured to be set using NTP, it can be configured to update the time one time or periodically so it will always be accurate. It can be configured to automatically adjust for daylight savings time.

Logging

Configurable logging of local and remote I/O, Vin, and Register values. It can be configured to log periodically, when events occur, or both. In addition to data logging, the provides system logging of device operating parameters and events, such as power reset and NTP requests.

Graphing

Logged data can be graphed directly by any HTML 5 compatible web browser.

Security

The supports TLS V1.2 encryption. Specifically the supports HTTPS connections, can send encrypted emails, can communicate with remote devices using TLS, and send logged data to FTP servers over an encrypted connection.

Modbus & SNMP

The can function as a Modbus/TCP slave device. All devices in this series support SNMP V1, V2, and V3

Cloud Services (not required)

 can be configured to automatically connect to our cloud service called ControlByWeb.cloud. This feature is not required, but does simplify the configuration process and internet access to an X-4xx installed behind a network router by eliminating manual configuration of the device and port forwarding setup on routers. The option to use the X-4xx as a stand-alone device or through a cloud server makes it very powerful and very flexible. Note that by default this feature is disabled and the module(s) will not make any attempt to connect to the ControlByWeb.cloud service unless an account is set up and this feature is enabled by an administrator.

High-Reliability Design

The is designed from the ground up for reliability rather than cost savings. Shortcuts are not used in hardware design, programming, or assembly. It is built with industrial-grade, wide temperature range components which are more reliable than the components used in consumer-grade products. The devices include transient protection on the power input and all I/O circuitry, and operational protection such as watchdog timers and voltage supervisors. Every unit is fully tested before it is shipped from our facility.

Power Supply

The employs a switch-mode power supply which works from 9 to 28VDC. With this type of power supply, the current draw decreases as the voltage increases. The power supply voltage (Vin+) is monitored internally and can displayed, logged, or used for any standard logic function such as controlling a relay or configured to send email/text notifications. Some of the X-4xx modules can be powered using power over ethernet (POE) using 802.3af POE (48V) switches.

1.2  Applications


The X-400 Series is designed to meet a broad range of commercial and industrial applications. These modules work well as stand-alone devices or as part of a larger system. Many of their features such as scheduling, logging, input state monitoring, and the ability to share I/O between devices, make them very powerful, yet simple controllers.

You can use the to control motors, lights, coils, pumps, valves, bells, etc. You can also use it to monitor alarms sensors, switches, fluid level switches, battery voltage, temperature, humidity, and much more. A few example applications include:

  • Server or telemetry system “watchdog”
  • Web-enabled Controller
  • Refrigeration Monitoring
  • Solar Energy Controller
  • Process Monitor
  • Server for other ControlByWeb products: provide a single web page which controls other
  • ControlByWeb devices.
  • Process Controller
  • Security Systems
  • Programmable Scheduling Controller

1.3  Security Notes


The X-400 Series are dedicated devices that do not employ a general purpose computer operating system (i.e. Windows, Linux etc.) They do not have terminal access such as telnet, SSH, nor uncontrolled open ports. They have no services for communicating with computers or other devices on the network other than the limited protocols listed in the specifications (HTTP, HTTPS, Modbus, etc). There is no file system in these modules. Executable files (other than basic scripts) cannot be installed on these devices. This means it is extremely difficult, if not impossible, for someone to ‘break in’ to these modules and access other devices on your local network.

The simplicity of the device makes it an inherently secure device. Nevertheless, as with any device installed on a network, appropriate security precautions should be observed. Where security is concerned, access to the should be limited to using encrypted connections to the web server server using HTTPS. Unencrypted access can be disabled in the Network setup page.

It is recommended that passwords be enabled for the Administrators, Managers, and perhaps Users. Passwords should be at least 8 characters in length and use a combination of upper and lower case letters and numbers. For additional security, the device includes an IP filter and can be used in conjunction with an external firewall to further limit access to selected IP addresses.

The 400 Series firmware can be upgraded, but not over the internet. By design, a firmware upgrade requires physical access to the device. See Appendix B: Installing New Firmware.

1.4  Part Numbers, Accessories, and Expansion Modules


1.4.1  X-400 Series Module Model Numbers

PartNumberDescriptionDigitalInputsAnalogInputsRelays1-wire busOther I/OPower Supply
X-400-IModular I/O controller.
I/O is added by connecting expansion modules.
modularmodularmodular1 channel (up to 16 sensors)Expansion bus for connection of up to 32 I/O modules9-28VDC
X-400C-IModular I/O controller with Cellular connectivity.
I/O is added by connecting expansion modules.
modularmodularmodular1 channel (up to 16 sensors)Expansion bus for connection of up to 32 I/O modules9-28VDC
X-401-I2-relay 2-input229-28VDC
X-401-E2-relay 2-input22Power Over Ethernet and/or 9-28VDC
X-404-IModbus RS- 485 master controller1 channel (up to 16 sensors)RS-485 serial bus for connection of up to 32 modbus sensors9-28VDC
X-404C-IModbus RS- 485 master controller with Cellular connectivity1 channel (up to 16 sensors)RS-485 serial bus for connection of up to 32 modbus sensors9-28VDC
X-405-ITemperature/ Humidity Monitor1 channel (up to 16 sensors)9-28VDC
X-405-ETemperature/ Humidity Monitor1 channel (up to 16 sensors)Power Over Ethernet and/or 9-28VDC
X-406-ITemperature/ Humidity Monitor4 channel (up to 64 sensors)9-28VDC
X-406-ETemperature/ Humidity Monitor4 channel (up to 64 sensors)Power Over Ethernet and/or 9-28VDC
X-408-IDigital input89-28VDC
X-408-EDigital input8Power Over Ethernet and/or 9-28VDC
X-410-I4-relay 4-input441 channel (up to 16 sensors)9-28VDC
X-410-E4-relay 4-input441 channel (up to 16 sensors)Power Over Ethernet and/or 9-28VDC
X-412-I4-relay 4-analog in449-28VDC
X-412-E4-relay 4-analog in44Power Over Ethernet and/or 9-28VDC
X-412C-I4-relay 4-analog in449-28VDC
X-417:1-I
X-417:2-I
X-417:3-I
X-417:4-I
X-417:5-I
1-5-analog out9-28VDC
X-418-I8-analog in81 channel (up to 16 sensors)9-28VDC
X-418-E8-analog in81 channel (up to 16 sensors)Power Over Ethernet and/or 9-28VDC
X-420-I4-analog in 2-digital I/O241 channel (up to 16 sensors)9-28VDC
X-420-E4-analog in 2-digital I/O241 channel (up to 16 sensors)Power Over Ethernet and/or 9-28VDC

1.4.2  X-400 Expansion Module Options and Accessories

The following list of expansion modules can be connected to the X-400 and X-400C ONLY. Other devices in the do not support these expansion modules. See www.ControlByWeb.com/x400/ for an up-to-date list of available expansion modules and accessories.

Expansion Module Description Part Number
X-11s2-Relay module, Form C (SPDT), 20 Amp, 277VAC, 30VDC with mating connectorX-11s
X-12s8-Relay module, Form C (SPST), 2.5 Amp, 120VAC, with mating connectorX-12s
X-13s2-Channel thermocouple module, Type-K, -200° C to 1250° C (thermocouple not included)X-13s-K
X-15s8-Channel input module, optically isolatedX-15s
X-16sAnalog module, 8-channel, 0-5V, 24-bit, single or differential inputs, 5V reference outputX-16s
X-17s4 Relay (SPST 2.5 Amp), 4 Digital Input (Optically-Isolated shared common) Expansion ModuleX-17s
X-18s10 Relay (SPDT 30 Amp, 277VAC, 30VDC) Expansion ModuleX-18s
X-19s16 Relay (SPST 2 Amp, 30VDC, 30VAC), 16 Digital and 4 Analog Input (0-5V 12-bit, single ended) Expansion ModuleX-19s
X-20s6 Relay (SPDT 15 Amp, 277VAC, 30VDC), 6 Digital Input (Optically-Isolated) Expansion ModuleX-20s
X-21s4 Relay (Form C / SPDT 2.5 Amp, 125VAC, 28VDC) Expansion ModuleX-21s
X-22sAnalog module, 8-channel, +/-10V, 4-20mA, single or differential inputs, 5V reference outputX-22s
Accessories
Expansion Cable10-conductor ribbon cable with connectors, 1-32 positions, 2.5-inches between connectors For example: EXPCBL-1 for 1 expansion module (cable with 2-connectors) EXPCBL-2 for 2 expansion modules (cable with 3-connectors) EXPCBL-3 for 3 expansion modules (cable with 4-connectors)EXPCBL-X (where X=1-32)
Power InjectorOptional connector module for supplying external power to the expansion bus ribbon cableX-PINJECT

1.4.3  Optional Accessories

Accessory Description Part Number
Power SupplyRegulated, DIN-rail / wall mount 24V DC, 1.75Amp, 100-240V AC Input2868648
Temperature SensorDigital temperature sensor with 12 inch wire leads. Note: Leads may be extended -55° C to +125° C (±0.5  from -10° C to +85° C)X-DTS-U
Temperature SensorDigital temperature sensor with 3 foot wire leads (housed in a water resistant stainless steel probe) -55° C to +125° C (±0.5  from -10° C to +85° C)X-DTS-S3C
Temperature SensorDigital temperature sensor with 32 foot wire leads (housed in a water resistant stainless steel probe) -55° C to +125° C (±0.5  from -10° C to +85° C)X-DTS-S32C
Temperature/Humidity Sensor ProbeDigital temperature and humidity sensor probe -40° C to +80° C ±0.4 , 0-99%RH ±2%X-DTHS-P
Thermocouple to 1-Wire AdapterThermocouple to 1-Wire interface, Type K -200° C to +1250° C, ±.5 X-TC1W-K
Temperature/Humidity Sensor (Wall Mount)Digital temperature and humidity sensor -40° C to +80° C ±0.4 , 0-99%RH ±2%X-DTHS-WMX
Temperature Sensor1-Wire Digital temperature sensor housed in vented plastic enclosureX-DTS-WMX
Spare Connector14-Pin Connector PlugX-TERM14A

1.5  Connectors & Indicators


Expansion Bus connector (X-400 only)

The 2×5-pin ribbon cable expansion bus connector allows for a family of expansion modules to be connected directly to the X-400. The ribbon cable provides both communication and power connections to the expansion modules. The cable can be a daisy chain with multiple connectors.

RS-485 Connector (X-404 only)

The 5-pin screw terminal connector allows the connection of third-party modbus sensors and devices for monitor and control.

Network Connector

The Ethernet connector is a standard, 8-position modular receptacle for RJ-45 connectors. The Ethernet port supports auto-negotiation and automatically selects the speed, duplex mode and works with straight or crossover cables.

Cellular Antenna Connector (Cellular Devices only)

Models that have the option for cellular network connectivity have a Female, SMA type coax connector to attach a cellular antenna. (DO NOT OPERATE THESE MODELS WITHOUT AN ANTENNA CONNECTED).

Power Indicator

The green Power LED indicator is illuminated whenever the device is powered.

Ethernet Indicators

The LINK LED is illuminated green when the device is properly connected to an Ethernet network and is ready to communicate. Network communications will only occur if this LED is illuminated. The ACT LED flashes yellow when activity is detected on the network.

Relay Indicators

On modules that have relays, the yellow LEDs illuminate when the corresponding relay is energized. When a relay is energized, the common and normally open contacts are closed.

Input Indicators

On modules that have digital inputs, the yellow LEDs illuminate when the corresponding digital input is “on”.

1.5.1  I/O and Power Connectors

Each module has a removable screw terminal connector for making connections to the power source and I/O. The connections for each X-400 Series module are described below.

X-400 I/O Table
X-400 Unit Front
X-400C Unit Front
401 I/O Table
X-401 Unit Front
X-404 I/O Table
X-404 I/O Table 2
X-404 Unit Front
X-404C Unit Front
X-405 I/O Table
X-405 Unit Front
X-406 I/O Table
X-406 Unit Front
X-408 I/O Table
X-408 Unit Front
X-410 I/O Table
X-410 Unit Front
X-412 I/O Table
X-412 Unit Front
X-417 I/O Table
X-417 Unit Front
X-418 I/O Table
X-418 Unit Front
X-420 I/O Table
X-420 Unit Front

Section 2: Installation and Connections

Installation consists of mounting the device, connecting it to an Ethernet network, connecting the I/O to other accessories/sensors, and providing power. The installation is completed by configuring the device’s settings using a web browser.

2.1  Installation Guidelines


  • This device must be installed by qualified personnel.
  • This device must not be installed in unprotected outdoor locations. This device should be located in a clean, dry location where it is protected from the elements. Ventilation is recommended for installations where ambient air temperatures are expected to be high.
  • This device must not be used for medical, life saving purposes, or for any purpose where its failure could cause serious injury or the loss of life.
  • This device must not be used in any way where its function or failure could cause significant loss or property damage.
  • Do not use to directly control motors or other actuators not equipped with limit switches or other safeguards to protect from equipment or wiring failures.
  • If this device is used in a manner not specified by Xytronix, the protection provided by the equipment may be impaired.
  • CAUTION: Miswiring or misconfiguration could cause permanent damage to the device, the equipment to which it is connected, or both.
  • CAUTION: Make sure the power is shut off before making connections

Wall Mounting

Mount the module to a wall by using two #8 screws. Attach the screws to the wall vertically spaced exactly 2.5 inches apart. The head of the screw should be about 1/10 inch away from the wall.

DIN-Rail Mounting

The module can be mounted to a standard (35mm by 7.55mm) DIN-Rail. Attach the module to the DINRail by hooking the top hook on the back of the enclosure to the DIN-Rail and then snap the bottom hook into place. To remove the from the DIN-Rail, use a flat-head screwdriver. Insert the screw driver into the notch in the release tab and pry against the enclosure to release the bottom hook.

2.2  Power Supply Connections


A removable terminal connector is provided for making the power connections. To help protect the module from mechanical stress:

  1. Make sure power is turned off and
  2. Remove the terminal connector from the module and make wiring connections to the terminals.
  3. Reconnect the terminal connector and apply power.

See Appendix D: Specifications for wire size, temperature rating, and torque requirements for making connections to the terminal blocks.

2.2.1  Power Supply and Power-Over-Ethernet Connections

The X-4xx requires power for its internal logic circuits. Connect a 9-28 VDC power supply to the +Vin and Gnd terminals. A regulated power supply is recommended, such as a wall-mount AC-DC adapter. Verify that the adapter is rated for the operating current of the X-4xx (See Appendix D: Specifications for the current requirements.)

Multiple modules and other devices may be connected to a single power supply by connecting the power supply input terminals in parallel. The power supply must have an ample current rating to power all units connected.

POE models (X-4xx-E) are normally powered from a Power Sourcing Equipment (PSE) device which passes DC power along with data on the twisted pair Ethernet cabling. This allows a single cable to provide both the data connection and DC power. With the X-4xx-E no connections are needed to the Vin+ and Gnd terminals. The Vin+ and Gnd terminals however, can be used as a backup power source. The X-4xx-E has an internal “diode or” circuit between the Vin+ terminal and the internal Powered Device (PD) circuits. If a power supply is connected to the Vin+ terminal, the X-4xx-E will draw power from the PSE if the input voltage is less than 12.0V, and from the Vin+ terminal if the input voltage is greater than 12.0V. If the PSE power fails, the X-4xx-E will draw all power from the Vin+ terminal.

2.2.2   Notes about powering the X-400 (X-400 only)

The expansion modules draw their power from the X-400 through the expansion bus ribbon cable. If expansion modules are connected to the X-400, the power supply must have enough capacity to power both the X-400 and any expansion modules connected to the X-400. The expansion bus can provide up to 1.70 Amps for powering the attached expansion modules. The maximum number of expansion modules you can attach depends on the module type and power requirements of the modules. The expansion modules employ modern switch-mode power supplies. With this type of power supply the current draw decreases as the voltage increases. As such, you can add more expansion modules by using a 24-volt power supply than you can with a 12-volt power supply. If additional power is needed for modules on the expansion bus, please see the next section called Optional Power Injector (X-400 only).

As an example, an X-11s (2 relay expansion module) would use 105 mA with a 24VDC power supply when connected to the X-400. The X-400 would be able to support up to 16 modules under this configuration (16 X 105mA = 1.68A). This example is workable because the expansion bus load current is less than 1.70 Amps. For this example the power supply must be capable of providing 1.76A at 24VDC (80mA for the X-400 plus 1.68A for the devices on the expansion bus).

If only using a 12VDC power supply, each X-11s (2 relay expansion module) would use 196mA. The X-400 would be able to support eight modules under this configuration (8 x 196mA = 1.57A). This configuration is workable because the expansion bus load current is less than 1.70 Amps. For this example the power supply must be capable of providing 1.72A at 12VDC (150mA for the X-400 plus 1.57A for the devices on the expansion bus).

2.2.3   Optional Power Injector (X-400 only)

As described in the section above, the expansion modules draw their power from the X-400 through the expansion bus ribbon cable. The X-400 can provide up to 1.7 Amps for powering the attached expansion modules. In applications where a large number of expansion modules are used and additional current capacity is needed, a DC power injector can be employed. This accessory has two ribbon cable connectors and a connector for supplying power (9-28V DC) to the expansion bus separately from the X-400. The communication signals pass through the power injector but the DC power from the X-400 does not. The power injector thus provides power for all of the expansion modules to the left side of the injector. The ribbon cable itself can only carry 1.7Amps maximum. Install one or more power injectors such that no portion of the ribbon cable carries more than 1.7Amps.

Note: To provide a coordinated power-up sequence, it is recommended to power the X-400 and any power injectors using the same power supply.

Power Injector Example

2.2.4   Notes about powering the X-404 (X-404 only)

Modbus sensors draw their power from the X-404 through the RS-485 5 pin connector. If modbus sensors are connected to the X-404, the power supply must have enough capacity to power both the X-404 and any modbus sensors connected to the X-404. The RS-485 bus can provide up to 1.70 Amps for powering the attached modbus sensors. The maximum number of modbus sensors you can attach depends on the power requirements of the sensors up to a maximum of 32 sensors.

2.3  Expansion Module Connections (X-400 only)


Expansion modules are connected to the X-400 with a 10-conductor ribbon cable. Normally the X-400 and the expansion modules are mounted side by side as shown in the photo below. The ribbon cable connectors have a polarization lug to ensure correct connections.

Note: The following image shows the X-600M connected to several expansion modules; however, connecting expansion modules to the X-400 is the same.

ControlByWeb Devices Connected with Ribbon Cable Connector

2.4  RS-485 Connections (X-404 only)


The X-404 serves as a Modbus Master device. The D(A) and D(B) terminals provide serial RS-485 communications. RS-485 is used to implement linear bus topologies using only two wires. It is recommended to arrange the bus as a connected series of multi-drop nodes in a line or bus, not a star or ring. Star or ring topologies are not recommended because of signal reflections. In addition to the differential pair signals, you must make a ground connection between the shield or power supply common of your Modbus slave devices and one of the GND terminals on the X-404. The signal common (SC) ground connection serves to keep the D(A) and D(B) signals within the common mode range of the internal RS-485 transceiver.

2.4.1   RS-485 Line Polarization

The X-404 has an internal 120-ohm balanced line termination network. As a master device, the termination network provides pull-up/pull-down bias to insure that its receiver stays in the idle state when no data signal is present. The D(A) circuit has a pull-up resistor to a 3.3V volts and the D(B) circuit has a pull-down resistor to Gnd.

Unfortunately, despite the TIA-485 and Modbus over Serial Line Specifications, there is confusion in the industry over the designation of the D(A) and D(B) differential signal connections. The X-404 uses the following connections:

X-404 line polarization

  • For a MARK (idle bus), (logic 1), the D(A) terminal is positive relative to the D(B) terminal.
  • For a SPACE (logic 0), the D(A) terminal is negative relative to the D(B) terminal

2.5  Cellular Antenna Connector (Cellular Devices only)


Modules that include cellular connectivity come with an omnidirectional antenna for use with the embedded LTE-M cellular radio. The included antenna is suitable for most applications and connects to the female SMA connector on the faceplate. Do not operate these modules without the antenna connected.

The omnidirectional antenna radiates RF signals in all directions in one plane with a pattern shaped somewhat like a doughnut or torus. The radiated power decreases above or below the plane, dropping to zero on the antenna’s axis. Orient the antenna vertically so the antenna will radiate in all horizontal directions and so little radio energy is aimed into the sky or down toward the earth and lost.

The antenna used for this transmitter must be installed to provide a separation distance of at least 20 cm (approx. 8 in) from the device and must not be co-located or operating in conjunction with any other antenna or transmitter except in accordance with FCC multi-transmitter product guidelines.

In applications where the included antenna is not optimal, the FCC allows the use of another antenna provided the combined gain of the antenna and cabling are below the limits listed below.

  • 3.67 dBi in 700 MHz, i.e. LTE FDD-12 band
  • 6.74 dBi in 1700 MHz, i.e. LTE FDD-4 band
  • 7.12 dBi in 1900 MHz, i.e. LTE FDD-2 band

2.6  1-Wire Bus Connections


Many modules in the X-400 Series have a 1-Wire Bus. This port which supports up to 16 digital sensors for measuring temperature, humidity and more. (Note that the X-406 has four 1-Wire channels, with each channel supporting up to 16 sensors for a total of up to 64 sensors).

The sensors share the same three connections for communications and power (5Vo, Data, and Gnd). Every sensor on the bus is assigned a unique serial number when it is manufactured. That number is used to address the sensor during communication.

The digital temperature sensors are interchangeable and require no calibration. See Optional Accessories for a list of compatible 1-Wire sensors. Most temperature probes compatible with ControlByWeb modules have a measurement range of -67°F to +257° F (-55  to +125 ) and an accuracy of +/-0.5  (-10° C  to +85° C). A full list of compatible temperature/humidity sensors are listed on our website.

The temperature sensors have three wires as shown below:

Sensor Wire ColorConnection
Red5Vo
BlackGnd
Blue, White, or YellowData
X-DTS-S3C Temperature Sensor

2.6.1   Extending Temperature Sensors

Many factors can determine the maximum length of the cable, including the sensor network topology, the type of cable used, the number of sensors and ambient electromagnetic noise.

Multiple sensors can be connected to the module in two ways: directly connected (star topology) or “daisy chained” (linear topology), as shown below.

Combined cable lengths to all sensors of 600 ft using Cat 5e cable have been successful; however, due to the uniqueness of installation environments, results may vary. Please test in the desired environment before making a permanent installation.

The following are general recommendations that will maximize sensor runs and minimize problems:

  • Use small gauge 3-conductor wire (Cat 5e, 18-3 thermostat wire, etc).
  • Cat6 wire can be used, but Cat 5 and Cat 5e network cable is recommended, and has proven to be an effective and low-cost solution for long runs. Cat 5e is more tolerant of different wiring configurations.
  • Non-shielded works best for longer runs (extra capacitance of shielded wire limits run length).
  • The 1-Wire Bus is “single-ended” and has no intrinsic noise protection. It is susceptible to interference if the cable is routed near power lines, fluorescent fixtures, motors or other noise sources. Keep the cable wiring short and avoid routing it near other electrical equipment.

The illustration below shows the recommended connection using Cat 5 network cable. Connect all unused conductors to ground on the module.

A linear (daisy chain) topology will minimize signal reflections, providing a more reliable connection and will allow longer cable length than a star topology.

Temperature Sensor Wiring Daisy Chain Example

Recommended daisy chain topology connections using Cat5 cable.

Temperature Sensor Wiring Star Topology Example

2.7  Relay Connections


Relays can be controlled with a web browser, timers, input changes, or programmable logic.

The relays vary in size and configuration. Some modules share common terminal connections between relays (the X-410 for example) with the contacts internally connected together. Some modules have contacts that are completely isolated.

The internal relays can be used to operate indicator lights, interposer relays, and other low-voltage devices.

The screw terminals are internally connected directly to the relays with no internal fuse or other over-current protection.

The relay contacts are isolated from all other circuits. The relay contacts may be wired in series with the power source for the load (device to be controlled) as long as the load does not exceed the maximum current and voltage rating of the relay contacts.

When using multiple relays in the X-410, make certain the common for all loads can be connected together without causing damage or a short circuit.

For loads greater than a relay’s specifications, an external interposer relay should be used. The illustration below shows how a 15-Amp motor can be controlled using an external relay. In the example, the X-410’s 1-Amp relay controls the external relay, and the external relay controls the 15-Amp load.

X-410 Light Tower Example
X-410 External Relay Diagram

When mechanical relays switch inductive loads such as motors, transformers, electro-mechanical relays, etc., the current will arc across the internal relay contacts each time the contacts open. Over time, this causes wear on the relay contacts which can shorten their life span. When switching an inductive load, it is recommended that relay contact protection devices are used. Note that the modules do not provide relay contact protection in order to provide the greatest versatility and because appropriate protection differs for various loads.

Below is an example of relay contact protection for a DC circuit and an AC circuit. For component values required to provide sufficient contact protection for your application, refer to appropriate references.

X-410 DC Contact Protection Diagram
X-410 AC Contact Protection Diagram

2.8  Digital Input Connections

Several of the modules in the have digital inputs. Digital inputs are binary with on/off states where the presence of an input voltage is “on” and the absence of a voltage is “off”. The inputs use photo-coupler circuits to keep internal and external voltages isolated. The digital inputs can be used to control the internal relays, control remote relays (over the network), or simply to monitor the state of a discrete device. To use these inputs, connect a DC control voltage directly to the inputs, and set up the function of the input using the configuration pages. If an AC signal, or a signal greater than the rated input voltage needs to be detected, use a signal conditioner to convert the signal to a DC signal within the input range. With the X-408, the negative inputs of the photo-couplers are paired together with two inputs sharing one screw terminal. With the X-410, the digital inputs are not isolated and share a common ground with the power connection.

DC Input Connections

Each digital input is connected internally through a current-limiting resistor directly to a photo-coupler circuit. No external resistor is necessary as long as the input signal is within the proper range (See Appendix D: Specifications). A DC voltage can be reduced with an external resistor of the appropriate value and power rating to reduce the input current.

The digital input has an internal 3K ohm resistor. The forward voltage drop of the photo-coupler is approximately 1.2V and works well with an input current of 9mA. Use the following formula to determine the resistor value needed for other voltage ranges:

R =((Vin-1.2)/0.009)-3000

Where:

R = External resistor value required

Vin = Desired input voltage

1.2V = forward voltage drop of the LED in the photo-coupler

.009A = workable LED current

3000 ohm = Internal resistor

For example:

To connect a 48VDC signal voltage to the X-410:

R = ((48-1.2)/0.009)-3000 = 2200 ohms

Check the power dissipated by the resistor:

P = I x I x R, The resistor must be at least .009 x .009 x 2200 = 0.18 Watts, so use a 1/2 Watt resistor.

2.8.1   Switch-Closure Connections

The digital inputs can sense the state of a switch-closure sensor. Sensors with switch-closure outputs include push buttons, magnetic door alarm switches, micro-switches, or any device which has a relay, switch-closure, or open-collector output. The X-4xx modules can be configured for the alarm to be active when the switch is either open or closed.

The illustration below shows an example of using an X-410 to monitor the status of a gate or door over an IP network. The status of the device is detected with a switch. These types of sensors are called “dry contacts” in that the sensor output is a bare switch with no power source. In this example the voltage source for the switch is provided via the +5V output.

X-410 Dry Contact Diagram

Some modules don’t have a 5V output that can be used to power dry contacts. Additionally, for long wire runs it is better to use a higher voltage like 12V or 24V to compensate for voltage drop across the wires. The illustration below shows how to use the same power supply to power the X-4xx module and the dry contact.

X-408 Dry Contact Diagram

When using modules that are powered using POE (Power Over Ethernet), the 5V output can be used for short wire runs on modules that provide that output. For longer wire runs or for modules that don’t provide the 5V output, a separate power supply will be required to “wet” the contacts as shown below.

X-408 Dry Contact Diagram

Multiple dry contacts can use the same power supply as shown below.

X-408 Multiple Dry Contact Diagram

2.8.2   Water Leak Detector Example

A GRI-2605 water leak detector can be directly connected to the module such as an X-408 or an X-410. The sensor detects the presence of water or other conductive liquids. The sensor has 4-wires which are connected as shown below. The GRI-2605 has an internal relay whose contacts (green & white wires) are closed when the sensor is dry. When the sensor is dry the digital input will be “On”. When water is detected, the relay contacts open and the digital input will be “Off”. With the connections shown, the sensor is a supervised alarm circuit such that if a wire is disconnected or the sensor fails, an alarm will be generated. The X-4xx module can be programmed to activate a local relay, activate a relay at a remote location, and send an e-mail warning when a water leak is detected. After installation, test the sensor with a damp sponge or wet towel.

X-410 Water Leak Sensor Diagram

2.8.3   AC Input Connections

If an AC signal voltage needs to be detected, use a signal conditioner to convert the AC signal to a DC voltage within the input range. An AC signal conditioner can be made using a diode (or bridge rectifier) and a capacitor. Prepackaged signal converters are available as accessories at industrial automation distributors.

A simple voltage converter module (RedLion VCM10000 or VCM20000) is shown below. These are available in two input voltage ranges that cover the range from 4-270VAC/DC. These devices have a MOSFET output (solid state DC contact closure) which is compatible with the X-4xx inputs. The converter module accepts AC (50/60 Hz) or DC voltages with an input pulse rate up to 30 Hz. The converter provides isolation between the input and output using an opto-isolator. You must provide a voltage source for the converter circuit as shown in the example below:

X-410 AC Input Diagram 2

2.9  Analog Input Connections

The X-412, X-418, and X-420 all feature a high-performance, 8-channel, 16-bit analog data acquisition system. The inputs are high impedance (>500 Meg ohms.) Each channel is configurable for single-ended or differential operation. Programmable voltage ranges include; ±1.28V, ±2.56V, ±5.12V and ±10.24V and ±20.48V (differential). Four of the channels on the X-418 can be configured for 0-20mA input operation (all four channels on the X-412 and X-420). The input mode and voltage range is configured in the web-based setup pages. The input impedance is very high and if an input is left unconnected, the voltage measurement will float and drift. The analog inputs work with industrial sensors, wind direction sensors, pyranometers, pressure transducers, and much more. The analog inputs can be configured to send an email, log, or control a remote relay (over the network using peer-to-peer communication).

2.9.1   Single-Ended Mode

The analog data acquisition system can accept bipolar input signals. Single-ended signals are referenced to the AGnd terminals. Each channel can be independently programmed with a ±1.28V, ±2.56V, ±5.12V, ±10.24V voltage range. Do not share the sensor ground connection with the power supply input terminal. Consider how the sensor(s) are powered, arrange the sensor connections so no current flows in the ground reference connections between the X-412/X-418/X-420 and your sensor(s).

This illustration is an example of using the X-412/X-418/X-420 with a potentiometer position sensor. Potentiometers are a variable resistor with three connections. Typically the 5Vref reference from the module is used to apply a voltage across the potentiometer. The wiper terminal of the potentiometer is connected to any of the analog inputs.

X-418 Single Ended Input Diagram

The illustration below shows an example of using the X-412/X-418/X-420 in conjunction with a current to voltage transducer to measure the current draw of a motor.

This example uses a current sensor that will measure current up to 20 Amps AC. The sensor produces a linear 0-5VDC output that it can be connected directly to one input of the X-412/X-418/X-420. The slope calculation for the setup page is shown below:

Slope = (Y2-Y1)/(X2-X1)

Slope = (20Amps – 0 Amps)/(5 VDC – 0 VDC) = 4 Amps/V

Enter the calculated slope in the X-412/X-418/X-420 setup pages so the current is calculated and displayed properly.

X-410 Input Motor Diagram

2.9.2   Differential Mode

Differential sensors have two outputs that reference each other instead of ground. The differential mode uses two analog inputs instead of one. For example, if Channel 1 is selected for differential operation, the differential signals are connected to Channel 1 and 2. If Channel 3 is selected for differential operation, the differential signals are connected to Channel 3 and 4, and so on.

Differential mode supports input ranges of up to ±20.48V. However, the absolute input voltages must be less than ±10V. For example, if Input 1 is configured for differential operation and Input1 = +10V and Input2 = -10V, the measurement will read +20V. On the other hand, if Input1 = -10V and Input2 = +10V, the measurement will read -20V. With differential connections, a ground connection is still required between the module and your sensor to maintain the two input voltages within the common mode voltage range (-10V < Vin < +10V) of the X-412/X-418/X-420.

This illustration shows the connections for a Wheatstone bridge sensor with two output signals. The outputs are connected to Ain1 and Ain2. The X-412/X-418/X-420 must be programmed for differential mode on “Ain1”. In this example the bridge is excited (driven) by the 5.0V reference output.

X-418 Input Differential Diagram

2.9.3   4-20mA Mode

Some industrial sensors output a current instead of voltage levels. Normally, a shunt resistor is needed to measure the current. With the X-412/X-418/X-420, the 4-20mA mode enables an internal precision 200-ohm shunt resistor (0.1%, 25ppm) and automatically configures the A/D for ±5V operation. This feature allows direct connection to 0-20mA current loop transducers. At 20mA, the maximum loop voltage across the input is 4.0 Volts (.020 x 200 = 4.0V). With this setting, the voltage-to-current calculation ((Vin/200)*1000) is automatically made so the measurement is in units of mA.

X-418 4-20mA Mode Input Diagram

When connecting more than one 4-20mA sensor consider using a “star” or single point ground topology. If the output current from one sensor changes or affects the measurements of other sensors (crosstalk), you will need to re-consider your connections.

Loop powered current transmitters normally require 7 to 8 Volts across their terminals in order to work properly. With a 200-ohm resistor in the X-412/X-418/X-420 the load resistor will drop an additional 4-Volts. Allow 2-volts or so for voltage drops across the wiring, especially if the wires are small or long. For this example make certain your loop power source is at least 14-Volts (8+4+2).

2.9.3.1 Monitor Flow, Distance, or Speed with a 4-20mA Sensor

Sensors are available for measuring flow, distance, speed and many other industrial processes. Many sensors employ a 4-20mA analog output. With the built in shunt resistors in the X-412/X-418/X-420 these transducers can be connected directly to the X-412/X-418/X-420 as described above. Once the components are properly wired, the X-412/X-418/X-420 must be configured with the proper Slope and Offset to convert the current measurement into engineering units such as CFS (flow), Meters (distance) or Meters per Second (speed). For linear transducers this is normally done with a Y=mX+b equation.

Engineering Value = (Measured Value * Slope) + Offset

The documentation for the sensor must be consulted for the calculations. For example, if the range of a laser rangefinder is 1Meters to 100Meters the transducer will output 4mA at 1M and 20mA at 100M. The X-412/X-418/X-420 makes measurements in units of mA. To convert this measurement to engineering units the mA measurement must be processed with a Slope setting. The general term for the Slope is:

Slope = (Y2-Y1)/(X2-X1)

To determine the slope, first determine the minimum and maximum current that will be applied to the X-412/X-418/X-420. In this example the transducer will output 4mA at 1M and 20mA at 100M.

To calculate the slope:

Slope = (100M – 1M)/(20mA – 4mA) = 6.1875 Meters/mA

Once the slope is determined, calculate the offset using the Y=mX+b linear equation where b is the offset.

1M = 6.1875M/mA * 4mA + Offset

Offset = 1M – (6.1875M/mA * 4mA) = -23.75M

2.9.4   Pseudo Digital Inputs

For applications where digital inputs are needed, specific analog inputs can be configured as a pseudo digital input with a boolean (true/false) state. The input voltage is compared to a fixed threshold to determine a true/false state. The input is considered “true” when the voltage rises above 3.5V and “false” when it falls below 1.5V. The analog inputs cannot process narrow pulses or high frequency input changes.

When an analog input is configured as a digital input, the input can be configured to send an email, control a remote relay (over the network), or monitor the state of a discrete device. Note that these Pseudo Digital Inputs do not have the optical isolation that is used in all of the dedicated digital inputs found on other devices in the X-400 Series. Without the optical isolation these Pseudo Digital Inputs are not protected as well from transient voltage spikes so it is not recommended that these inputs be used with long cables, outdoor cable runs, or electrically noisy environments.

The illustration below shows an example of using the X-412/X-418/X-420s to monitor the status of a gate or door over an IP network. The status of the device is detected with a simple switch. These type of sensors are called “dry contacts” in that the device output is a bare switch with no power source. In this example a voltage source for the switch is provided by the +5Vref output. A pull-down resistor must be provided to drive the input to a known state (0V) when the switch is open. In this example the measurement voltage will be 5.0V when the switch is closed and 0-V when the switch is open.

X-418 Pseudo Digital Input Diagram

2.10  Analog Output Connections (X-417 only)


The analog outputs can be individually programmed to function as 0-5V, 0-10V, ±5V, ±10V, 4-20mA outputs.

Voltage Output Connections

Many variable frequency drives (VFD), servos and other actuators are controlled by a variable voltage. To use these devices the Aout and Com outputs are connected directly to the device to be controlled. A connection must be made to the Com terminal. Internally the Vin- and Com pins are isolated by the DCDC converter. The maximum output current for voltage outputs is 10mA per channel. The five Com pins are internally connected together.

Current Output connections

Some actuators are designed to respond to a change of DC current instead of the voltage levels. To use these devices the Aout and Com outputs are connected directly to the device to be controlled. Power for the current loop is provided by the X-417. The X-417 employs an internal current source for controlling the output current. The current source saturates at 11.5V. As such the resistance of your output current loop must not be more than 575 ohms (575ohm x 0.02A = 11.5V). This includes the input resistance of the actuator and any wiring in the current loop. If the current loop is open or the loop resistance is too high the respective yellow fault LED will be illuminated and the web page display will show the output value as xx.xx.

X-417 Analog Output Connections Diagram

2.10.1   Digital to Analog Converter

The X-417 accepts output settings in familiar engineering units such as V, M, Ft, KPH, %. Internally the X-417 automatically scales the output settings before setting the digital to analog converter. This allows the user to control the output device using familiar and descriptive engineering units.

The internal calculations are made with a linear slope and offset equation (Y=mX+b). With the default settings, the input and output have a 1 to 1 relationship. For example, with the default settings, setting the output to 2.0 will result in the analog output being 2.0Volts. When the X-417 is controlled via Modbus/TCP from a PLC or other device it may be convenient to leave the default settings undisturbed so that no data scaling is done in the X-417 and any math or other calculations are done in the PLC or controlling device.

If you wish the X-417 to scale and process the output settings, you can access the Analog Outputs tab in the Setup menu to change the output settings. For example, you may wish to control a damper motor and have the display and settings with values of 0 to 100%. When properly configured, the X-417 will scale a setting of 0% to generate a 4.0mA output, and a setting of 100% to generate a 20.0mA output.

2.11  Digital I/O (X-420 Only)


The Digital I/O’s can be individually programmed to function as either inputs or outputs. The digital I/Os employ 5V logic, are not isolated and share a common ground with the power connection.

2.11.1   Digital I/O Configured as Inputs

When a Digital I/O is configured as an input, the input can be configured to send an email, control a remote relay (over the network), monitor the state of a discrete device, or one input can control the other output. The digital inputs work with sensors with switch-closure outputs including push buttons, magnetic door alarm switches, micro-switches, or any device which has a relay, switch-closure or opencollector output. The inputs can be configured for the alarm to be active when the switch is either open or closed.

The illustrations below show an example of using the X-420 to monitor the status of a gate or door over an IP network. The status of the device is detected with a switch.

Pull Resistor

When configured as an input, an internal pull-up or pull-down resistor can be selected in the settings. If no connections are made to the input, the pull-up resistor will pull the input high (on), and the pull-down resistor will pull the input low (off). The illustrations below show how the pull resistors work with simple single pole switches connected to the digital inputs.

For a high-side switch, one side of the switch is connected to the +5V output and the other to I/O 1 or I/O 2. Select the pull-down resistor. When the switch is open, the pull-down resistor pulls the input low (Off).

X-420 Pulldown Resistor Diagram

For a low-side switch, one side of the switch is connected to ground and the other to I/O 1 or I/O 2. Select the pull-up resistor. When the switch is open, the pull-up resistor pulls the input high (On).

X-420 Pull-Up Resistor Diagram

2.11.2   Digital I/O Configured as Outputs

When a Digital I/O is configured as an output, it can be used to supply a voltage to an external relay or device. The example below illustrates how the output can be used to actuate an external solid state relay. Note that a solid state relay is used because most electro-mechanical relays would require more current than these digital outputs can provide.

X-420 Solid State Relay Diagram

2.12  Frequency Input (X-420 Only)


Sensors that output pulses can be connected to the Frequency Input. The input is AC coupled and is designed for direct connection to a magnetic wind speed sensor. Magnetic wind speed sensors output a low voltage sine wave at low wind speed, as the wind speed increases both the voltage and frequency increase.

The frequency input works with other sensors compatible with an AC input. For example, a 6VAC or 12VAC transformer can be used to measure the AC line frequency or the output frequency of a generator.

2.13  Network Connection


X-418 Network Connection Diagram

X-418 and WebRelay shown. Same concept applies to all ControlByWeb devices.

Connect the Ethernet port to a standard 10/100/1000 Base-T Ethernet connection. The module typically connects to an Ethernet switch, or router. For configuration, the module may be connected directly to the Ethernet port on a computer or through a switch or router. The module supports auto-negotiation and will work with either crossover or straight-thru cables. It can be also used on a wireless network by connecting through an Ethernet bridge or a wireless router.

X-418 Wireless Connection Diagram

X-418 device shown. Same concept applies to all ControlByWeb devices.

Note: The wireless Ethernet bridge or router must be properly configured for the wireless network. Refer to the installation instructions for the wireless device.

2.14  System Start Up


At power-up, the green Power LED should be illuminated. The modules require 10 to 15 seconds to startup before being accessible over the ethernet.

2.15 Establishing Communications for Setup


In order to configure the modules with their built-in web interface, the module must be connected to an Ethernet network. This can be done by one of two methods:

Method 1– Temporarily change the IP address of a connected computer to be compatible (same subnet) with the default IP address used by the module.

Note: If multiple ControlByWeb™ devices are used on the same network, install one at a time and set the IP address of each unit before connecting the next unit to the network. This avoids having multiple devices being installed on the network with the same factory default IP address at the same time. If this approach is used, be sure to clear the arp cache after disconnecting each unit (run ‘arp -d ‘ from an administrative command prompt).

-or-

Method 2 – Assign a temporary IP address to the module to work on an existing network.

2.15.1   Method 1: Assign a Temporary IP Address to the Configuration Computer

By default, the modules come from the factory with an IP address of 192.168.1.2. Communication with the module may be established by assigning an IP address to the configuration computer so that it is on the same logical (and physical) network as the module (for example, the configuration computer could be assigned to an IP address of: 192.168.1.50)

The following example is for those running the Windows 10 operating system:

  1. First, turn off your Wi-Fi settings.
  2. Then, open the Control Panel on your Windows 10 computer. Click on the Windows logo in the bottom left corner and type “Control Panel”. You’ll see the Control Panel link in the search results. Click on the Control Panel to open it.
  3. Find and select the Network and Internet link.
Windows 10 Control Panel

4. Now, select Network and Sharing Center.

5. Next, select the Change adapter settings link in the left sidebar.

Windows 10 Change Adapter Settings

6. Right-click on the Ethernet network and click Properties.

Windows 10 Right-Click Ethernet

7. You’ll see a list of properties with check boxes. Find the IPv4 property and double-click.

Window 10 IPv4 Settings

 8. Here you’ll find the IP address for your computer. Make note of the current settings so you can restore these settings later. Change your computer’s IP address to 192.168.1.50 and your subnet to 255.255.255.0.

Windows 10 IP Address Settings

9. Now you can communicate directly with your ControlByWeb device. Open your favorite Internet browser, type in the default IP address, which is 192.168.1.2/setup.html

10. Proceed to enter the default username and password.

11. Visit the Network page under General Settings to assign the new fixed IP address to your ControlByWeb device. This IP address needs to come from your network administrator. If you don’t have a network administrator, you’ll need to find an available IP address on your network.

X-410 Firmware Settings Example

12. Once you’ve changed the IP address on your ControlByWeb device, you need to restore your computer’s network settings. Simply repeat the previous steps (1-5) to access your computer’s Ethernet network settings and restore them to their previous state.

13. You can now access your ControlByWeb device by visiting the new IP address. To change its settings, remember to add /setup.html after the IP address. Now is a good time to change your password, set up your I/O, and add control and alarm logic.

2.15.2   Method 2: Assign a Temporary IP address to the 400 Series module

This option (arp ping) is used to TEMPORARILY assign an IP address to the module without the need to change the IP address of the configuration computer. The module will use this IP address as long as power is maintained. Once power is lost, the module will use the IP address assigned in the setup page and not the temporary address assigned here. Make sure that the module and the configuration computer are connected to the same network. Since ARP is non-routable, this will not work through routers or gateways.

Microsoft Windows Instructions

1. Open a Command Prompt (select START, then RUN, then type “cmd”).

Note: For Vista, 7, 8, and 8.1, the Command Prompt should be run as administrator (select Start, then type “cmd” and right click on “cmd” and select “Run as administrator”).

2. Type:

arp -s {new IP address} {serial number of the ControlByWeb device }

Note: IP address format is xxx.xxx.xxx.xxx. The serial number can be found on a label on the device board. The format is ss-ss-ss-ss-ss-ss.

3. For example, to set the module (with serial number 00-0C-C8-01-00-01 ) to 10.10.10.40 the following command would be used:

arp -s 10.10.10.40 00-0c-c8-01-00-01

4. Next, type:

ping -l 102 {new IP address}

For example, if the new IP address is 10.10.10.40, the following command would be used:

ping -l 102 10.10.10.40

5. Proceed with the module’s setup in Section 3.

Once setup is complete, it may be necessary to clear the ‘arp’ cache to configure additional ControlByWeb devices. This is necessary because each device has the same default IP address, but a different unit serial number (MAC address). Clearing the arp table can be done by typing arp -d in the command prompt window.

Linux/Unix Instructions

1. Open a terminal and change to root user (su -, then enter root password).

2. Type:

    arp -s {new IP address} {serial number of the ControlByWeb device }

    Note: IP address format is xxx.xxx.xxx.xxx. The serial number can be found on a label on the device board. The format is ss:ss:ss:ss:ss:ss.

    For example, to set the module (with serial number 00-0C-C8-01-00-01) to 10.10.10.40 the following command would be used:

    arp -s 10.10.10.40 00:0c:c8:01:00:01

3. Next, type:

    ping -s 102 {new IP address}

For example, if the new IP address is 10.10.10.40, the following command would be used:

ping -s 102 10.10.10.40

4. Proceed with the module’s setup in Section 3.

Once setup is complete, it may be necessary to clear the ‘arp’ cache to configure additional

ControlByWeb devices. This is necessary because each device has the same default IP address,

but a different unit serial number (MAC address). Clearing the arp table can be done by typing sudo arp -d -a in the command prompt window.

Mac OS X Instructions

1.      Open a terminal.

        Note: The terminal is in the “Utilities” directory, which is in the “Applications” directory.

2.      Type:

        sudo arp -s {new IP address} {serial number of the ControlByWeb device }

Administrator password may be required.

Note: IP address format is xxx.xxx.xxx.xxx. The serial number can be found on the label on the

device board. The format is ss:ss:ss:ss:ss:ss.

3.      For example, to set the module (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:00:01

4.      Next, type:

        ping -s 102 {new IP address}

        For example, if the new IP address is 10.10.10.40, the following command would be used:

        ping -s 102 10.10.10.40

5.      Proceed with the device’s setup in Section 3.

Once setup is complete, it may be necessary to clear the ‘arp’ cache to configure additional ControlByWeb devices. This is necessary because each device has the same default IP address, but a different unit serial number (MAC address).

Clearing the arp table can be done by typing sudo arp -d -a in the command prompt window.

Section 3: Web Server and Setup Pages

The internal web server presents two classes of web pages; Setup pages and Control pages. Setup pages are used by an installer to provision and configure the module, and a limited version of Setup pages can be used by a Manager to create and manage scheduled tasks. The Control page allows the local and remote I/O to be monitored and controlled.

To access the setup pages (for admin or manager login), enter the following URL in the address bar of a web browser:

http://{ipaddress}/setup.html

For example, using the default IP address, enter:

http://192.168.1.2/setup.html

To access the Control Page, enter the following URL in the address bar of a web browser:

http://192.168.1.2

To access any web pages over an encrypted connection replace http with https. For example:

https://192.168.1.2/setup.html

https://192.168.1.2

Before accessing any setup page, the browser will request a username and password. The modules support various levels of user authentication with different permissions to the setup pages. For a description of Administrators, Managers and Users see General Settings Tab > PASSWORDS. The Administrator username is admin and the default password is webrelay (passwords are case-sensitive). For Manager access the username is manager and the default password is webrelay. No password is required by default to access the control page.

The setup pages are divided into six sections. Sections with a ▼ symbol can be expanded to reveal other related settings. When using the Setup Pages, you must click the Submit button at the bottom of a page if you have made changes to a setting on the page.

3.1  Setup Strategy

To configure the module, follow these basic steps (each of these steps will be discussed in more detail in the next sections):

Step 1: Edit the Network settings to make the module accessible on your network (IP address, gateway and DNS Server IP addresses, etc.). Also setup any email addresses that will be needed for alarms and messages. The device must be power cycled for these settings to take effect.

Step 2: Add any external devices that should be monitored and/or controlled from the module.

Step 3: Name and configure the I/O resources (i.e., relays, inputs, registers, timers, etc.) under the I/O Setup menu.

Step 4: Define any control logic (tasks) or Basic scripts under the Control/Logic menu. Finally, setup and configure the Control Page under Monitor & Control to show the information and control buttons needed for your specific application.

Step 5: View and test the Control Page where you can monitor your local and remote I/O and experiment with any buttons or controls. Test for proper operation of email/text messages and alarms.

3.2  General Settings Tab

The General Settings tab is a collection of menus for configuring the IP network settings, email server settings, device configuration backup and restore features, etc.

3.2.1   General Settings Tab > GENERAL INFORMATION

This is the initial page that is displayed when “/setup.html” is entered into the address bar of the browser. It displays the part number, firmware revision, and serial number of the unit. The optional latitude and longitude settings are used for calculating sunrise and sunset times for Scheduled Tasks. A global setting selects the temperature units. (Used for remote temperature sensors.)

Part Number

This displays the full model number of the module.

Firmware Revision

This is the current product revision of the device’s firmware.

Serial Number

This is the serial number of the module. The serial number is also the MAC address.

400 Series General Settings Info Page

Vin Voltage

This is the voltage on the +Vin power input terminal. If the module is powered from a battery, this value will show the battery voltage.

Internal 5V Voltage

This diagnostic displays the voltage of the internal 5V power rail. It should be 5.0V ±.25V.

Network Interface In Use (Cellular Devices Only)

This displays which network interface (Ethernet or Cellular) was used to retrieve the General Information setup page.

Latitude & Longitude

The optional latitude and longitude settings are used for calculating sunrise and sunset times for

Scheduled Tasks. This is entered in degrees.decimal degrees format (does not use minutes and seconds). North Latitude is positive and South is negative. East of the prime meridian is positive and West of the prime meridian is negative.

Temperature Units

This global setting sets the temperature units of Fahrenheit, Celsius, or Kelvin for all temperature sensors, both local and remote (Some ControlByWeb devices do not have a 1-Wire bus for local temperature sensors; however, they do support remote 1-Wire sensors).

3.2.2   General Settings Tab > NETWORK SETTINGS

The network parameters are set on this page. Configure the network settings to make the module accessible on your network. The module must be power-cycled (power disconnected, then reconnected) before new network settings take effect.

400 Series Network Settings Info Page

Use DHCP (Dynamic Host Control Protocol)

This option allows DHCP to be enabled or disabled. If this option is set to Yes, the module will request an IP address from the DHCP server each time it is powered on. The default setting is No (this is recommended for most installations). If DHCP is set to Yes, the Network page must be submitted and the module must be rebooted before an IP address will be assigned. Once the module is assigned an IP address by the DHCP server, the new IP address can be found through the list of clients kept by the DHCP server.

Brief Notes About DHCP: All devices on an IP network require an IP address. This is a unique address that identifies each device on the network. DHCP is a mechanism that automatically assigns an IP address to a computer (or other device) when it is connected to a network. This eliminates the need to manually enter the IP address. When a computer is connected to the network, another device on the network called a DHCP server detects the presence of the computer or device and dynamically assigns an IP address. On many small networks, the DHCP server is built into the router.

DHCP works well for “client” devices such as computers, but is not ideal for servers. This is because servers usually don’t initiate communications with other devices, but rather they wait for a request from “clients.” To make this request, the client 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, servers usually use an IP address that is fixed and does not change. The module is a server and manual IP address assignment is usually recommended.

IP Address

Enter the IP address for the module in this field. The IP address is specific to the network where the module will be installed, and must be obtained from the network administrator. For more information on IP addresses and remotely accessing the module over the Internet, see Appendix C: Accessing the Device Over the Internet. The default setting for this field is: 192.168.1.2

Subnet Mask

The subnet mask defines the size of the local network. This can be obtained from the network administrator. For additional information about sub-netting and IP networking, many tutorials are available on the Internet. The default setting for this field is: 255.255.255.0

Gateway

This specifies the IP address of the gateway router. This can be obtained from the network administrator. The default setting for this field is: 192.168.1.1

Preferred DNS Server:

The IP address of the Primary DNS server is specified here. When DNS services are required, this is the address that will be used. The default setting for this field is 192.168.1.1

This field is only required when the following options are used:

Remote ServicesWhen server is specified by name and not IP address.
Sync time clock with remote NTP serverWhen server name is specified by name and not IP address.
Email ServerWhen server name is specified by name and not IP address.
SNMP ManagerWhen the server for receiving traps and notifications is specified by name and not an IP address.
Remote DevicesWhen remote device (such as for use as a remote relay) is specified by name and not IP address

Alternate DNS Server

This field is used to specify the IP address of a Secondary DNS server. This is used when the module requires DNS services and the preferred DNS server is not available. The default setting for this field is 192.168.1.1

HTTP Port Enabled

This option enables or disables access to the web server without encryption. For high security applications the HTTP port should be disabled to limit access to only encrypted connections on the HTTPS port.

HTTP Port

The TCP port used for unencrypted HTTP communications with the module is specified here. The default setting for this field is 80, which is the standard HTTP port. It is recommended that the port be left unchanged unless the user has an understanding of TCP/IP and ports. For more information on TCP ports and IP addressing see Appendix C: Accessing the Device Over the Internet.

HTTPS Port

The TCP port used for encrypted HTTPS communications. It is recommended not to change this port. When requesting a web page using https://192.168.1.2/setup.html, the web browser will automatically use port 443. If this port is changed to 9000 for example, the HTTPS port will have to be specified in the request https://192.168.1.2:9000/setup.html

Upload/View SSL Certificate

By default, the module comes with a previously generated SSL Certificate that is used for encrypted HTTP communications. The default SSL Certificate can be replaced by clicking on this link, choosing the new Certificate file (PEM format), and uploading the file. SSL Certificates are preserved, even when resetting defaults and updating firmware.

Note: Supports 1024-bit and 2048-bit encryption.

Upload/View SSL Key File

By default, the module comes with a previously generated SSL Key that is used for encrypted HTTP communications. The default SSL Key can be replaced by clicking on this link, choosing the new Key file (PEM PKCS#1 format), and uploading the file. SSL Keys are preserved if the firmware is updated or the module is reset to its default settings.

There are various programs that can be used to generate self-signed certificates and keys. When generating the key, the program must either generate the key in PKCS#1 format, or provide a way to convert it to the PKCS#1 format in order for the module to use it.

One such program is openssl. Newer versions of openssl generate keys using the PKCS#8 format. Older versions generated keys using the PKCS#1 format. A visual inspection of the key file can be a good indicator of the format of the key. PKCS#1 keys start with “ —–BEGIN RSA PRIVATE KEY—–”. PKCS#8 keys start with “—–BEGIN PRIVATE KEY—–”. The following command can be used to generate a key and certificate for use with the module:

       openssl req -newkey rsa:1024 -nodes -keyout domain.key -x509 -days 365

   -out domain.crt

If the format of the key is PKCS#8, the following command will convert it to PKCS#1:

       openssl rsa -in domain.key -out domain_PKCS1.key

After executing the previous commands a key named domain_PKCS1.key and certificate named domain.crt will exist.

3.2.3   General Settings Tab > ADVANCED NETWORK SETTINGS

400 Series Advanced Network Settings Info Page

CORS Origin

CORS stands for Cross-Origin Resource Sharing. By default web pages rendered in a web browser can only request other web pages from the same server, not a server at another domain or IP. This is a security feature. To allow such requests to an X-400 Series device, enter the protocol, domain, and port of the remote server that should be given access. For example, to allow the www.ControlByWeb.com site direct access to web pages on the X-400 Series device, enter http://www.ControlByWeb.com in the CORS Origin field. If using HTTPS instead of HTTP, enter https://www.ControlByWeb.com.

Leaving this field blank, the default, will disable cross origin web requests to the device. Entering an asterisks (*) will allow any remote service to send direct requests for resources.

MTU

MTU is the Maximum Transmission Unit network parameter. This defines the max size, in bytes, of the TCP packets sent out from the device. The valid range is 256 to 1476 bytes. This normally can be left alone, but there are some circumstances where it might be beneficial to change it. One of these circumstances is when the device is to be used over a VPN (virtual private network). VPN’s add extra information to TCP packets, if the new packets are too big to physically travel across the network (greater than about 1500 bytes) then the packets will be split up. This causes problems for some firewalls and those firewalls will discard the packets. To fix this, the MTU can be adjusted until the TCP packets do not get split up. Some cellular data networks use smaller packet sizes and MTU adjustment may be necessary.

MODBUS (TCP/IP Slave)

MODBUS/TCP slave service can be enabled or disabled. This setting is ONLY used to enable/disable Modbus TCP/IP slave functionality only and does NOT control the RS-485 Modbus master functionality on the X-404 module. Modbus is a messaging structure protocol used in industrial control and automation. It is an open protocol and offers 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. (See Section Modbus/TCP (slave) for more information on using the module on a Modbus network.)

Note: Modbus communications are disabled whenever the User password is enabled because Modbus/TCP does not provide a mechanism for password protection.

The modules function as a Modbus slave. Host devices, such as PLCs, open a connection with the module on port 502 and then sends requests to read or set I/O states, or sensor values. When the module receives a command, it performs the desired function and returns a response.

Modbus Port

This specifies the port used for Modbus/TCP communications with the module. By default this is set to port 502 which is the standard Modbus port. It can be set within the range of 1 to 65535.

Endianness

32-bit data is treated as two individual, 16-bit words using IEEE 754 floating point format. Floating point format is used for all analog sensors, both local and remote. If Big is selected, the module will use big-endian architecture, and the most significant 16-bit word (big end) is sent first. If Little is selected, then the module will use little-endian architecture, and the least significant 16-bit word (little end) is sent first. The default setting is Little (little-endian). For example, in little-endian format, a 32-bit floating point number represented by ‘1234 ABCD’ is sent as ‘CDAB 3412’.

Modbus Address Table

The module has a default Modbus address table with addresses for the local I/O and Vin. As resources such as Registers, and remote I/O are added, additional Modbus addresses are automatically created. Use this tool to view the current Modbus address assignments. The addresses are assigned when the I/O is added and cannot be customized except by deleting the I/O and changing the order in which they are added.

To interpret the Modbus Address Table, find the I/O resource in the left-most column. Then follow the line across to the column of interest. All I/O resources have a corresponding holding register pair for reading the values. This holding register address is listed in the IO column of the table and is interpreted as a IEEE-754 floating-point value. The number in the cell is the Modbus address for the given data type (or starting address in the case of floating point numbers). On the module, all holding registers are read and written as pairs. This is because Modbus registers are 16-bits wide and the data types for reading the registers are floating point and require 32-bits. The number listed in the table is the starting address and the corresponding register immediately follows it.

This example table shows the Modbus addresses of the I/O resources and a configured register.

400 Series Advanced Modbus Table Info Page

This images shows Modbus address examples for the X-418. Other products tables will differ depending on the device’s I/O.

Remote Services

Remote Services allows internet access to a device which is installed behind a network router, without the need to setup port forwarding in the router. Typically, when Remote Services is enabled it is used to access the device through our ControlByWeb.cloud service rather than connecting directly to the device.

Remote Services has three main benefits:

First, the web server does not need to know the IP address of the module. This means that the module can get its IP address dynamically from a DHCP server, simplifying the installation.

Second, since the connection from the module is outgoing, rather than incoming, the local router on the network where the module resides does not need to be configured to forward ports. This simplifies the installation. Since the router configuration is not modified, the risk of compromising security on the local network is eliminated. For more information about the Remote Services see Section Using an External Web Server.

Third, connecting to ControlByWeb devices through the ControlByWeb.cloud service allows users to take advantage of additional features and services that are offered on the cloud service such as custom user interfaces, viewing multiple devices at that same time, and providing alerts to the user when the connection goes down.

400 Series Remote Services Info Page

Enable

Remote Services can be enabled or disabled. If Yes is selected, Remote Services will be enabled as soon as the Submit button is pressed and module will immediately attempt to make a connection with the remote server (power cycle not required). Once a connection is established, the connection will remain until it is disconnected by the remote server. By default, Remote Services is configured to connect to the ControlByWeb.cloud service. The default setting for this field is No.

Version

Previous ControlByWeb products supported version 1 of remote services. Choosing version 1 will allow devices to connect to third-party remote services servers. Version 2 of remote services adds some enhancements to the remote services protocol including encryption and client/server authentication. Version 2 is used with the ControlByWeb.cloud service.

Certificate Request Method

Remote Services version 2 use certificates and keys to provide a secure connection between the X-4xx modules and the server. Certificates are created on the ControlByWeb.cloud server and must

be transferred to the module for secure communications. There are two methods that can be used to retrieve the certificates and key from the ControlByWeb.cloud service. First, the username and password of the ControlByWeb.cloud service account can be used. Second, a temporary token can be generated on the ControlByWeb.cloud server by the account holder and copied to the module. If a username/password or certificate request token is present when the setup page is submitted, the module will request the certificate, ca, and key from the cloud server. Once the certificate, ca and key are successfully retrieved, the username/password and certificate request fields will be cleared out so those fields will be blank.

Cloud Username/Password

To obtain the certificate using the method, enter the username and password of the cloudservice account.

Certificate Request Token

This method is useful for installations where products are installed by someone other than the owner of cloud account. In this case, the owner of the cloud account can generate a Certificate Request Token from the ControlByWeb.cloud website. That token can be copied, and given to the installer rather than the username and password to the account. The installer would enter the token in this field on the module to setup the cloud connection. The installer can use this token for a fixed time period (12 hours). The installer willbe able to connect modules to the account but he/she will have no access to the account.

Advanced Features

400 Series Remote Services Advanced Features Info Page

The following features do not generally need to be changed, especially when using the device with the ControlByWeb.cloud service. They can be changed if the device is used with a custom service.

Server Name/IP Address

Specify the name or IP address of the Remote Services server here. If the IP address is specified, enter it in this format aaa.bbb.ccc.ddd. For numbers that are less than 100, preceding zeros should not be included (for example, enter 80 rather than 080). This field can be up to 40 characters long, the default setting is: devices.controlbyweb.cloud

Server Port

Enter the TCP port used for the Remote Services server. This can be set within the range of 1-65535. The default setting for this field is 8000.

Connection String

This text is sent to the Remote Services server when the connection is established. This string should include any information required by the server for connection. For example, it may include an ID number, customer number, password, etc. The format is entirely dependent upon the server requirements. This field can be up to 80 characters long. By default this field is left blank, as the ControlByWeb cloud service does not use it.

Connection Interval

This field specifies the periodic interval in which the module attempts to connect to the remote server, or if the module is already connected, it is the interval in which it sends the connection string followed by the current state of the device. This field can be set within the range of 1 to 60 minutes. The default setting for this field is 1 minute.

Certificate Server Port

The certificate server is a server that has been configured to deliver the Client Certificate, Key, and CA when requested by the module. These certificates and key are required for the module to connect to the cloud service. This field specifies the port used to communicate with that server.

Upload/View Client Certificate

Uploads a client certificate that will be used for authenticating the module to the cloud service.

Upload/View Client Key

Uploads a client key that will be used for encrypting the module’s communications with the cloud service.

Upload/View Client CA

Uploads a CA that has been used to generate the client certificate and key. The module will use this certificate to verify that the server it has connected to is the server that it expects to connect to.

SNMP AGENT

The SNMP agent is the server running on the module responsible for receiving SNMP requests and returning SNMP responses. SNMP Managers are remote servers that the module can send SNMP Trap and Notification messages to. The Agent is always enabled when SNMP is enabled. The SNMP Managers can be enabled/disabled separately. When using SNMP V3, the module supports the User-based Security Model (USM).

400 Series SNMP Settings Info Page

SNMP Enabled

SNMP (Simple Network Management Protocol) can be enabled or disabled. The default setting for this option is No. (See SNMP at the end of this section for more information.)

SNMP Version

The module supports versions V1, V2c, and V3. This option allows choosing what version of SNMP will be used, and will determine what SNMP options are presented. The module will only respond to SNMP requests that use the selected SNMP version.

Agent Settings:

Agent Port

When SNMP is used, this field is used to specify the SNMP port that the module’s SNMP Agent listens on. The default setting for this field is 161.

Agent Read Community

The read community string is used for SNMP V1 and V2c requests. It is required to read I/O on the device using SNMP V1 or V2c.

Agent Write Community

The write community string is used for SNMP V1 and V2c requests. It is required to write I/O on the device using SNMP V1 or V2c.

Notification Retries

When sending notifications, this field defines how many attempts the module will make to send the notification to the SNMP Managers. Notifications differ from Traps in that a response is expected back from the SNMP Manager.

Notification Timeout

When sending Notifications, this field defines how many seconds the module waits for a response to a previously sent notification before attempting to send the notification again.

Manager Settings:

Manager Enable

An SNMP Manager is the server intended to receive traps and notifications from the module. The module supports sending traps and notifications to two different SNMP managers. The default setting is No.

Manager Hostname/IP

This field is used to specify the hostname or IP address of the SNMP manager. The default setting for this field is 192.168.1.15

Manager Port

This field is used to specify the SNMP Trap or notification port of the SNMP manager. The default setting for this field is 162.

Manager 1 Community

This field is used to defined the Trap/Notification community string used by the SNMP Manager for SNMP V1 and V2c. The SNMP manager will not accept the Trap/Notification without a correct community string.

MIB File

This button generates the Management Information Base (MIB) used for managing the entities in a communication network associated with the SNMP protocol. The file will be automatically generated and downloaded. This file will change as the I/O configured on the device changes or as the SNMP version changes.

SNMP V3 Security Settings:

The following settings appear when the SNMP version is set to Version 3. These settings configure the authentication and privacy protocols used by SNMP V3 User-based Security Model (USM). The Agent, and both SNMP Managers each have their own set of USM settings. When SNMP V3 is selected, the community string settings disappear and are not used. They are replaced by the following settings.

      Username

      This field defines the security username.

      Auth Protocol

      This field defines the authentication protocol used: None, MD5, SHA, SHA224, SHA256.

      Auth Password

      This field defines the authentication password.

      Priv Protocol

      This field defines the privacy protocol used: None, AES128, AES192, AES256.

      Priv Password

      This field defines the privacy password used.

SNMP Notes: Simple Network Management Protocol (SNMP) is used to manage and administer network devices. The module supports SNMP V1, V2c, and V3 and can be configured here. Using SNMP, the I/O states of the module can be read as well as some basic information about the module. See Section SNMP Requests, Objects and Community Strings for information about how to request information from the module using an SNMP manager.

IP Filtering

IP filtering can be enabled or disabled. IP filtering is used to restrict incoming network connections to only specific IP addresses. If a connection comes in to the module that is not in the range of allowable IP addresses, the connection is terminated. The IP filter only applies to incoming connections and not to outbound connections such as those to DNS servers. The module allows for two different ranges to be defined. If one of the ranges is not needed, the IP address in each of the three fields for a given filter must be 0.0.0.0. IP filter settings only take effect after the module is power-cycled.

400 Series Advanced IP Filtering Settings Info Page

Filter Range

The IP addresses within the defined filter range are allowed to communicate with the module. IP addresses outside the ranges defined are rejected. The first field is the start address, the second field is the end address.

3.2.4   General Settings Tab > EMAIL SETTINGS

Email Notification Description

The module can be configured to send messages to up to eight email addresses when certain events occur. Tasks to send email messages when events happen are set up under under the Control/Logic Tab > TASK/FUNCTIONS tab. Events that can trigger email messages include local and remote I/O changes, Vin changes, and much more. In addition, email messages can be sent under the command of BASIC scripts.

When an email message is sent, it looks similar to the the example message below:

Note: The messages will vary depending on the ControlByWeb device (X-410, X-418, X-420, etc.).

X-418 – Trigger: Condition 1 Task

Analog Input 1: 4.2 V

Analog Input 2: 2.5 VDC

Analog Input 3: 1.00 VAC

Analog Input 4: 0.001 Amps

Vin: 12.00 V

Time: 09/27/2017 15:30:00

Note: The sensor names as well as ON and OFF status text may be customized by the user/installer in the Setup Pages. The I/O names and and ON/OFF status text are assigned in the I/O setup section and are used both for the email messages and the Control Page.

Subject Line

The top line (in this example it reads “X-418 – Trigger: Condition 1 Task”), appears in the subject line of the email message. The text on the left (in the example “X-418”) is the same text that appears as the header on the Control Page. It is set in the Main Header Text field under the Monitor & Control Tab > CONTROL PAGE SETUP tab.

To the right of the Main Header Text, the word “Trigger:” appears and this cannot be changed.

To the right of the word “Trigger:”, the name of the task which triggered the email message will appear. In the example, the task is called “Condition 1 Task” but tasks can (and should) be given custom names that make more sense to users. Tasks which can trigger emails are Scheduled, Conditional, Automatic Reboot, Test Email, or Basic Script. Tasks are configured under the tab Control/Logic Tab > TASK/FUNCTIONS.

Current Status of the Analog Inputs, Vin, and Sensors

The remainder of the email message will display the same information shown on the Control Page. Fields not displayed on the Control Page will not be included in the email message. Displayed fields may be configured in the Monitor & Control Tab > CONTROL PAGE SETUP page. Alternatively, the email message can be set to “Full” or “Short” on the Email tab of the Setup pages. Setting the Email Message to “Short” will only include the subject line, which may be more appropriate for alerts that are converted to SMS text messages.

Important Note: Notification email messages are limited to 32 I/O. If the Control Page is configured to display more than 32 I/O, email notifications will contain the first 32 I/O that are displayed on the Control Page.

The Email parameters are set on this page.

400 Series Email Settings Page

SMTP Server

The name of the SMTP (Simple Mail Transfer Protocol) mail server (i.e., mail.example.com) or the IP address of the mail server (i.e., 192.10.10.10) should be entered in this field. There is no default setting for this field.

Note: If the server name is entered and not the IP address, the address of a DNS server will be required in the DNS field.

Connection Security

Select the security method used for sending the email. There are two methods used to securely transmit email messages. STARTTLS and TLS/SSL. When STARTTLS is chosen, encryption will begin after the module makes an unsecured connection to the SMTP server and negotiates TLS. When TLS/SSL is chosen, the connection to the server will be securely negotiated with the SMTP server from the beginning. Both methods are secure. STARTTLS generally requires the use of port 587 and TLS/SSL generally requires the use of port 465. No security method is also an option, and still supported by some SMTP servers. This method generally uses port 25.

Server Port

This field is used to specify the SMTP Mail Server Port. The default setting is 25, which is the standard SMTP port. This port will generally be different if a connection security method is chosen.

User Name (If Required)

If the SMTP mail server requires authentication, the user name must be entered here. There is no default setting for this field.

Password (If Required)

If the SMTP mail server requires authentication, the password must be entered here. There is no default setting for this field.

Return Email

The module itself will not receive email messages, but when the module sends email messages, it must include a return email address. This field is used to specify the return email address. Note that although the module will send email messages to any email address specified in this field, some email filters (spam filters) will not allow messages through that include an invalid email address. There is no default setting for this field.

Email 1 to Email 8

Enter the email addresses of up to eight recipients. Email notifications will not be sent until tasks are created to send them.

Email Message

Choose either “Full” or “Short” email formats. Full sends email messages with all visible fields on the Control Page. Short sends messages only showing what triggered the email.

Send Test Email

This button sends a test email to the first email address in the email list using the currently configured network and email settings. By pressing this button, the settings are automatically submitted, and then a progress window will pop-up and display the result of the test email:

  • Success
  • Failed DNS Lookup
  • No Response from DNS server. Check DNS addresses, Power Cycle Device, etc.
  • Failed
  • Bad Username/Password
  • Missing recipient email address(es)
  • Server Address/Hostname does not exist or is misspelled
  • Server Address/Hostname is blank
  • No Response from SMTP server. Check server address and security/port combination

3.2.5   General Settings Tab > PASSWORDS

The module requires passwords to access specific resources. The passwords can be changed on this page. Passwords must be 6 to 18 characters, both alphabetic and numeric characters are recommended. A hide/show check-box selects if the password will be shown. When a password is changed, it must be entered twice for verification. If the password is not entered identically in both fields, the password will not be changed.

Administrator

Administrators have access to all Setup, Task, and Control pages. This access privilege is normally used by a system integrator or installer to setup I/O, control logic and user interface. The Administrator username is admin (all lower case). The default password is webrelay (all lower case). To access these pages go to http://{ipaddress}/setup.html

Manager

Managers have access to Tasks and Control pages. This access privilege can be used for example, to allow a door access schedule to be changed for a holiday. A Manager cannot change network settings, I/O, or control logic. The Manager username is manager (all lower case). The default Manager password is webrelay (all lower case). Manager access can be enabled or disabled. When a manager logs into the Setup pages, they will receive a subset of the menu options allowing them to edit Scheduled Tasks and view the Control pages.To access these pages go to http://{ipaddress}/setup.html

400 Series Password Settings Page

User

Users have access privilege to the Control Page only. This access privilege is for users and operators to monitor sensors or control outputs that are on the Control Page. The password access for Users can be enabled or disabled. When this field is set to Yes, a password will be required to view the Control Page. The default setting for this field is No. The User username is user (all lower case). The default User password is webrelay (all lower case). To access these pages go to http://{ipaddress}

Note: Since Modbus has no provision for passing passwords, Modbus will be disabled if the Control Page password is enabled.

Device PSK

The Device PSK is a pre-shared key used by other ControlByWeb devices when communicating with the module securely. When adding a remote ControlByWeb device to a module, that device’s preshared key is asked for during the configuration. This is where that PSK is defined. Note that not all ControlByWeb devices support use of PSK.

The PSK is a 32-byte hexadecimal key with valid characters being a-f and 0-9. Anything can be used as the devices PSK as long as it is 32 bytes long and contain only valid characters. The Generate PSK button can be used to request the module to generate a secure, random PSK. This is the preferred way to generate the PSK. Once generated, a new PSK need not be generated unless the old one has been compromised. A new PSK is generated when the device is reset to factory defaults.

3.2.6   General Settings Tab > DATE & TIME

The module uses the time of day for scheduled events, such as turning local/remote I/O on or off at scheduled times, and for logging other local/remote I/O (a time stamp is included with each logged event). The time is stored and displayed in 24-hour time format. The module has a capacitor-backed, real-time-clock circuit that will sustain the time for several days in the event of a power failure.

400 Series Date & Time Settings Page

Current

This is the current date and time maintained in the module. The time is stored and displayed in 24-hour format.

Set:

This drop-down list offers two options for setting the time: Manually or Sync with NTP server.

The options that follow this field will change based upon how this option is set.

ManuallyRequires the user to enter the time and date.
Sync with NTP serverAllows the user to set the clock automatically by using an NTP (Network Time Protocol) server.

Manual Time Configuration

Date

The current date is entered by selecting the month, day, and year using the drop-down boxes.

Time (24 Hour Format)

Enter the time as HH:MM:SS. (HH represents hours in 24-hour format [00-23], MM representsminutes [00-59], SS represents seconds [00-59].)

UTC Offset

World time zones are defined as an offset from Universal Time (GMT). It is common for many servers and data loggers to use GMT as their official time, even when they are not located within theGMT time zone. The default value for this field is -7 (Mountain Standard Time). For convenience,the time can be converted to local standard time by entering the offset here. This manual cannotinclude the UTC Offset for all parts of the world, but the offset for GMT time and the four major US Time zones are listed here.

GMT Time: 0

Eastern Standard Time: -5:00

Central Standard Time: -6:00

Mountain Standard Time: -7:00

Pacific Standard Time: -8:00

SYNC With NTP Server

NTP Host Name

This field is used to specify the name or IP address of the NTP server. If a name is specified, aworking DNS server address must be entered into the Network settings. If the IP address isspecified, it should be entered in the following format aaa.bbb.ccc.ddd where each of the lettersrepresents a number between 0 and 255. This field can be up to 40 characters. There is no defaultvalue for this field.

Many NTP Internet servers are available. In addition, many desktop computers will function as anNTP server (both Mac and PC). If a desktop computer is used, firewall settings may need to beadjusted to allow for NTP communications on UDP port 123.

Public NTP servers can be found at www.pool.ntp.org. Some of these are listed below.

US Servers (http://www.pool.ntp.org/zone/us):

0.us.pool.ntp.org

1.us.pool.ntp.org

2.us.pool.ntp.org

3.us.pool.ntp.org

North America (http://www.pool.ntp.org/zone/north-america):

0.north-america.pool.ntp.org

1.north-america.pool.ntp.org

2.north-america.pool.ntp.org

3.north-america.pool.ntp.org

Europe (http://www.pool.ntp.org/zone/europe):

0.europe.pool.ntp.org

1.europe.pool.ntp.org

2.europe.pool.ntp.org

3.europe.pool.ntp.org

Australia (http://www.pool.ntp.org/zone/au):

0.au.pool.ntp.org

1.au.pool.ntp.org

2.au.pool.ntp.org

3.au.pool.ntp.org

South America (http://www.pool.ntp.org/zone/south-america):

0.south-america.pool.ntp.org

1.south-america.pool.ntp.org

2.south-america.pool.ntp.org

3.south-america.pool.ntp.org

Africa (http://www.pool.ntp.org/zone/africa):

0.africa.pool.ntp.org

1.pool.n tp.org

2.pool.ntp.org

NTP Sync Interval

This option allows the user to specify how often the time on the module will be synchronized with1 the time server. When the Submit button on this page is pressed, the module will immediately synchronize with the time server. If Daily, Weekly, or Monthly options are selected, the module will thereafter re-synchronize with the time server at the period interval specified starting at 12:00 AM (00:00).

To prevent multiple ControlByWeb devices from overwhelming the NTP server at power on, the exact time the NTP Request occurs is 12:00 AM (00:00) plus the minute equivalent of the last two digits in the models serial number. For example, if the last two digits in the model’s serial number were -09, the NTP Request will occur 9 minutes after 12:00 AM. The default value of this setting is Once (the unit will immediately sync with the NTP server, but will not automatically sync again).

Sync on Power Up

When this option is set to Yes, the module will be synchronized with the time server each time it is powered.

Note: If the module will lose power on a frequent basis, it may be beneficial to set this option to No. Some servers are configured to dis-allow access from client devices that excessively request their services. The default value of this setting is No.

Daylight Savings

Enable

Daylight Savings can be enabled or disabled. The default setting is Yes.

In many parts of the United States and in some other countries, the time is shifted forward by one hour during the summer months. This is an effort to conserve energy by making the daylight last longer into the evening hours. If this option is set to Yes, the time on the module will automatically be shifted forward by one hour between the hours of 12:00 AM – 5:00 AM on the Daylight Savings Start date set below, and it will shift back to standard time between the hours of 12:00 AM – 5:00 AM on the Daylight Savings End date set below. The time change is made at a random time within the previously mentioned, five-hour time frame, in order to prevent multiple devices from simultaneously requesting a time and overwhelming the NTP server.

Note: When daylight savings time adjustment is enabled, Scheduled Tasks will be adjusted for the new time. Logged data includes a time stamp based upon the current time in the device followed by DST when the device is in daylight savings and STD when it is not. To avoid confusion, many servers and data loggers are set to remain on GMT time and do not shift for daylight savings.

Daylight Savings Start Date/Time

This is the date and time that daylight savings will start. Note that on this date, between the hours of 12:00 AM – 5:00 AM, the current time will be shifted forward by one hour (i.e. the time will jump from  12:02 AM [00:02] to 1:02 AM [01:02]). By default this is set to the 2nd Sunday in March which is the date used in the United States.

Daylight Savings End Date/Time

This is the date and time that daylight savings will end. On this date, between the hours of 12:00 AM – 5:00 AM, the current time will be shifted backward by one hour (i.e. time will jump from 12:02 AM [00:02] to 11:02 PM [23:02] the day before). By default this is set to the 1st Sunday in November which is the date used in the U.S.

3.2.7   General Settings Tab > BACKUP/RESTORE

Use these tools to backup the settings (excluding scripts and SSL Certificates) on this device, or to copy settings from one device to another. This is useful for “cloning” or copying devices, or to maintain a backup copy of the settings.

400 Series Backup/Restore Settings Page

Import Settings File

To import settings from an external file, first click the Browse button and select the desired settings.txt file on your computer. If Use Default Network Settings is checked, any network settings in the file are ignored and the network settings are forced to the default state. If Use Default Password is checked, the Administrator password in the file is ignored and the Administrator password is forced to the default state. Click the Import Settings button to import (load) the settings from the selected file.

Export Settings File

Click the Export Settings button to export all of the current settings to a “settings.txt” file. If desired, the file can be opened and examined with a text editor. Note that BASIC scripts and SSL Certificates are not included in this settings file and should be saved separately.

3.2.8   General Settings Tab > RS-485 (X-404 and X-404C only)

400 Series RS-485 Settings Page

With the X-404 Modbus Master, these settings configure the baud rate, stop bits, and parity of the differential RS-485 bus. The most commonly used configuration is used by default.

3.2.9   General Settings Tab > Cellular Settings (Cellular Devices only)

Modules equipped with a cellular modem have an additional section for cellular settings.

400 Series Cellular Settings Page

IMEI

This stands for “International Mobile Equipment Identity” which is a serial number for the internal cellular radio modem. This will be displayed as the device is able to retrieve it from the cellular modem.

ICCID

This stands for “integrated circuit card identifier” which is the serial number for the internal SIM card. This will be displayed as the device is able to retrieve it from the cellular modem.

Signal Strength

This indicates the signal strength of the connection between the module and the cellular carrier. More specifically, this is the power level of the signal received from the carrier. It is shown in decibelmilliwatts (dBm). Levels around -70dBm or higher represent excellent signal strength and levels between -100dBm and -113dBm represent fair signal signal strength.

Registration Status

This field indicates the status of the connection between the module and the cellular network. It will indicate any of the following:

Searching for Network – The module is actively looking for a cellular network. This can takeanywhere from 20 seconds to 30 minutes. During this phase, the Cell LED on the front of thedevice will blink on and off.

Configuring Cellular Hardware – On power-up, the main processor gets information from thecellular modem, such as the ICCID and IMEI, as well as configures the cellular modem so it canconnect to a cellular network.

Registered (Connected to cellular network) – The device has connected to a cellular network and the cellular network is ready to be used. The Cell LED on the front of the device will be solid green in this phase.

Cellular Network Registration Currently Denied – Sometimes when a device is new, or a device had a recent connection to the cellular network which was not disconnected cleanly (signal loss or interference), the next attempt to connect to the cell network will be denied. On the remote end, the cellular network still thinks the device is connected and won’t allow the sim card with the same ICCID to connect to the network until the old connection is cleared. It can take up to 15 minutes for the cellular network to clear the old connection. Until then, the device will be denied registration.

This message will also be received by a device with a sim card that has not been activated. If you have not purchased a data plan for you cellular device please contact ControlByWeb.

Unknown Registration Status – There are many phases to establishing a cellular network connection. Any status message from the cellular modem that are unrecognized will be reported as ‘Unknown.’ This message, if it appears, should not last very long. If the cell modem is in an unknown state for too long, the main processor will reset it and configure it correctly.

Mode

This specifies how the cellular network is used by the device.

Cellular Off (Use wired network only)

Select this option when the cellular connectivity of the device is not needed.

Always Use Cellular

This option forces the device to use the cellular network connection for the following network services: Email, remote services/cloud connectivity, NTP, and DNS.

In this mode the web pages can still be accessed directly over the wired ethernet connection, if present. Other network services such as modbus and SNMP will still use the wired ethernet interface.

Use Cellular As Backup (When wired network fails)

When this option is selected, the module defaults to the Ethernet network. In this mode, the module will continually ping the IP or hostname specified (every “X” minutes) to check for connectivity. If the pings fail to respond, or if an outgoing message fails (such as an email alert), the module will switch to the cellular network.

When connected to the cellular network, the module will continue to try to ping through the Ethernet network. If the Ethernet network is restored, the module will revert back to the wired Ethernet.

Cellular Connection Ping Server

When the cellular network is connected, a ping will be sent to the following server periodically over the cellular network. If the device is unable to ping the server over the cellular network, the cellular network connection will be refreshed.

Cellular Ping Interval

This setting determines how often a ping will be sent over the cellular network.

Wired Connection Ping Server

When the ethernet network is connected, a ping will be sent to the following server periodically over the ethernet connection. If the device is unable to ping the server over the ethernet connection, the device will then use the cellular network for network services until the ethernet connection comes back. This is used in the cellular fail-over mode to detect when the wired Internet connection goes down.

Wired Ping Interval

This setting determines how often a ping will be sent over the wired ethernet connection.

Notification Email Address

When the wired and cellular networks go up and/or down, notification emails will be sent to the first email address on the Email setup page (Email 1).

3.3  Remote Devices / Devices Tab

The Remote Devices tab (labeled as the Devices tab for the X-400, X-400C, X-404 and X-404C) is used for all modules.

These modules can monitor and control the I/O located on up to 32 other ControlByWeb devices (including expansion modules). I/O can be directly added to the X-400 via the expansion bus, and third-party modbus sensors can be added to the X-404. This feature can be used to implement a distributed control system.

With distributed control, intelligent control devices, such as the module are placed in close proximity to the sensors, relays, motors, and valves that are to be monitored and controlled. The control devices are connected together into a control system with Ethernet communication. This means no central control cabinet is needed with long wire runs to the sensors, relays, motors and valves in your facility.

400 Series Devices Settings Page

Figure 1: The screenshot below shows a sample device list from on an X-404 module (note that the button labeled “Add Modbus Sensor” is only available on the X-404 and X-404C modules).

With Ethernet communication, the control system can accommodate applications with long distances between the devices being monitored and controlled. Each device on the bus implements a portion of the control application.

To access I/O on remote devices or sensors, first add the device or to this device list, then add and configure their I/O under the I/O Setup tab. Remote devices, expansions modules, and third-party modbus sensors appear in the Device List table on the Devices tab and can be created, edited or deleted as needed.

You can add a device to the module in two ways:

1.    Automatically: Click Find Devices – This will look for expansion modules, and other X-400 Series devices (X-410, X-418, etc.) on the network and allow you to automatically add them to the module. (On the X-404, generic modbus sensors will not be detected and must be added manually.)

400 Series Devices List Settings Page

2.    Manually: Click Add Remote Device. Depending on the Model selected in the pull-down list ▼, the available settings will change to accommodate the capabilities of the remote device. For example, only certain devices can support encrypted communications.

3.3.1   Adding Ethernet and Expansion Modules

The following settings will appear when adding expansion modules (on the X-400) and remote devices.

Device Name

This text field allows setting a descriptive device name that will be referenced throughout the setup pages. Up to 24 characters may be entered in this field. The default text is “Device 1”. Set the name to a descriptive value such as “Warehouse Lights”.

Model

Click the ▼ symbol and choose from the list of supported remote devices. When changing the device type of a previously configured device, only I/O compatible device types will be enabled.

Serial Number

The serial number of the remote device is entered here. The serial number is only required for X-400 series devices and expansion modules. The default value is 000CC8000000 The following settings will only appear for remote devices (non-expansion modules).

IP Address/Hostname

The IP address or hostname of the remote device. Up to 61 characters may be entered in this field.

400 Series Adding Remote Devices Window

Port

The TCP port number of the remote device. This must match the port (HTTP port) set in the remote device. The valid range is 1 to 65535. The default port number is 80. If TLS PSK Encryption is selected (see below), the default port number is 443.

Security Configuration

Select either Unencrypted or TLS PSK Encryption. When both devices are on the same local network unencrypted communication is usually acceptable. When devices communicate across the Internet, encrypted communication is recommended. Performance with encrypted communication will be slightly slower.

Device Control Password

This setting is shown if the security configuration is set to Unencrypted. Enter the password required to access the I/O on the remote device. This password will be the same as the ‘User’ password on the remote device.

Device PSK

This setting is shown if the security configuration is set to TLS PSK Encryption. This is the pre-shared key required to access the I/O on the remote device using encryption. The pre-shared key can be found on the Passwords tab on the remote device.

Device Admin Password

Enter the admin password for the remote device. With this password, the module will automatically add itself to the remote device’s Device List. This setting is only shown if the remote device supports this feature. This feature will only work if the remote device is connected to the Ethernet and both the Serial Number and IP address are set (above).

Remote Device Monitor and Control:

Note that this section only applies to remote devices and does not apply to expansion modules connected to the expansion bus on the X-400. Communication with newer remote ControlByWeb devices can use both event-driven and polled communication models. Older ControlByWeb devices only used polling to monitor the inputs of remote devices. This works as long as a small delay is acceptable and direct communication to the remote device is available. (No routers with port forwarding disabled, etc.) Control of relays could be instantaneous as long as direct communication with the remote device is available.

The 400 Series products introduced a mechanism that allows event-driven communications in both directions. Rather than relying on polling, I/O changes are “pushed” to other devices. This has the advantage of avoiding the latencies of the polling interval, and since the information is pushed, communications can occur through a router or firewall without the need to configure port forwarding. The mechanism is enabled by selecting Instant Send or Instant Receive communications settings. These options will only appear when communicating with devices that support this.

Standard

If this checkbox is enabled, the remote device is controlled and monitored by sending relay commands when needed and periodically polling its status. Direct communication with the remote device is required. If outside the current network, port forwarding must be configured.

Poll Interval

This option appears when “Standard” is checked. It specifies how often the local device reads the state of the remote device.

Instant Receive

If this checkbox is enabled, the remote device can instantly send specific I/O changes to the local (this) device. The remote device will push I/O state to the local device periodically and/or when triggers are set up on the remote device to do this. This checkbox basically means that this device will accept the instant send messages from the remote device.

Instant Send

If this checkbox is enabled, the local (this) device instantly pushes specific I/O changes to the remote device. The remote device can use these state changes to instantly change relays or perform other logic functions. In addition to enabling this option, triggers should be set on this local device for each I/O change that should cause the I/O state to be sent. Triggers are set up by creating tasks and setting actions under those tasks to send the I/O state. (see Control/Logic Tab > TASK/FUNCTIONS). Note that when I/O status is sent, it sends the status of ALL I/O, not just the trigger. Also note that in addition to sending the I/O status when trigger events occur, the I/O status will be sent periodically at the specified Push Interval below.

Push Interval

This option appears when “Instant Send” is selected. It defines the time period that local data is pushed to the remote device.

3.3.2   Devices > Adding Modbus Sensors (X-404 Only)

The following settings will only appear for Modbus Sensor/Devices on the X-404.

The X-404 (and X-404C) modules have a button to add Modbus sensors. This is located in the lower right of the Devices table. This brings up a popup window with the options below.

X-404 Adding Devices Window

Device Name

This text field is used to set a descriptive device name that will be referenced throughout the setup pages. Up to 24 characters may be entered in this field. The default text is “Device 1”. Set the name to a descriptive value.

Modbus Address

The modbus address (1 – 247) used to communicate with the modbus sensor. All modbus sensors on the bus must have a unique address.

  • Find Address: When only one modbus sensor is connected to the X-404, the X-404 can find the current address of the modbus sensor. The address will be populated in the Modbus Address field. This is useful for finding the current address of a modbus sensor. If multiple sensors are connected to the X-404, the lowest sensor address will be found and be populated in the Modbus Address field.

Sensor/Device Type

The X-404 has built-in support for some third-party modbus sensors and can provide additional configuration options for these sensors when identified under this setting. For third-party modbus sensors without built-in support, leave this setting at “Generic”

Poll Interval

The X-404 polls the modbus sensors at the rate or frequency specified in this field. The default value of this setting is 3 seconds.

Response Timeout

When the X-404 requests the status from a modbus sensor, this is the amount of time it will wait for a response. Some modbus sensors respond quicker than others. This information can be found in the modbus sensor’s manual. If a modbus sensor is unresponsive (and correct Modbus Address is entered above), then increasing this value will usually solve the problem.

Register Start Address

When the X-404 requests the status from the modbus sensor, it will issue a read multiple register command starting at this address. Addresses in the 40000 range will be read as “input registers” while addresses in the 30000 range will be read as “holding registers.” For example, to read temperature from a modbus sensor from the holding register at address 1000, you would enter 31000 as the start address, and 1 for the register quantity.

Number of Registers

When the X-404 requests the status from the modbus sensor it will issue a read multiple register command at the starting address and read the number of registers entered in this field. These modbus registers can then be mapped to X-404 registers by adding register I/O.

Important Note about adding modbus sensors: After sensors are added (under the Devices tab), the I/O for the sensors should be mapped to X-404 registers under the I/O tab (see I/O- >Registers). Once they are mapped to X-404 registers they can be used in control or monitoring logic, logged, or displayed on the Control Page just like any other I/O.

3.4  I/O Setup Tab

Each module supports a total of up to 64 Input/Output (I/O) resources. These can be a mix of local I/O, registers, timers, and Vin. These can also include I/O found on remote devices (relays, analog inputs, digital inputs, etc.). Fixed resources, such as the device’s local I/O automatically appear under the I/O Setup tab.

When another ControlByWeb device is added to the module (local module), the user has the option to add I/O (relays, digital inputs, analog inputs, etc.) from that device to the local module. The I/O that was selected when adding devices will automatically appear in the appropriate section under the I/O Setup tab. I/O from remote devices or sensors can be added or deleted at any time.

Once the I/O from other devices is added, it can be used just like local I/O that is built into the local module. For example, it can be used in control logic using the task builder, logged, or added to the Monitor and Control page. For more information about setup options for remote I/O types (relays, analog inputs, digital inputs, etc.), please see that device’s users manual.

If an I/O resource is deleted, any dependent task in the Task Builder, or Control Page widget which references that particular I/O is also automatically deleted.

If logging is enabled for the I/O resource which is being deleted, the I/O resource is automatically removed from the logging list and the log file is reset (a warning is shown that the log file is about to be deleted.) The log file is deleted since the log file format is dependent on that I/O being logged. If a remote device is deleted, any dependent I/O resources, Tasks, Control Page widgets, and logs are also automatically deleted.

3.4.1   I/O Setup Tab > RELAYS

This page allows configuration of all relays whether on an expansion or remote device.

400 Series I/O Setup Relays Settings Page

Click the respective Edit button to configure each relay. Expansion module relays have some settings that remote relays don’t have and vice versa.

400 Series Edit Relay Window

Relay Options

Relay Name

This text field describes the function of the selected relay. The label text appears to the left of the corresponding relay status on the Control Page and in the email message when email alerts are enabled. When later defining the control logic, logging and other settings, this label appears in the pull-down lists of relay resources. Up to 27 characters may be entered in this field. The default text is “Relay #”. Set the name to a descriptive value such as “Warehouse Fan”.

On Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the relay is On. Up to 16 characters may be entered in this field. The default text is “On”. Set the status text to a descriptive value such as “Fan On”.

Off Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the relay is Off. Up to 16 characters may be entered in this field. The default text is “Off”. Set the status text to a descriptive value such as “Fan Off”.

Device

For remote and expansion relays, this settings specifies the device that the relay is found on.

Device’s Relay #

For remote and expansion relays, this settings specifies the relay number on the device.

Relay Group

The module can group some or all of the relays into “relay groups.” Combining relays into groups provides a simple method of controlling multiple relays at once. For example, a conditional task can have an action to turn on relay group 1 that would cause all the relays assigned to relay group 1 to turn on at the same time when triggered. Each relay can still be controlled independently while assigned to a relay group. In applications where a large number of relays are used, this scheme allows one task to control all of the relays with one Action.

Local Relay Number

This number will be associated with this relay in the modulestate.xml and state.json files. If it is left unassigned, the relay will not appear in the state.xml or state.json files.

Expansion Relay Options

Power Up State:

This drop-down menu specifies the state of the relay when the module is powered up:

OffThe relay will be off upon power-up. This is the default setting.
OnThe relay will be on when power is applied to the module.
Last StateUpon power-up, the relay will return to its last state when the module was powered off.
Scheduled StateWhen the device is powered up, its state will be determined by any scheduled tasks configured to change the relay state. For example, if a scheduled task turns the relay on at Noon and another scheduled task turns the relay off at 1:00 p.m everyday, then if the device loses power and comes back on between Noon and 1:00 p.m., the relay will be on. If it comes back on any other time, it will be off.

Pulse Time

When the module receives a pulse command for the relay (through the web page or through a command), the relay will pulse for the time specified in this field. Note that when a pulse command is sent through the command interface, the command can include a pulse time which will override this value. The time is specified in seconds and can range from 0.1 seconds to 86400 seconds in 0.1 second increments. The default time is 1.0 seconds.

Note that if additional pulse commands are issued to the relay before the pulse time has expired, the relay will remain “on” and the pulse timer will be set to the full pulse time once again, extending the total “on” time.

3.4.2   I/O Setup Tab > DIGITAL INPUTS

This page is used to configure expansion module digital inputs, as well as any remote digital inputs located on other ControlByWeb devices that have been added. The digital input resources can be named and have binary (true/false) values. Digital inputs appear in tables on the digital inputs tab and can be created, edited or deleted as needed.

Each of the digital inputs can be configured for use with a 24-bit digital counter which counts the number of pulses on the respective digital input. The counters can count up to 200Hz and can be used with paddle wheel flow-meters, traffic sensors and other sensors which output pulses. The counters can be named and work similar to Registers where the counter value is accessible to Conditional Tasks, BASIC scripts and control page widgets. The counters associated with digital inputs 1 and 2 are stored in battery-backed memory and will retain their count through a power loss; however, the counters will not continue to increment while the module power is off.

400 Series I/O Setup Digital Input Window

Click the respective Edit button to configure each digital input.

Digital Input Options

Digital Input Name

This text field describes the function of the selected digital input. The label text appears to the left of the corresponding digital input status on the Control Page and in the email message when email alerts are enabled. When later defining the control logic, logging and other settings, this label appears in the digital input pull-down list. Up to 27 characters may be entered in this field. The default text is “Digital Input #”. Set the name to a descriptive value such as “Warehouse Door”.

On Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the digital input is On. The digital input is considered “on” when sufficient voltage is applied to the input. Up to 16 characters may be entered in this field. The default text is “On”. Set the status text to a descriptive value such as “Door Open”.

400 Series I/O Setup Digital Input Edit Window

Off Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the digital input is Off. Up to 16 characters may be entered in this field. The default text is “Off”. Set the status text to a descriptive value such as “Door Closed”.

Mode:

The digital input can be configured for several operating modes:

On/OffA single I/O resource with the name “name” is created, where name is the digital input name defined above. The resource has binary (true/false) values.
CounterThe digital input is configured as a digital counter which counts the number of pulses on the respective digital input. Two I/O resources are created: name and name.counter. The counter value can be scaled into engineering units and is accessible to conditional tasks, BASIC scripts, Modbus and control page widgets. The counters associated with digital inputs 1 and 2 are stored in battery-backed memory and will retain their count through a power loss; however, the counters will not continue to increment while the module’s power is off.
FrequencyThe frequency of the respective digital input is measured by counting the number of pulses that occur during a period of one second. The value is updated once each second. A single I/O resource is created in the form name.frequency. The frequency value can be scaled into engineering units and is accessible to Conditional Tasks, BASIC scripts, Modbus and Control Page widgets.

Units

Text entered here will be displayed on the right of the value when shown on the Control Page. This text does not affect the underlying value. Set the units to GPM, ea., mph, etc.

Decimal Places

The number of digits displayed to the right of the decimal point. This does not affect the accuracy of the underlying value.

Slope (Multiplier)

The counter and frequency values can be scaled into engineering units. The module reads the raw value from the counter and calculates a new value in engineering units. This scaled value is calculated using the following y=mX+b formula..

Scaled Value = Slope * Count + Offset

400 Series I/O Setup Digital Input Counter Edit Window

The calculated scaled value is used for logs, email messages, the Control Page, XML pages, and is returned when Modbus values are read.

The “slope” in the formula above is provided by the user and is entered in this field. When both the slope and offset are set to their default values (m=1 and y=0) the scaled value equals the actual count.

Offset

The offset in the formula above is provided by the user and is entered in this field. The default value for this field is 0.

Device

For digital inputs, this settings specifies the device that the digital input is found on.

Device’s Digital Input #

For digital inputs, this settings specifies the digital input number on the remote or expansion device.

Note: For remote counters, frequency, etc., the values are read from the remote device and not calculated locally.

Local Digital Input Number

This number will be associated with this digital input in the module state.xml and state.json files. If it is left unassigned, the digital input will not appear in the state.xml or state.json files.

Counter Options

Digital Input Count Mode

Increment when ONCount on the rising edge of the pulse
Increment when OFFCount on the falling edge of the pulse
Increment when input changesCount on both rising and falling edges of the pulse

Reset Count At

The counters automatically “roll over” to zero when the count reaches the value of this setting. This setting is an integer for the raw count, before any slope multiplier or offset is applied. When name.counter. is accessed by Conditional Tasks, BASIC scripts and Control Page widgets, the slope multiplier and offset are applied, and the value is a single precision, floating-point value.

Using an example to clarify, if Reset Count = 5 the counter will count as follows…

0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0

Reset Counter

This button manually resets the counter to zero.

Advanced Features

The digital inputs can be configured for several additional operating modes:

Hold Time (de-bounce): The input must remain On for this amount of time before the logic considers this input to be On. For switches and other noisy sensors, this eliminates problems with falsely detecting multiple On states before the input becomes stable. The default setting is 20ms and can be set from 0-250ms. The digital input is processed by this setting before it is applied to the on/off, counter, and frequency logic. This setting directly limits the maximum input frequency that can be measured.

Measure On-Time: When this feature is enabled, the time that the input is “on” is measured. This value will be cleared when the input changes from “off” to “on”. When the input changes from “on” to “off” the value will be frozen and can be accessed as long as the input remains “off”. The On-Time only starts counting once the debounce time has expired and continues after the input goes off until the debounce timer expires again. An I/O resource is created in the form: name.onTime

Measure Total On-Time: When this feature is selected, the accumulated time that the input is on is measured. When the input is “off,” the timer stops. When the input goes “on” again, the timer resumes. This feature is useful for example, to measure the total run time of a machine to determine when maintenance is needed. The Total On-Time only starts counting once the debounce time has expired and continues after the input goes “off” until the debounce timer expires again. An I/O resource is created in the form: name.totalOnTime.

3.4.3   I/O Setup Tab > 1-Wire SENSORS

This tab is used to configure local, expansion, and remote 1-Wire sensors (temperature, humidity, and/or other 1-Wire sensors). Up to 16 1-Wire sensors can be connected to the module. The module will automatically detect the type of sensor connected. Once added to the module, 1-Wire sensors appear in the table on the 1-Wire Sensors tab and can be created, edited or deleted as needed.

Every 1-Wire sensor comes from the factory with a unique, non-changeable address. Once the sensor is connected to the module, the module must associate a sensor name with the sensor address. You must define a sensor name and associate an address for each 1-Wire sensor. For remote 1-Wire sensors, only the device and sensor number (not address) are needed (the 1-Wire address should be configured locally on the remote device).

For example, a list of named, associated 1-Wire sensors is shown:

400 Series I/O Setup 1-Wire Sensors Window

To add a new local 1-Wire sensor, click Add 1-Wire Sensor in the local 1-Wire Sensors table.

400 Series I/O Setup 1-Wire Sensors Edit Window

Enter a descriptive name for the sensor in the Sensor Name box such as “Outdoor Temperature”. 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 email status message when email notifications are enabled. When later defining the control logic, logging and other settings, this label appears in the pull-down lists of sensor resources. This field can be up to 27 characters in length.

Connect the sensors to the bus one at a time. The procedure is to start with one sensor and add it with the appropriate sensor name by selecting the sensor address within the drop-down list. Press Submit, connect a second sensor, and press the Refresh List button. Associate the second sensor to the appropriate sensor name. Continue this procedure until all sensors are set up.

Click ▼ to see a list of the connected 1-Wire sensors. The addresses of the non-associated sensors on the bus are shown in the drop-down list together with the sensor type of each sensor. Click the Refresh button to make a fresh scan of the bus for sensors. For each sensor being added, select the appropriate address from the sensor address drop-down list. As 1-Wire sensors are added to the module, the addresses are removed from the pull-down ▼list of available addresses. The X-DTHS-P temperature/humidity probe is a composite device and has a single 1-Wire address. The drop-down list will show both a temperature and a humidity ID with the same sensor address. Select the appropriate ID (temperature or humidity) and the sensor address that matches the sensor address printed on the housing of the X-DTHS-P.

The General Settings page has a setting to select the display for Fahrenheit, Centigrade or Kelvin units. 1-Wire sensor addresses that have already been associated will not show in the list of available 1-Wire sensors.

1-Wire Options

Decimal Places

The number of digits to the right of the decimal point. This setting does not affect the accuracy of the underlying value. It is applied whenever the 1-Wire value is displayed in the Log files, ControlPages, Emails, Etc.

Local 1-Wire Number

This number will be associated with this 1-Wire sensor in the module state.xml and state.json files. If it is left unassigned, the 1-Wire sensor will not appear in the state.xml or state.json files.

Local & Expansion 1-Wire Options

Offset

If desired, an offset can be added to the 1-Wire sensor’s measurement. By default, the offset is 0.0

FinalValue = Sensor’s Measured Value + Offset

Remote 1-Wire Options

Device

For remote 1-Wire sensors, this settings specifies the device to which the remote 1-Wire sensor is connected.

Device’s Sensor #

For remote 1-Wire Sensors, this settings specifies the 1-Wire number on the remote device. (Not the address of the 1-Wire sensor.)

Sensor Type

The module can determine the type of 1-Wire sensor if it is connected directly to the device. Forremote 1-Wire sensors the sensor type must be configured for the module to know which type of sensor it is.

3.4.4   I/O Setup Tab > ANALOG INPUTS

This page allows configuration of both expansion module analog inputs and remote analog inputs (if remote devices have been configured).

X-400 series devices with local analog inputs feature a high-performance,16-bit analog data acquisition system. Each analog input can be configured separately:

400 Series I/O Setup Analog Input Window

Screenshot from the X-418. ControlByWeb devices with analog inputs will appear similarly.

Single EndedSingle-ended signals are referenced to the Gnd terminals. Each channel can be independently programmed with a ±1.28V, ±2.56V, ±5.12V, ±10.24V voltage range.
DifferentialDifferential sensors have two inputs that reference each other instead of ground. The differential mode uses two analog inputs instead of one. For example, if Channel 1 is selected for differential operation, the differential signals are connected to Channel 1 and 2. If Channel 3 is selected for differential operation, the differential signals are connected to Channel 3 and 4, and so on. The differential mode supports input ranges of up to ±20.48V; however, the absolute input voltages must be less than ±10V. For example, if Input1 is configured for differential operation and Input1 = +10V and Input2 = -10V, the measurement will read +20V. On the other hand, if Input1 = -10V and Input2 = +10V, the measurement will read -20V.
4-20mAConfigured for 0-20mA operation. Some industrial sensors output a current instead of voltage levels. The 4-20mA mode enables an internal precision 200- ohm shunt resistor (0.1%, 25ppm) and automatically configures the A/D for ±5V operation. This feature allows direct connection to 0-20mA current loop transducers. At 20mA, the maximum loop voltage across this device is 4.0 Volts (.020 x 200 = 4.0). With this setting, the voltage to current calculation ((Vin/200)*1000) is automatically made so the measurement is in units of mA.
Digital InputFor applications where digital inputs are needed, each analog input can be configured as a pseudo digital input with boolean (true/false) states. The input voltage is compared to fixed thresholds to determine a true/false state. The input is considered “true” when the voltage rises above 3.5V and “false” when it falls below 1.5V. If an analog input is configured as a “digital input”, the analog input widget on the Control Page will have appropriate setup options as a digital input.

Click the respective Edit button to configure each analog input. Expansion analog inputs have some settings that remote analog inputs don’t have and vice versa.

400 Series I/O Setup Analog Input Edit Window

Edit Analog Input Options

Input Name

This text field describes the function of the selected analog input. The label text appears to the left of the corresponding analog input on the Control Page and in the email message when email alerts are enabled. When later defining the control logic, logging and other settings, this label appears in the pull-down lists of analog input resources. Up to 27 characters may be entered in this field. The default text is “Analog Input #”. Set the name to a descriptive value such as “Wind Direction”.

Range Selection

The analog to digital converter has a programmable gain amplifier (PGA). This setting specifies the full scale range of the analog input. Settings include; ±1.28V, ±2.56V, ±5.12V, ±10.24V.

Device

The device where the remote analog input is found.

Device’s Sensor #

The analog input number on the remote device.

Decimal Places

The number of digits displayed to the right of the decimal point. This does not affect the accuracy of the underlying value.

Units

Text entered here will be displayed on the right of the value when shown on the Control Page. This text does not affect the underlying value. Set the units to Volts, mA, mph, etc.

Slope (Multiplier)

The analog value can be scaled into engineering units. The module reads the raw value (volts) from the analog-to-digital converter and calculates a new value in engineering units. This scaled value is calculated using the following y=mX+b formula.

Scaled Value = Slope * RawValue + Offset

The calculated scaled value is used for logs, email messages, Control Pages, XML pages, and is returned when Modbus values are read.

The “slope” in the formula above is provided by the user and is entered in this field. When both the slope and offset are set to their default values (m=1 and y=0) the scaled value equals the input voltage.

Offset

The offset in the formula above is provided by the user and is entered in this field. The default value for this field is 0.

Local Analog Input Number

This number will be associated with this analog input in the module state.xml and state.json files. If it is left unassigned, the analog input will not appear in the state.xml or state.json files.

Digital Input Name

This text field describes the function of the selected digital input. The label text appears to the left of the corresponding digital input status on the Control Page and in the email message when email alerts are enabled. When later defining the control logic, logging and other settings, this label appears in the digital input pull-down list.

Up to 27 characters may be entered in this field. The default text is “Digital Input #”. Set the name to a descriptive value such as “Warehouse Door”.

On Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the digital input is On. The digital input is considered “on” when sufficient voltage is applied to the input. Up to 16 characters may be entered in this field. The default text is “On”. Set the status text to a descriptive value such as “Door Open”.

400 Series I/O Setup Analog to Digital Input Edit Window

Off Status Text

The text in this field specifies the text that will be displayed in the Control Page and in email messages when the digital input is Off. Up to 16 characters may be entered in this field. The default text is “Off”. Set the status text to a descriptive value such as “Door Closed”.

3.4.5   I/O Setup Tab > ANALOG OUTPUTS (X-417 only)

This page provides configuration options for each of the five analog outputs. After making selections for a particular output channel you must click the Submit button to save your work before selecting another channel for further edits.

X-417 I/O Setup Analog Output Window

Mode

Choose the desired output range for the selected analog output channel. Available selections include 0- 5V, 0-10V, ±5V, ±10V and 0-20mA. This setting will be determined by the input range of your actuator to be controlled. In general choose the setting with the best dynamic range. For example, for an actuator with a +2 to +10V input, select the 0-10V output range. For this example, selecting ±10V would waste one half of the available dynamic range and have less resolution.

Analog Output Name

This text field is used to describe the function of the selected output channel. The text appears to the left of the corresponding output status on the Control Page. Up to 24 characters may be entered in this field. The default text is Analog Output #. You will want to change the description to a more useful value such as “conveyor speed” or “damper position”.

Units

This text field sets the engineering units for the selected analog output channel. These values appear with the corresponding analog outputs on the Control Page. You will want to change the units to V, M, Ft, KPH, % or other descriptive units. These text field settings help make the Control Page display descriptive and easy to use. The units settings are for display only and are not used in the calculations for setting the digital to analog converter.

Decimal Places

This setting determines how many digits are shown to the right of the decimal point for the data values shown on the Control Page. This setting controls only how the data is displayed and does not affect the calculations for setting the digital to analog converter.

User Input Max & User Input Min

The analog output settings are made in user friendly engineering units such as V, M, Ft, KPH, %. Internally the X-417 automatically scales the output settings with a linear Y=mX+b function before setting the digital to analog converter. The default settings are m=1 and b=0 which provide no scaling and a 1 to 1 output relationship. For example, with the default settings, setting the output to 2.0 will result in the analog output being 2.0Volts. When the X-417 is controlled via ModBus/TCP from a PLC or other device it may be convenient to leave the default settings undisturbed such that no data scaling is done in the X-417 and any math or other calculations are done in the PLC or controlling device.

If you wish the X-417 to scale and process the output settings, use the User Input Max and User Input Min fields to provide information for the internal calculations. The X-417 automatically computes the slope and offset settings with the data entered. The settings are made by entering two data points (X1,Y1) and (X2,Y2). The slope is calculated as “(Y2-Y1/X2-X1)”. The Y1 and Y2 output values must be within the range selected by the Mode setting (0-5V, 0-10V,  V,  0V and 4- 20mA). The input format is:

User Input Max: X2, Y2

User Input Min: X1, Y1

For example, a conveyor motor is to be controlled by a 4-20mA loop with 4mA=10fpm and 20mA=50fpm. Make the following settings to control the conveyor in units of feet per minute (fpm).

User Input Max: 50fpm, 20mA

User Input Min: 10fpm, 4mA

With these settings, setting the analog output to 10fpm will cause the digital to analog converter to output 4.0mA and a setting of 50fpm will result in a 20mA output. Setting the analog output to a value between 10fpm and 50fpm will result in a proportional output between 4mA and 20mA.

With another example, a damper motor is to be controlled by a 2 to 10V signal with 2V=closed and 10V=open. Make the following settings to control the damper position in units of % open.

User Input Max: 100%,10V

User Input Min: 0%, 2V

Note the data scaling can process a negative slope. To reverse the operation of the damper motor in the example above, make the following settings:

User Input Max: 100%, 2V

User Input Min: 0%, 10V

To restore the default settings so that no data scaling is done set the User Input Max to the maximum D/A output voltage and the User Input Min to the minimum D/A output voltage. Make the user input and the D/A output values the same for both data points as shown in the table below:

State at Power Up

This setting sets the analog output value when the X-417 is powered up. This value is not processed or scaled and must be within the output range of the digital to analog converter as specified by the Mode. This value remains in effect until the output is subsequently updated via the control web page, XML or Modbus communications. The default values are 0.0V if the Mode is set to one of the voltage ranges and 4.0mA if Mode is set to 4-20mA.

3.4.6   I/O Setup Tab > REGISTERS

Registers are working variables that can be changed externally through the Control Page, XML requests, or the BASIC script. Registers can allow a BASIC script to react to user input. These variables are considered to be floating point numbers, just like other variables in the BASIC script. Registers can also hold boolean information where “1”=true and “0”=false. This tab has settings for each of the configured Registers. By default, one register (register1) is pre-defined and is battery-backed such that its value is retained across power loss. Registers appear in tables on the Registers tab and can be created, edited, or deleted as needed. Up to 16 Local Registers can be created. The module can also access remote registers found on other devices.

X-417 I/O Setup Registers Window

Register Options

Register Name

Text entered here will be displayed in the left column of the control page. Up to 27 characters may be entered here. The default text is “Register 1”. This is also the resource name used in a BASIC script. When later defining the control logic, logging and other settings, this label appears in the pull-down lists of Register resources.

Decimal Places

The number of digits displayed to the right of the decimal point. This does not affect the accuracy of the underlying value.

Units

Text entered here will be displayed on the right of the value when shown on the control page. This text does not affect the underlying value. Set the units to °F, ft, mph etc.

X-417 I/O Setup Add Registers Window

Minimum Value

If this register can be changed externally through the Control Page, XML requests, or the BASIC script it is may be useful to restrict the range of the register value. For example, a thermostat set-point register can be restricted to a minimum value.

Maximum Value

If this register can be changed externally through the Control Page, XML requests, or the BASIC script it is may be useful to restrict the range of the register value. For example, a thermostat set-point register can be restricted to a maximum value.

Local Register Number

This number will be associated with this register in the module state.xml and state.json files. If it is left unassigned, the register will not appear in the state.xml or state.json files.

Local Register Options

Power Up State

At power-up the register is set to either an Initial Value (set below) or the Scheduled State. The Scheduled State will cause the Register value to be that defined by any scheduled tasks as if the power was always on.

Remote Register Options

Device

The device where the remote register is found.

Device’s Sensor #

The register number on the remote device.

3.4.7   I/O Setup Tab > MODBUS REGISTERS (X-404 only)

When Modbus sensors or devices on the RS-485 bus are added under the Devices tab and I/O from those devices is selected to add to the X-404, that I/O will appear under the Registers tab (listed as Modbus Registers). Modbus Registers, just like the registers described above, are working variables that can be changed externally through the Control Page, XML requests, or the BASIC script. The X-404 functions as a Modbus Master and can read and write registers in a Modbus slave device (sensor). The registers on the modbus sensor are accessed on the X-404 by mapping the sensor registers to local modbus registers. The example screenshot below shows the registers from two sensors (MPX probe and and Ultrasonic sensor) mapped to local Modbus Registers.

400 Series I/O Setup Modbus Window

When you add or edit a Modbus Register, the following window appears and each field is described below.

400 Series I/O Setup Modbus Edit Window

Modbus Register Options

Register Name

Text entered here will be displayed in the left column of the control page. Up to 27 characters may be entered here. This is also the resource name used in a BASIC script. When later defining the control logic, logging and other settings, this label appears in the pull-down lists of Register resources.

Device

This is the modbus sensor or device that is associated with this register.

Device’s Register #

This is the Modbus register number in the device or sensor.

Local Register Number

This is the register number that will be used for this Register in state.json, etc.

Decimal Places

The number of digits displayed to the right of the decimal point. This does not affect the accuracy of the underlying value.

Units

Text entered here will be displayed on the right of the value when shown on the control page. This text does not affect the underlying value. Set the units to  , ft, mph etc.

Minimum Value

If this register can be changed externally through the Control Page, XML requests, or the BASIC script it is may be useful to restrict the range of the register value. For example, a thermostat set-point register can be restricted to a minimum value.

Maximum Value

If this register can be changed externally through the Control Page, XML requests, or the BASIC script it is may be useful to restrict the range of the register value. For example, a thermostat set-point register can be restricted to a maximum value.

Modbus Register Data Type

Use this option to specify the numeric format of registers on the device or sensor. Options include 16 or 32 bit, signed or unsigned, or single precision float. When 32 bit formats are specified, the next consecutive register is used for the second 16 bits. Single precision floats use 32 bits.

In order for the X-404 to communicate with the modbus sensor, the correct numeric format must be selected. The selected modbus register data type tells the X-404 how to interpret the value sent by the modbus sensor. All information that is sent to the X-404 is stored as a single precision floating point number that can be a maximum whole number of ±16,777,215. Larger numbers entered into the X-404 are rounded to the closest representation available for the single precision floating point format, leading to unexpected log results.

Modbus Register Endianess

This option specifies the order of how data is stored in the registers. Specifically, big end or little end first. Options include Big-endian (ABCD) or Little-endian (CDAB)

Slope

The modbus register will be multiplied by this number. The Final Value = Measured Value x Slope + Offset. The Final Value is the number that is stored in the local register. By default the slope is 1.0 and the offset is 0 so the local register value = the measured modbus register.

Offset

This number will be added to the product of the Measured Value and the Slope. The Final Value = Measured Value x Slope + Offset. The Final Value is the number that is stored in the local register. By default the slope is 1.0 and the offset is 0 so the local register value = the measured modbus register.

3.4.8   I/O Setup Tab > VIN

The power supply voltage (Vin) to the module is internally measured and can be displayed, logged, or used in logic. This page configures the name for the Vin voltage.

Note: The module can also monitor the power supply voltage of remote devices. For POE devices, the power is provided over the Ethernet cable and the Vin+ monitor will show 0-volts.

400 Series I/O Setup VIN Window

To edit the Vin name, click Edit.

400 Series I/O Setup VIN Edit Window

Vin Options

Vin Name

This text field is used to describe the power supply voltage value. By default it is set to “Vin.” The text appears to the left of the Vin status on the Control Page. This text will also appear in email messages when email alerts are enabled. This field may be up to 27 characters long. Set the name to a descriptive value such as “Power Supply” or “Battery Voltage”.

Remote Vin Options

Device

The device where the remote Vin is found.

3.4.9   I/O Setup Tab > TIMERS

Timers are I/O resources for measuring the time between events/tasks or generating controlled delays.

The timers are essentially 24-bit down counters with a one-second resolution. Timers appear in a table on the Timers tab and can be created, edited, or deleted as needed. Up to 16 Timers can be created. The timer’s value is accessible to Scheduled and Conditional Tasks, BASIC scripts, Modbus and Control Page widgets. There are no remote timers.

A timer is started via an Action by setting it to a non-zero value. The timer counts downwards and stops when it reaches 0. When the timer reaches zero it generates a “timer expires” event. The “timer expires” events appear in the drop-down list ▼ of available Triggers for Scheduled and Conditional Tasks.

400 Series I/O Setup Timers Window

To add a timer, click Add Timer.

400 Series I/O Setup Timers Edit Window

Timer Name

This text field is used to describe the timer. By default it is set to “Timer #.” This field may be up to 27 characters long. Set the name to a descriptive value such as “Warmup Delay”.

(Note: This text appears to the left of the timer status field on the Control Page. It also appears in the pull-down lists under “Timer” resources when configuring tasks, logging, and other settings.)

Power Up Value

At power-up, the timer is set to this value. If the power-up value is something other than 0, the timer will begin to count down once the device is powered.

Trigger(s)

Scheduled and Conditional Tasks can start and stop a Timer. Once a timer is added and named in this tab, it will appear in the pull-down list ▼ of available Actions for Scheduled and Conditional Tasks. The Action can be specified to either reset the counter (stop) or to set it to a fixed value (start). Actions that control the timer are shown in the Trigger(s) field. (See example to the right for reference.)

400 Series I/O Setup Timers Delay Edit Window

3.5  Control/Logic Tab

The sub-menus under the Control Logic tab define the logic of the module. Conditional and Scheduled tasks as well as BASIC scripts are defined under this tab group.

3.5.1   Control/Logic Tab > TASK/FUNCTIONS

“Tasks” are control logic functions that perform specific things, such as turn a remote relay on/off under certain conditions or at certain times. Tasks are assigned a name, configured for a desired function, and saved. Once saved, they appear in tables on the Tasks/Functions tab and can be edited or deleted as needed.

Tasks are configured using settings and pull-down menus to define the logic function without the need to learn boolean or other programming syntax. For more complex logic functions or logic functions not supported by this tab, see Section Control Logic Tab > BASIC SCRIPT.

Up to 50 Scheduled Tasks and 50 Conditional Tasks can be created. Tasks can run once, periodically, or continually depending on its settings. Under the Control/Logic tab, you can observe all of the tasks, their start times, run modes, triggers and actions.

Scheduled tasks run at specific times. They can be configured to happen only one time, or on a repeated schedule.

Normal/Override

The Tasks/Functions tab has a status display which shows the current time of day and whether the Normal or Override schedule is running.

An Override Schedule can temporarily cause certain Scheduled tasks to stop operating (i.e., holidays), and resume normal schedules after the Override Schedule expires.

Up to 20 Override Schedules can be added.

For debug and testing, open the Control Page in another browser window (or another browser) and together with this page you can monitor which tasks are running and what they are doing in response to user input.

See Control Logic Examples

Using Tasks/Functions for examples of using Tasks for control logic.

Conditional (boolean) tasks run only if specified conditions are met (e.g., “If an input is ON then turn a relay ON.” -or- “If a temperature sensor is above 32 degrees, send an email alert and turn a relay ON.”).

400 Series Control/Logic Setup Window

3.5.1.1 Scheduled Tasks

Scheduled tasks run at a specific time and on specific days of the week (e.g. turn a light on at 08:00 on Monday through Friday – or – start/clear logging at 04:00 on the first day of the month).

Scheduled tasks can also be configured to be conditional based on specified resources.

Each Scheduled task can initiate up to three Actions. Actions are control outputs that “do” something such as: turn a remote relay on or off, send an email, send a SNMP trap, or make a data log.

Scheduled Tasks appear in a table on the Control/Logic Setup tab and can be created, edited, or deleted as needed. Up to 50 Scheduled Tasks can be created.

400 Series Control/Logic Scheduled Tasks Setup Window

To add a Scheduled task, click Add Scheduled Task.

400 Series Control/Logic Scheduled Tasks Setup Window

Task Name:

This text field is used to describe the task. By default it is set to “Scheduled Task 1”. This field may be up to 24 characters long. Set the name to a descriptive value such as “Unlock Front Door”.

Run Mode:

The Run Mode defines when the scheduled task is active. It has the following options:

AlwaysAlways active.
Normal ScheduleActive, unless overridden by an Override schedule.
Override ScheduleActive only during an Override schedule.
OffNever active (disabled).

Start Date:

Select the month, day, and year which the scheduled task is to occur for the first time using the dropdown boxes.

Start Time:

Set: Select the time of day which the scheduled task is to occur for the first time.

Sunrise: Enter the offset (HH:MM) from sunrise. Choose Before or After sunrise.

Sunset: Enter the offset (HH:MM) from sunset. Choose Before or After sunset.

Note: The sunrise and sunset times are automatically calculated based on the latitude and longitude settings made in the General Settings Tab > GENERAL INFORMATION tab.

Condition – Scheduled Task (Optional):

Scheduled tasks can optionally be controlled (enabled) based on an I/O’s state (local and remote). In order for I/O to appear in the condition pull-down menu ▼, the I/O must be first added and named in the I/O Setup tab. The scheduled task only runs if the conditional I/O state evaluates as “true” at the scheduled time.

If None is selected, no conditional logic will be evaluated when performing the task.

If a Relay resource is selected, the following conditions are available:

ONThe scheduled task runs if the relay is On
OFFThe scheduled task runs if the relay is Off

If a Digital Input resource is selected, the following conditions are available:

ONThe scheduled task runs if the input is On
OFFThe scheduled task runs if the input is Off

If a Digital Input Counter resource is selected, the following conditions are available:

Value = X.XIf the Counter value is equal to the setting, the compare is true.
Value >X.XIf the Counter value is greater than the setting, the compare is true.
Value < X.XIf the Counter value is less than the setting, the compare is true.

If a 1-Wire Sensor resource is selected, the following conditions are available:

Value ≥ X.XIf the sensor value is greater than or equal to the setting, the compare is true.
Value <X.XIf the sensor value is less than the setting, the compare is true.
DeadbandHysteresis for the compare

If an Analog Input resource is selected, the following conditions are available:

Value ≥ X.XIf the analog input value is greater than or equal to the setting, the compare is true.
Value <X.XIf the analog input value is less than the setting, the compare is true.
DeadbandHysteresis for the compare (see more details below)

If a pseudo Digital Input resource is selected, the following conditions are available:

ONThe scheduled task runs if the input is On
OFFThe scheduled task runs if the input is Off

If a Register resource is selected, the following conditions are available:

Value = X.XIf the Register value is equal to the setting, the compare is true.
Value >X.XIf the Register value is greater than the setting, the compare is true.
Value < X.XIf the Register value is less than the setting, the compare is true.
DeadbandHysteresis for the compare (see more details below)

If a Vin resource is selected, the following conditions are available:

Value ≥ X.XIf the Vin value is greater than or equal to the setting, the compare is true.
Value <X.XIf the Vin value is less than the setting, the compare is true.
DeadbandHysteresis for the compare (see more details below)

If a Timer resource is selected, the trigger is true when the timer expires (reaches 0).

Deadband

The Deadband settings prevent alarms from triggering excessively when an analog value vacillates around the trigger point.

With high alarms, the value must fall below the high alarm point minus the Deadband and then back above the high alarm point again, before the high alarm will be triggered again.

Likewise the Deadband on the low alarm requires the value to rise above the low alarm point plus the Deadband and then back below the low-alarm point again, before the low alarm will be triggered again.

For example, if the Deadband is set to 1 degree, and a high alarm occurs at 95 degrees, the Deadband ensures that once the high alarm is triggered, it won’t trigger again until the temperature first drops below 94 degrees (95 – 1).

Actions – Scheduled Task

Up to three actions can be specified for each Scheduled Task. Actions can change the state of local and remote I/O, counters, registers, and other resources. To be available in the task’s action pull-down menus ▼, the resource must be first added and named in the I/O Setup tab.

400 Series Deadband Temperature Chart

If None is selected, nothing is done when the task runs.

If Relay is selected, the following actions are available:

OnThe relay is turned on
OffThe relay is turned off
Pulse OnThe relay is turned on for the amount of time specified as the pulse time for that relay and then turned off. The pulse time is set for each individual relay in the relay settings under the I/O tab on the device where the relay is physically located. Note: If a new pulse command is set to the relay before the pulse time expires, the pulse timer will be reset to its full value and the relay will remain on until the pulse timer expires.
Toggle On/OffThe relay changes state to the opposite of its current state.
Condition-1 I/O ValueThe relay is set to the state of the I/O in Condition-1 of the trigger.
Opposite of Condition-1 I/O ValueThe relay is set to the opposite state of the I/O in Condition-1 of the trigger.
Pulse On (heartbeat mode)This option is used only for remote relays. While the trigger is true, a continual stream of pulse commands will be sent to the relay. The pulse commands will be sent out at the same rate as the “Poll Interval” which is set for the remote device (under the Remote Devices tab).
If the Poll Interval time is less than the pulse time for the relay, the relay will receive pulse commands faster than the pulse timer is allowed to expire, so the relay will remain on until the trigger becomes false or the relay doesn’t receive the command due to network failure. This option is useful for “fail safe” applications where it is important to turn the relay off in case of failure.

If Digital Input Counter is selected, the following actions are available:

LogThe counter value is logged
ResetThe counter is reset to 0
Log & ResetThe counter value is logged, then reset to 0

If Register is selected, the following actions are available:

Set-ToSet the value of the register to a specific value
Increment ByIncrement the register by the specified value
Decrement ByDecrement the register by the specified value

If Timer is selected, the following actions are available:

Start TimerSet the timer to the specified value
Clear (stop) TimerReset the timer to 0, and any actions that depend upon the timer will be canceled.

If Log is selected, the following actions are available:

LogA data log entry is made of the resources enabled in Logging Tab > LOG I/O
Reset LogClear (Erase) the log file
Pause LoggingTemporarily pause all logging to the log file.
Resume LoggingResume logging after previously pausing it.

If Email is selected, an email is sent when the task runs.

Send Email ToWith the drop-down box, select the Email address to use. The address list is configured in the General Settings tab > Email settings tab.

If SNMP TRAP is selected, the following actions are available:

Send SNMP Trap for Cond 1 I/O valueSend SNMP Trap to Configured SNMP Managers for I/O in Condition 1
Send SNMP Trap for Cond 2 I/O valueSend SNMP Trap to Configured SNMP Managers for I/O in Condition 2
Send SNMP Trap for Cond 1 and 2 I/O valueSend SNMP Trap to Configured SNMP Managers for I/O in Condition 1 and 2.

If SNMP NOTIFICATION is selected, the following actions are available:

Send SNMP Notification for Cond 1 I/O value
Send SNMP Notification to Configured SNMP Managers for I/O in Condition 1
Send SNMP Notification for Cond 2 I/O value
Send SNMP Notification to Configured SNMP Managers for I/O in Condition 2
Send SNMP Notification for Cond 1 and 2 I/O value
Send SNMP Notification to Configured SNMP

If Remote Services Notification is selected:

Send Device State to Remote ServiceThe local device state is sent to the remote services server if configured.

If Push I/O State to Remote Receiver Devices is selected:

Push I/O State to Remote Receiver Devices ActionThe state of the module is sent to all remote devices configured to receive such messages.

If Set I/O Color is selected, an I/O’s status color can be changed on the Control Page.

Repeat: The Scheduled Task is repeated:

No RepeatRuns only once
SecondsRepeats once every X seconds
MinutesRepeats once every X minutes
HourlyRepeats once every X hours
DailyRepeats once every X days
WeeklyRepeats weekly on the selected days of the week
MonthlyRepeats monthly either on selected days of the month, or the 1st Sunday, etc.
YearlyRepeats yearly on the 1st, 2nd, 4th Day of the Start Date Month, or the 1st, 2nd, 4th day of the Start Date every month that year

3.5.1.2 Conditional Tasks

Conditional tasks occur (run) if certain conditions are met. Conditional tasks are made by comparing specified resources using simple and/or (boolean) logic. For example, if a digital input goes on, turn a relay on.

Conditional tasks can be configured to be active continually or only during specific time periods each day/week.

Each Conditional Task can initiate up to three Actions. Actions are control outputs that “do” something such as turn a relay on or off, send an email, send an SNMP trap or make a data log.

Conditional Tasks are event driven and do not evaluate asynchronously. Their triggers are only evaluated when the conditions of the trigger change state. Conditional Tasks appear in a table on the Control/Logic Setup tab and can be created, edited or deleted as needed. Up to 50 Conditional Tasks can be created.

To add a Conditional Task, click the “Add Conditional Task +” button, and a popup window appears.

Task Name

This text field is used to describe the task. By default it is set to “Conditional Task 1”. This field may be up to 24 characters long. Set the name to a descriptive value such as “High Temp Shutdown”.

Triggers – Conditional Tasks

The “Trigger” section is a boolean logic comparison of two I/O. Triggers ONLY occur when the conditions change to true. The logic operations are event driven, and are not combinational. Conditions must change to false and back to true in order to re-trigger.

Note: To appear as a condition in the task drop-down menus ▼ , the I/O must be first added and named in the I/O Setup tab.

The two conditions (arguments) can be evaluated with “AND” or “OR” boolean logic. If both conditions are set to None, the Conditional Task is never evaluated. If one trigger is set to None, only one condition is evaluated for a True or False state.

If a Relay is selected the following logic states are available:

400 Series Control/Logic Conditional Tasks Setup Window
OnThe condition is true if the relay is on
OffThe condition is true if the relay is off
ChangesThe condition is true if the relay changes state

If a Digital Input is selected the following logic states are available:

OnThe condition is true if the digital input is on
OffThe condition is true if the digital input is off
ChangesThe condition is true if the digital input changes state

If a Digital Input Counter is selected, the following conditions are available:

Value =X.XIf the Counter value is equal to the setting, the condition is true.
Value >X.XIf the Counter value is greater than the setting, the condition is true.
Value < X.XIf the Counter value is less than the setting, the condition is true.

If a 1-Wire Sensor selected, the following conditions are available:

Value ≥ X.XIf the sensor value is greater than or equal to the setting, the condition is true.
Value <X.XIf the sensor value is less than the setting, the condition is true.
DeadbandHysteresis for the comparison

If Analog Input is selected, the following conditions are available:

Value ≥ X.XIf the analog input value is greater than or equal to the setting, the condition is true.
Value <X.XIf the analog input value is less than the setting, the condition is true.
DeadbandHysteresis for the comparison (see more details below).

If a Pseudo Digital Input resource is selected, the following conditions are available:

ONIf the pseudo digital input is on, the condition is true.
OFFIf the pseudo digital input is off, the condition is true.

If a Register is selected, the following conditions are available:

Value =X.XIf the Register value is equal to the setting, the condition is true.
Value >X.XIf the Register value is greater than the setting, the condition is true.
Value < X.XIf the Register value is less than the setting, the condition is true.

If a Vin selected, the following conditions are available:

Value ≥ X.XIf the Vin value is greater than or equal to the setting, the condition is true.
Value <X.XIf the Vin value is less than the setting, the condition is true.
DeadbandHysteresis for the comparison (see more details below).

If a Timer is selected, the condition is true when the timer expires (reaches 0).

Deadband

The Deadband settings prevent alarms from triggering excessively when an analog value vacillates around the trigger point.

With high alarms, the value must fall below the high alarm point minus the Deadband and then back above the high alarm point again, before the high alarm will be triggered again.

Likewise the Deadband on the low alarm requires the value to rise above the low alarm point plus the Deadband and then back below the low-alarm point again, before the low alarm will be triggered again.

For example, if the Deadband is set to 1 degree, and a high alarm is occurs at 95 degrees, the Deadband ensures that once the high alarm is triggered, it won’t trigger again until the temperature first drops below 94 degrees (95 – 1).

During – Conditional Tasks

Conditional tasks can be configured to run continually or during specific days each week.

Always

Runs continually.

Set Time

Specify the time interval and day(s), when this task will evaluate.

Note: If the Start Time begins after the end time (i.e., Start Time: 8:00pm, End Time: 6:00am), then the time interval will start and continue through the end time of the next day.

Actions – Conditional Tasks

Up to three actions can be specified for each Conditional Task. Tasks can change the state of a remote relay, counters, registers and other remote I/O. To be available in the task’s action pull-down menus ▼, the resource must be first added and named in the I/O Setup tab.

400 Series Deadband Temperature Chart
400 Series Control/Logic Conditional Tasks Set Time Window

If None is selected, nothing is done when the task runs.

If a Relay Action is selected the following actions are available:

OnThe relay is turned on
OffThe relay is turned off
Pulse OnThe relay is pulsed on (then off)
Toggle On/OffThe relay changes state
Condition-1 I/O ValueThe relay is set to the state of condition 1 I/O
Opposite of Condition-1 I/O ValueThe relay is set to the opposite state of condition 1 I/O
Pulse On (heartbeat mode)The relay is pulsed continually over and over while the trigger is true. When the trigger changes to false, the relay will go off. This is useful for remote relays and detecting network drop-outs, etc.

If a Digital Input Counter Action is selected, the following actions are available:

LogThe counter value is logged
ResetThe counter is reset to 0
Log & ResetThe counter value is logged, then reset to 0

If Register is selected, the following actions are available:

Set-ToSet the value of the register to a specific value
Increment ByIncrement the register by the specified value
Decrement ByDecrement the register by the specified value

If Timer is selected, the following actions are available:

Start TimerSet the timer to the specified value
Clear TimerResets the timer to 0

If Log is selected, the following actions are available:

LogA data log is made of the resources enabled in Logging Tab > LOG I/O
Reset LogClear (Erase) the log file
Pause LoggingTemporarily pause all logging to the log file
Resume LoggingResume logging after previously pausing it

If Email is selected, an email is sent when the task runs.

Send Email ToWith the drop down box, select the Email address to use. The address list is configured in the General Settings Tab > EMAIL SETTINGS tab.

If SNMP TRAP is selected, the following actions are available:

Send SNMPTrap for Cond 1 I/O valueSend SNMP Trap to configured SNMP Managers for I/O in Condition 1
Send SNMP Trap for Cond 2 I/O valueSend SNMP Trap to configured SNMP Managers for I/O in Condition 2
Send SNMP Trap for Cond 1 and 2 I/O valueSend SNMP Trap to configured SNMP Managers for I/O in Condition 1 and 2

If SNMP NOTIFICATION is selected, the following actions are available:

Send SNMP Notification for Cond 1 I/O valueSend SNMP Notification to configured SNMP Managers for I/O in Condition 1
Send SNMP Notification for Cond 2 I/O valueSend SNMP Notification to configured SNMP Managers for I/O in Condition 2
Send SNMP Notification for Cond 1 and 2 I/O valueSend SNMP Notification to configured SNMP Managers for I/O in Condition 1 and 2.

If Remote Services Notification is selected:

Send Device State to Remote ServiceThe local device state is sent to the remote services server if configured.

If Push I/O State to Remote Receiver Devices is selected:

Push I/O State to Remote Receiver DevicesThe state of the module is sent to all remote devices configured to receive such messages.

If Set I/O Color is selected, an I/O’s status color in the Control Page can be changed.

3.5.1.3 Automatic Reboot Tasks

The module can function as a reboot controller with fully configurable setup options. It can be used to reboot servers, computers, satellite modems and other devices if they fail to respond to pings sent from the device. The device pings a device on a network, and if unresponsive, starts, stops, or reboots the device connected to a ControlByWeb device’s relay. Automatic Reboot Tasks appear in a table on the Control/Logic Setup tab and can be created, edited or deleted as needed. Up to 16 Reboot Tasks can be created. The status field in each Reboot Task dynamically shows what the task is doing. For example, status messages such as: “Waiting for 1st Ping: 25 sec”, or “Pinging, Failed Pings: 5, Reboot Attempts:10” will appear.

There are three ways that the ControlByWeb device can be wired to reboot a device. All three reboot methods have different requirements for wiring connections and relay timing.

Connect a ControlByWeb device’s relay series with the power source of the device you would like to reboot. Simply switch the power off then on. If the AC line voltage is to be switched off, a line-voltage interposer relay may be needed depending on the ControlByWeb device’s relay specifications.

If the DC power to a modem or other device is to be switched off, the DC connections can be made to one of the internal relays in the ControlByWeb device.

Some relays share a common, such as in the four relays of the X-410, so in this case the other relays cannot be connected to other loads.

If the other relays are needed, use an interposer relay to switch the DC power to the device to be rebooted.

1. Connect a ControlByWeb device’s relay in parallel with the on/off switch of the device. This is useful for devices with momentary power buttons that will not automatically start operating when power is applied. These devices require a user to momentarily press a switch before the device will boot. An interposer relay may or may not be needed.

2. Connect a ControlByWeb device’s relay to the reset button or circuit of a device. In this configuration, the device does not power down the device, but simply forces the device to reset.

400 Series Control/Logic Automatic Reboot Setup Window

To add an Automatic Reboot task, click Add Auto Reboot Task.

Task Name

This text field is used to describe the task. By default it is set to “Reboot Task 1”. This field may be up to 24 characters long. Set the name to a descriptive value such as “Server Watchdog”.

Ping IP Address/Name

This is the IP address or hostname that the ControlByWeb device will ping. This is typically the IP address or hostname of the device that will be re-booted upon failure (such as a server, router, computer, etc.). It could however, be the address of a device on the opposite side of a communications link. This is useful to auto reboot communications devices such as CSU/DSUs, satellite modems, routers, etc.

400 Series Control/Logic Automatic Reboot Setup Edit Window

Ping Interval

This is the time interval (in seconds) between successful ping requests. This time can be set from 1 to 6000 seconds (100 minutes or 1.67 hours).

Unsuccessful Ping Interval

When ping requests fail (no response from device), it may be desirable to begin pinging at a shorter time interval. This allows the ControlByWeb device to determine in less time that the device is not functioning. After each unsuccessful ping, the device will wait this time interval (in seconds) before the next ping attempt. This time can be set from 1 to 6000 seconds (100 minutes or 1.67 hours).

Delay Before First Ping After Reboot

When the ControlByWeb device determines it’s time to reboot a device due to loss of communication, it will wait this time interval (in seconds) before beginning to ping the device after the relays the device is connected to have power cycled the device. This time delay allows the device to boot before being pinged. This time can be set from 0 to 6000 seconds (100 minutes or 1.67 hours).

Failed Pings Before Reboot

The device will be rebooted after this number of consecutive ping failures. This number can be set between 1 and 255.

Max Reboot Attempts

After the device has been re-booted this number of times without any successful pings, it is assumed that there are problems with the device and the ControlByWeb device will no longer attempt to reboot the device. At this point, the device will leave the device on and continue pinging the device, but will not reboot the device anymore. Once the device responds to pings again, the device will return to pinging and rebooting the device. This number can be set between 2 and 255.

Reboot Timer (T)

Timer value used in reboot option. If the power source to the device is controlled by a relay, this is the time the power is switched off. If the relay is connected to the on/off switch, this is the time the on/off switch is momentarily activated. If the relay is connected to the reset circuit, this is the time the reset is momentarily activated. This time can be set from 1 to 6000 seconds (100 minutes or 1.67 hours).

Reboot Options:

Pulse Relay Off T secondsConnect the NO contacts of the interposer relay to the AC power line of the device being monitored. If the device fails to respond to pings, the power is turned off, then on.
Pulse Relay On T secondsConnect the NC contacts of an interposer relay to the AC power line of the device being monitored. If the device fails to respond to pings, the power is turned off, then on. Connect the NO contacts of the relay to the reset circuit of the device being monitored. If the device fails to respond to pings, the reset is momentarily activated.
Turn Relay OFF until successful ping resumesIf the device is unresponsive, stop the device connected to a relay
Turn Relay ON until successful ping resumesIf the device is unresponsive, start the device connected to a relay

Relay/Register

With the drop-down box, select the relay (or register) from the list that will reboot the monitored device. A Register can be used in applications where more complex logic or control is needed and a Task monitors the Register to initiate a reboot. Use a Register and Task for example, if reboots are wanted only on a schedule during certain times each day.

Email Notifications

Email notifications of a reboot sequence can be Enabled or Disabled. If enabled, an email will be sent whenever the device is rebooted. The email will actually be queued until the device is back up, in case the device is needed in order to send a successful email.

Select Email Address

With the drop-down box, select the Email address to send reboot notifications. The address list is configured in the General Settings Tab > EMAIL SETTINGS tab.

3.5.1.4 Override Schedules

Override Schedules temporarily disable Scheduled Tasks that are set to Normal Schedule in the Run Mode column. It enables any Scheduled Tasks that are set to Override Schedule. Tasks that are set to Always will not be effected by any Override Schedules. Override Schedules are especially helpful for creating holiday schedules. Override Schedules appear in a table on the Control/Logic Setup tab and can be created, edited, or deleted as needed. The module supports up to 20 different override schedules.

A task running on a Normal schedule can be setup by an Administrator (with Administrator credentials) and can be used, for example, to open door locks during office hours. Override schedules allow the normal schedule to be temporarily disabled without disturbing the underlying schedule. For example, an employee (with Manager credentials) can temporarily change the schedule to accommodate a special holiday without the need to change or adjust the Normal schedule.

An example of this would be the 1st of January. An override schedule could be created that starts 00:00 on January 1st and ends at 23:59 on January 1st. This override schedule would stop normally scheduled tasks from running every year on the 1st of January.

Override schedules are periodic annually (e.g., the event will occur every year at the same time.)

400 Series Control/Logic Override Schedules Setup Window

To add an Override Schedule, click Add Override Schedule. Click the Edit button to edit an override schedule, click the “X” button to delete an override schedule.

Name:

This text field is used to describe the override schedule. By default it is set to “Override Schedule 1”. This field may be up to 24 characters long. Set the name to a descriptive value such as “Office Closed”.

Start Day/Time:

Different options will appear depending on the option you choose:

▪ Choose “On the” to enter a start day of the month, start time, and duration (days) for the override schedule.

▪ Choose “On” to enter a specific start date and time, and a specific end date and time.

400 Series Control/Logic Override Schedules Setup Edit Window

3.5.2   Control/Logic Tab > BASIC SCRIPT

The module can run simple custom programs written in a modified version of BASIC. This page is used to load and execute these programs. Before it can be loaded to the module, a script must first be prepared as a text (.txt) file. The file must then be uploaded to the module via the Basic Script tab.

The maximum size of script that can be uploaded to the device is 4K bytes. Information on writing a basic program for the module can be found in BASIC ScriptsBASIC Scripts. See Control Logic Examples Using BASIC Scripts for examples of BASIC scripts.

400 Series Control/Logic BASIC Script Window

Note: An ASCII standard text file format should be used, such as Windows Notepad, Programmer’s Notepad, vi, or other text editor that output the file as a .txt. Rich Text Format (.rtf) used by Microsoft WordPad is NOT compatible.

Currently Loaded Script

This field displays the .txt file that is uploaded to the module. The script (text) displayed on this screen cannot be edited. In order to edit any script, the .txt file must be edited externally and uploaded to the device again.

Basic Script File

To upload a basic script file to the device, click Basic Script File. A file upload dialog box opens which allows you to choose the file to upload. To upload the script, click Open.

Interpreter Status

This field displays whether the program is continuing to run, has stopped or finished, or if there are errors contained in the script. If there are errors in the script, the line on which the error occurred is displayed. Clicking the Refresh Status button will update this field.

Run Script

This option selects whether or not the selected script will run after it has been uploaded. The Submit button must be clicked to run the script.

BASIC I/O Tokens

After I/O resources are added and named, they can be controlled and monitored within BASIC scripts. BASIC scripts must reference I/O resources (relays, temp sensors, digital and analog inputs, etc.) in the form of a token, which is the characters “io” followed by the name of the resource (e.g., io.name). If the resource name has embedded spaces, they must be removed in the io.name token. The first character must be lowercase.

For example, if a relay is named “Warehouse Fan”, the fan can be turned on with the BASIC statement “LET io.warehouseFan = 1”. If a resource name is changed, the resource name in the BASIC script must be renamed to match.

The button, “View Basic I/O Tokens” displays a list of all of the I/O resources currently available together with the equivalent token to be used in BASIC scripts to reference the respective I/O resource.

400 Series Control/Logic BASIC I/O Tokens Window

Note: This screenshot was taken from the X-410 device. Other ControlByWeb devices will showdifferent I/O Names and Basic I/O Tokens.

3.6  Logging Tab

Record data such as changes in I/O state, sensor data, and events. Both periodic and event-based logging are supported. The logged data is stored in internal nonvolatile memory and can be retrieved by entering the command http://{module’s IP address}/log.txt. For more information on logging, see Section Log Files.

The module can make up to 30 log entries per second with event-driven logging. Each log entry has a time stamp with millisecond resolution. Two Conditional Task actions are available to pause and resume logging.

The log is stored in non-volatile, flash memory using a circular buffer (oldest data is overwritten). On all X-400 series devices 3072kB of memory space is reserved for logging, except for the X-410 which has 512 kB of memory space reserved. Log entries are composed of the following components, 30-byte header, 16-bytes for relays, 16-bytes for inputs, and 4 bytes for each analog value being logged (counters, 1-Wire sensors, vin, registers, etc). The space allocated for relays and inputs does not change depending on whether any relays or inputs are being logged.

Note: Changing the log settings will erase the current log file.

3.6.1   Logging Tab > GENERAL LOGGING SETTINGS

400 Series Logging Setup Window

Enable Logging

When this option is set to Yes, the module will record data as configured on this page. The default setting for this option is No. Note: This option controls data logging, but not system logging. System logging is always enabled.

Start Time

If a logging interval is specified (periodic logging rather than event logging), logging will occur relative to this start time. For example, if the start time is 01:00 and the Interval is 6 hours, logging will occur at 01:00, 07:00, 13:00, and 19:00. Start time is specified in 24-hour time format. Note: If “Event Only” is selected, this setting has no effect.

Interval

This field is used to specify the time period of logging. A numerical value is entered into the text field, and the unit of time is selected using the adjacent radio buttons. The range of values in this field is 1-60. Time units are Minutes, Hours, and Days. Select Event Only to disable periodic logging. Note: If “Event Only” is selected, this setting has no effect.

Next Log Time

This field shows when the next periodic log event is scheduled to occur. If logging is disabled, the next log time will indicate “Disabled.” If logging is enabled, but periodic logging is disabled (by selecting Event Only) the next log time will indicate “Event Logging Only.”

Note: This information is updated only when the page is refreshed.

3.6.1.1 Logging Tab > LOG I/O

This setup page is used to select which resources are logged, and which resources asynchronously trigger logging.

Whenever a log event (triggered or periodic) occurs, each resource that has its Log check-box enabled will be included in the periodic log. If a resource has its Trigger Log Event check-box enabled, a log will asynchronously occur when that resource changes its state or value.

400 Series Logging Setup Log I/O Window

Trigger and Delta

Analog resources log data when the value changes by the amount specified in the Delta fields. The default setting for these fields is shown below.

SensorTrigger Delta
Vin2.0 V
Registers2
Temperature2 
Humidity2%

Asynchronous Log Events

Digital Inputs or RelaysLogging will occur whenever the stat of that I/O changes.
1-Wire SensorsLogging will occur whenever the sensor changes by the trigger delta.
RegistersLogging will occur whenever the Register changes by the trigger delta.
VinLogging will occur whenever the Vin voltage changes by the trigger delta.

3.6.1.2 Diagnostic Settings

XML, MODBUS, and SNMP requests received by the module can generate a log entry. Each communication protocol has a check-box to enable logging for that protocol.

400 Series Logging Diagnostic Settings Window

Exclude Logged Requests

When logging is enabled for XML Requests, Modbus Requests, or SNMP Requests, you can filter out Reads (such as reading inputs’ states via an XML request) or Writes (such as changing the output state via an XML command).

On the Control Page Setup tab, you can specify the refresh rate of the Control Page. Each time the page is refreshed, an XML request is sent and logged as a Read. Since the default refresh rate is 3 seconds, the log file can get cluttered by many XML request logs. By filtering out Reads, refresh requests will not be logged. Likewise, by selecting Writes, write requests will not be logged. The default selection is None.

3.6.1.3 Send Log File

The module can be configured to send its log file to a remote server at a specific time once per day. The file can be emailed and/or uploaded to an FTP server. Only new log entries since the last successful upload, are sent. The log file is not deleted.

Daily Send Time

Select the time each day (24-hour format) the log file is to be sent.

Email Log File

If this check-box is enabled, a log email will be sent daily. The log email will contain entries that are new since the last successfully sent log email. When this box is checked, a drop-down box and Test Log Email button appear. Using the drop-down box, select the email address to send daily log. The address list is configured in General Settings Tab > EMAIL SETTINGS. The Test Log Email button causes the log file to be emailed immediately, without waiting until the daily send time.

400 Series Logging Email Settings Window

FTP Upload Log File

If this check-box is enabled, the log file is sent to an FTP server once each day. Only the log entries that are new since the last successful FTP upload will be sent each day.

400 Series Logging FTP Settings Window

Host Name

The IP address or hostname of the remote FTP server is entered here. The default value is 192.168.1.15

Connection Security

Choose None, Implicit TLS, or Explicit TLS. The security and port number must be configured to match the FTP server. The None option uses no encryption on the connection. Implicit TLS uses SSL to encrypt the channel before any FTP commands are sent or received. Explicit TLS allows the connection to start unencrypted and then upgrades the connection to encrypted through FTP commands.

Port

The TCP port number of the FTP server. This must match the TCP port set in the FTP server. The valid range is 1 to 65535. The default port number is 21.

User name

The username for connecting to the FTP server.

Password

If the FTP server requires a password, the password is entered here.

FTP Path/Filename

When uploading the log file to an FTP server, the FTP server will have a default location where it will place the log file. This field is used to define the filename of the log file stored on the FTP server. Sub-directories can also be defined here.

The actual filename used for saving the file on the FTP server will be the specified file name with the date and time appended to it. For example log.txt would be log_YYYYMMDDHHMMSS.txt where YYYY is the year, MM is the month, DD is the day of the month, HH is the hour, MM is the minutes, and SS is the seconds. This date and time comes from the module, and is the time that the module uploaded the file.

Test FTP Log

The Test FTP Email button causes the log file to be sent immediately. If nothing is in the log file, no file will be sent. The log information sent when this button is pressed will not be sent again when the button is pressed again or at the daily upload time.

3.7  Monitor and Control Tab

Under this tab there are buttons for viewing and customizing the Control Page as well as graphing the log file.

3.7.1   Monitor & Control Tab > CONTROL PAGE

This button displays the current Control Page. The Control Page is what users typically use to control and monitor I/O on this device. You can access the Control Page either through the setup menu, or directly by entering the IP address of this device into the address bar of a web browser. The Control Page is highly configurable. The Control Page Setup tab determines which resources are shown on the Control Page and how they are presented and displayed.

Here’s an example of a Control Page of an X-400 module:

400 Series Control Page Example

This example shows an X-400 with a temperature sensor, register (named Master Relay Switch), and eight relays that were added from an X-12s expansion module.

Note: If a sensor is disconnected or fails, the data value will be shown as x.xx in yellow.

3.7.2   Monitor & Control Tab > CONTROL PAGE SETUP

The content, format, and presentation of the Control Page is configured on this page. For example, the settings below illustrate the settings for the Control Page shown in the previous section.

After making changes to the header, logo, footer, and control ordering, you must click the Submit button for the changes to take effect.

Note: Any browsers currently viewing the Control Page while making changes will need to be refreshed before seeing the new changes. Do this by clicking the refresh button on your browser.

400 Series Control Page Setup Window

Header Text

The text entered here appears at the top of the Control Page. It also appears in the header of the email text when the email notification is used. This field can be up to 30 characters in length.

Show Header Logo

A graphic logo can be displayed in the upper left-hand corner of the Control Page. This setting enables or disables displaying the logo.

Header Logo

The ControlByWeb logo is shown by default. To upload a new logo, click Choose New Logo. A file upload dialog box opens, allowing you to browse for the file on your computer. The file must be a *.png format. Click the button to initiate the file upload. The logo file size must be less than 12k bytes. Once a logo has been uploaded, the default ControlByWeb logo will be overwritten. The ControlByWeb logo will not be restored if the device is reset to factory defaults (there is only room for one logo.)

Footer Text/HTML

The bottom of the Control Page has a configurable “footer” field. The text entered in this setup box appears as a footer on the Control Page. The text can include HTML hypertext links as shown in the example.

Refresh Rate

The Control Page continually updates its contents by setting a timer in the web page that causes it to be reloaded at a specified time interval. The web page content will be refreshed at the time interval specified in this setting. It can be set from 1 to 60 seconds. The default Refresh Rate is 3 seconds. Slower refresh rates will use less network bandwidth.

Control Page Widgets

A list of I/O resources that can be added to the Control Page appear next. The “widgets” appear on the Control Page in the same order as the setup list. Resources such as analog inputs automatically appear in this list and can be removed from the Control Page, if desired. For all other I/O (registers, counters, timers, etc.), you must have previously added them in I/O Setup tab before adding them to the Control Page.

To add one or more widgets, click the Add I/O to Control Page button

To edit a widget, click the Edit button

To remove a widget, click the Delete button.

To re-arrange the order of the widgets, click the widget handle and drag the widget to a different row.

When finished, click to Submit at the bottom of the page to save your edits.

To change the name of the resources (analog inputs, registers and Vin) on the Control Page, edit the respective settings in the I/O Setup Tab and change the resource name. While naming each resource, it is good practice to edit the associated status text. For example, for a digital input perhaps name the input “Warehouse Door”, set the On Status Text to “Door is Open” and the Off Status Text to “Door is Closed”.

Some widgets have more setup options than others. Widgets for the analog inputs, Vin and timers can be added but have no options to edit.

Once the I/O has been added, rearrange the I/O by clicking on the icon and dragging to the desired position.

Click Submit once you have finished making changes to the page.

Add I/O to the Control Page

To add one or more I/O, click the Add I/O to Control Page button. From the list of available I/O resources, check one or more Add boxes to add the selected resources to the Control Page.

After adding the desired widgets you can edit the widgets one by one, as needed, for the desired appearance and function. The visual presentation of the labels, buttons and colors can be highly configured. The display options available for the widgets depend on the specific I/O.

Note: Certain I/O resources (analog inputs, 1-Wire sensors, etc.) do not have edit buttons/widgets on the Control Page Setup tab; however, the I/O information can be configured in the I/O Setup tab.

400 Series Control Page Add I/O Window

Gap Widgets

Gap widgets are cosmetic widgets that allow sections of the Control Page to be separated by a small space. This is useful when grouping similar controls together.

1-Wire Sensor Widget Editor

There is no widget editor for 1-Wire sensors. The information that will appear on the Control Page will be configured in the I/O Setup tab > 1-Wire Sensors.

Relay Widget Editor

State

Show or Hide the relay state.

On Status Color

This setting specifies the color that will be displayed on the Control Page when the relay is On. Options are Red, Green, Yellow, Blue and White. The default color is Green.

Off Status Color

This setting specifies the color that will be displayed on the Control Page when the relay Off. Options are Red, Green, Yellow, Blue and White. The default color is Red.

ON Button

Show or Hide the On button.

ON Button Label

The text in this field specifies the text that will be displayed on the ON Button on the Control Page to turn on the relay. Up to 16 characters may be entered in this field. The default text is “On”.

Off Button

Show or Hide the Off button.

OFF Button Label

The text in this field specifies the text that will be displayed on the OFF Button in the Control Page to turn off the relay. Up to 16 characters may be entered in this field. The default text is “Off”.

Toggle Button

Show or Hide the Toggle button.

Toggle Button Label

The text entered in this field appears in the ‘Toggle’ button. Up to 16 characters may be entered in this field. The default text is “Toggle”.

Pulse Button

Show or Hide the Pulse button.

Pulse Button Label

The text entered in this field appears in the ‘Pulse’ button. Up to 16 characters may be entered in this field. The default text is “Pulse”.

400 Series Control Page Relay Widget Editor Window

Digital Input Widget Editor

State

Show or Hide the state (value).

On Status Color

This setting specifies the color that will be displayed on the Control Page when the input is considered On. Options are Red, Green, Yellow, Blue and White. The default color is Green.

Off Status Color

This setting specifies the color that will be displayed on the Control Page when the input is considered Off. Options are Red, Green, Yellow, Blue and White. The default color is Red.

Input Counter Widget Editor

Count/Frequency

Show or Hide the counter/frequency value.

Allow reset in control page

When enabled, the count value on the Control Page may be clicked to reset the counter’s value back to 0 after confirmation.

Analog Input Widget Editor

There is no widget editor for analog inputs. The information that will appear on the Control Page will be configured in the I/O Setup Tab > Analog Inputs.

400 Series Control Page Digital Input Widget Editor Window
400 Series Control Page Input Counter Editor Window

Register Widget Editor

Registers can be changed externally through the Control Page, XML requests, ModBus, or the BASIC script. This allows a BASIC script to react to user input. These variables are considered to be floating point numbers, just like other variables in the BASIC script.

Status:

State

Show or Hide the state (value).

Control Buttons:

There are four different types of control buttons for a register widget, each type has different options:

1. Type = Increment/Decrement

Increment Button

Show or hide the button

Decrement Button

Show or hide the button

Step

This setting is the amount the Register will be incremented or decremented when the respective increment/decrement button is clicked. The value can be an integer or floating point number.

2. Type = Custom Buttons

This setting provides up to 4-buttons with custom labels and set-values. Use one or more of these buttons to force a Register to specified fixed values.

Use these buttons for example, to provide a fan speed control with buttons labeled High, Medium and Low and perhaps with 100%, 50% and 20% for the button set values.

Button (1-4)

Show or Hide the button.

Label (1-4)

The text in this field specifies the text that will be displayed in the button. Up to 16 characters may be entered in this field.

Value (1-4)

When the user clicks the button, the Register defined in the Widget being edited will be set (forced) to the specified fixed value. The setting can be any integer or floating point value.

400 Series Control Page Register Editor Window
400 Series Control Page Register Editor Custom Buttons Window

3. Control Button Type = Text Box

Use this setting to allow the user to manually change the value of a Register. The input can be an integer or floating point value. The input value can be restricted between minimum and maximum values defined by settings for the Register itself. See Section I/O Setup Tab > Registers

Use this input field for example, to enter a thermostat set-point value.

4. Analog I/O Status Colors

The status colors of analog I/O (analog inputs, 1-Wire sensors, thermocouples, Vin, high-frequency inputs, analog outputs, timers, counters, on timers, total on timers) can be changed by creating Tasks under Control/Logic which set the I/O status colors.

5. Digital Input and Relay Status Colors

The status colors of digital inputs and relays can be configured directly in their respective control page widgets.

400 Series Control Page Button Type Window

3.7.3   Monitor & Control Tab > GRAPH LOG FILE

The data in the log file can be displayed in a graphical format. Use this page to configure and view the graph. With the Start and End settings you can “zoom in” to display the data over a specific time interval. When the Graph is first loaded, the last 24 hours of the log file are downloaded and displayed. Pressing the “Graph Last 24 Hours” button will update the graph with the last 24 hours of the log file. Pressing “Graph Selected Date/Time” will update the graph with the selected range of time in the Start/End drop-down menus. Note: The larger the range of time, the longer it takes to download the log file for graphing.

3.7.3.1 Settings

400 Series Monitor & Control Graph Log File Window

Select I/O

Select which I/O from the log file is to be graphed. Up to 10 I/O can be graphed at one time.

Start Date & Time

This is the start time for the graph. Select the month, day, year and time of day using the drop-down boxes.

End Date & Time

This is the stop time for the graph. Select the month, day, year and time of day using the drop-down boxes.

3.7.3.2 Graph

The graph includes a legend describing the colors and I/O in the top-right corner of the graph. The graph is interactive in that if the mouse is hovered over a specific data-point, it displays the precise value. To zoom in on a specific region of the graph, click and drag to highlight the area of interest. To return to a normal zoom, click the Graph button.

400 Series Monitor & Control Graph View

Section 4: Control Page

The Control Page is normally what users see and use and it can be highly configured to fit your needs. The Monitor & Control Tab > CONTROL PAGE SETUP tab has settings that determine what resources are displayed and how they are formatted.

Administrators, Managers and Users have separate access privilege to the Control Page. See Error: Reference source not found for a description of each access privilege.

4.1  Browser Operation


There are two ways users can access the Control Page by using a web browser:

1. Control Page

The first is by typing the IP address of the module directly into the web browser address bar. For example, using the default IP address, the user would enter http://192.168.1.2 (If the IP address was changed from the default, the user must use the new IP address.)

Note that if any port is used other than the default port 80, the port must also be included in the request.

For example, accessing the unit at port 8000 would be as follows: http://192.168.1.2:8000

To access the module using HTTPS, the user would enter: https://192.168.1. 2

If any port is used other than the default HTTPS port 443, the port must also be included in the request. You will usually get a warning when accessing the module over HTTPS, this is because the module is using a default, self-signed SSL certificate.

The I/O on the Control Page updates every three seconds unless the update interval has been changed in the Control Page Setup.

2. Control Page via Setup Page Tabs

The second method of accessing the Control Page is through the Setup Page tabs (http://192.168.1.2/setup.html).

Choose Monitor & Control Tab > CONTROL PAGE.

400 Series Control Page Example

Section 5: Example Control Scenarios

This section presents various control examples using Scheduled Tasks, Conditional Tasks, and BASIC scripts to solve example applications.

5.1  Control Logic Examples Using Tasks/Functions


The following examples illustrate tasks or functions that can be performed by the module. These examples may be used as a tutorial to illustrate how to perform certain functions and can be a good starting point for more advanced logic.

Important: When creating tasks that perform actions when something is triggered, the action will not automatically reverse when the trigger goes away. For example, if a trigger turns a remote digital output on when temperature rises above 50 degrees, you must create a second task to turn the digital output off when the temperature falls below 50 degrees.

5.1.1   Send an email if the temperature is less than 33 °C between 9:30PM and 10PM each day

In this example the Deadband of 1 degree was used to prevent multiple email messages being sent due to “chatter”.

Another email message won’t be sent until the temperature rises above 34 degrees (33 plus 1 degree deadband) and then back below 33 degrees.

The “During” section of the task limits the time when the triggers are effective to 9:30 P.M. and 10:00 P.M. every day of the week. Outside this window email messages will not be sent even if the temperature drops below 33 degrees.

400 Series Example Task Schedule Temperature

5.1.2   Send Email if Input 1 stops toggling

Monitor Pseudo Digital Input 1 for state changes. If Input 1 doesn’t change state every 5 seconds or faster an email message will be sent.

This is using two tasks. Task 1 starts (or re-starts) a timer each time the pseudo input changes. Task 2 sends the alert if the timer ever expires.

400 Series Example Timer

5.1.3   Send an email message every 24 hours

400 Series 24 Hour Scheduled Email

5.1.4   Network monitor between two X-400 modules (advanced)

In this example we will configure two X-400 devices to share a register. In the example we are using this as a network monitor, but this example illustrates how to share register or I/O states between modules.

One X-400 (we will call X-400_ONE) will be configured to share a register with a second X-400 (we will call X-400_TWO). X-400_ONE will change that register value once every 10 seconds. X-400_TWO will monitor that register value. If X-400_TWO detects no changes to the register for more than 12 seconds it will send an email alert.

Setup X-400_ONE communications with X-400_TWO:

1. Connect both devices to the network and assign IP address to each of them.

2. Open the setup page for X-400_ONE and select “Remote Devices” tab. Click the “Find Devices” button. The other X-400 (X-400_TWO) should appear in the list. If multiple X-400 units are installed on the network you may need to identify it by serial number. Select that X-400 device so the “Add Remote Device” window appears. Within that window…

• Name the device “X-400_TWO”

• Select Model X-400 (should already be selected)

• Serial number should be filled in with correct serial number.

• IP address should have correct IP address for X-400_TWO and port should be correct.

• Set up the security options and enter passwords for X-400_TWO

• In the bottom portion of the window, select “Instant Send”

• Click “Add Device”

Wait a minute and then you should see X-400_TWO in the Remote Device List and the status should indicate a response time (in milliseconds) from the remote unit (the smaller the response time the better).

Now X-400_ONE is set up to push its I/O state to the remote device. By default it will push the state every 3 seconds (PUSH interval) but we want it to push its state instantly when the register changes so we will set that up in Conditional Tasks.

Setup of X-400_ONE to toggle register and share it with X-400_TWO (add two Conditional Tasks):

1. Open setup page for X-400_ONE (should already be there from above setup)

2. Set up a timer (called Timer 1) with a Power Up value of 8 seconds. This timer will be used to change the register and the Power Up value will cause it to start automatically.

3. Set up a task and call it “Toggle Register to 1”. Set the trigger to “Timer 1 Expires AND Register 1 = 0”. Set the Actions to “Set Register 1 to 1” and “Start Timer 1 for 10 Seconds” and “Push I/O State To Remote Receiver Device”

4. Set up a task and call it “Toggle Register to 0”. Set the trigger to “Timer 1 Expires AND Register 1 = 1”. Set the Actions to “Set Register 1 to 0” and “Start Timer 1 for 10 Seconds” and “Push I/O State To Remote Receiver Device”

Setup of X-400_TWO to monitor the register from X-400_ONE and sent alert if the register doesn’t change within 12 seconds:

1. Open setup page for X-400_TWO and select Remote Devices tab. You should see X-400_ONE in the list of devices but the name will show as the serial number rather than the name X-400_ONE. You can click edit and change the name to X-400_ONE. If the X-400_ONE device doesn’t appear in the list you will need to add it to the list manually.

2. Once the X-400_ONE device appears as one of the Remote Devices you will need to add its register to the local I/O. Click on I/O Setup, then Registers. At the bottom of the table, click on the button called “Add Remote Register”. Add the register “X-400_ONE Register 1” to the list. You should now see this new register listed under “Remote Register”.

3. We need a timer to go to I/O Setup and create a timer called “Timer 1”. Give it a power up value of 30 seconds to make sure both X-400 units have plenty of time to boot before sending error messages.

4. Now add the logic. Click on “Control/Logic” and create a new Conditional Task. Call this task “Set Timer When 1”. Set trigger Condition 1 to “X-400_ONE Register 1 = 1”. Set Action 1 to “Start Timer” with a time of 12 Seconds.

5. Add a second Conditional Task. Call this task “Set Timer When 0”. Set trigger Condition 1 to “X- 400_ONE Register 1 = 0”. Set Action 1 to “Start Timer” with a timer of 12 Seconds.

6. Add a third Conditional Task. Call this task “Send Alarm”. Set trigger Condition 1 to “Timer 1 Expires”. Set Action 1 to “Send Email” and specify the email address where the message should go (if no email addresses appear you will need to set them up first).

5.2  Control Logic Examples Using BASIC Scripts


Most advanced logic tasks can be accomplished using the module’s Task Builder; however, the module has a BASIC interpreter that can be used for more advanced tasks.

I/O resources are not fixed on the module. After registers and other I/O are added, they can be used within BASIC scripts. BASIC scripts must reference I/O resources such as digital I/O in the form of io.name where “name” is the resource name defined for each I/O under the I/O Setup Tab.

If the resource name has embedded spaces, they must be removed in the io.name statement. The first character must be lower case. For example, if a digital I/O is named “Warehouse Fan”, the fan can be turned on with the BASIC statement “LET io.warehouseFan = 1”. If a resource name is changed during development and testing, the resource name in the BASIC scrip must be renamed to match.

5.2.1   If an analog input is in the alarm state, send an email every hour

DO

‘If 2.5 < sensor1 < 4.5 then send an email every 1 hour

IF io.temp1 < 4.5 THEN

      IF io.temp1 > 2.5 THEN

      IF t0 = 0 THEN

      EMAIL

      LET t0 = 36000 ‘3600 seconds

      END IF

      END IF

END IF

LOOP

END

5.2.2   Monitor 4 doors, send an email if a door is open more than 5-minutes

Send an email if a door has been open for more than 5 minutes, repeat the email every 5 minutes thereafter while the door is open. Note, we use the digital input mode of the analog inputs for this scenario.

‘Send an email alert after a door has been open for more than 5 minutes.

‘Continuously set a timer for 5 minutes if the door is closed

‘Setting initial timer values

‘Using variables a-d allow simple changes to alarm times

LET a = 3000   ‘Input1 300.0 seconds

LET b = 3000   ‘Input2 300.0 seconds

LET c = 3000   ‘Input3 300.0 seconds

LET d = 3000   ‘Input4 300.0 seconds

LET t1 = a

LET t2 = b

LET t3 = c

LET t4 = d

‘Begin main program, sequentially service each door.

DO

‘If door1 is closed, then set timer for 5 minutes.

‘If door1 is open, then send an email and reset timer after timer expires

‘Door 1

IF io.analogInput1 = 1 THEN

      LET t1 = a

ELSE ‘Else if door is open

      IF t1 = 0 THEN

  EMAIL io.analogInput1

  LET t1 = a

      END IF

END IF

‘Door2

IF io.analogInput2 = 1 THEN

      LET t2 = b

ELSE ‘Else if door is open

      IF t2 = 0 THEN

    EMAIL io.analogInput2

    LET b

      END IF

END IF

‘Door3

IF io.analogInput3 = 1 THEN

      LET t3 = c

ELSE ‘Else if door is open

      IF t3 = 0 THEN

      EMAIL io.analogInput3

      LET t3 = c

      END IF

END IF

‘Door4

IF io.analogInput4 = 1 THEN

      LET t4 = d

ELSE ‘Else if door is open

      IF t4 = 0 THEN

      EMAIL io.analogInput4

      LET t4 = d

      END IF

END IF

LOOP

END

5.2.3   Send an email if the AC power fails

Send an email if the AC power (via input1) has been off for 60 seconds. Send a follow-up email when the power is restored. Send the power restored email only if a ‘power off’ email was previously sent.

Note: A simple AC to 12VDC wall transformer connected to the digital input can be used to detect the loss of AC power.

‘Script will send an email after power has been off for a specific amount of time.

‘Will also send an email when power is on only if a ‘power off’ email has been sent.

LET a = 0 ‘Power on email sent if true

LET b = 0 ‘Power off email sent if true

DO

IF io.input1 = 1 THEN ‘If power is on

      LET t1 = 600

      IF a = 0 THEN ‘If no ‘power on’ email has been sent

      IF b = 1THEN ‘If ‘power off’ email has been sent

      EMAIL io.input1

      LET a = 1 ‘Set power on email sent flag

      END IF

      END IF

      LET b = 0

END IF

‘Once power has been off a specific time

IF t1 = 0 THEN

      IF b = 0 THEN

      EMAIL io.input1

      LET b = 1 ‘Set power off email sent flag

      END IF

END IF

LOOP

END

5.2.4   Monitor a generator. Send an email if it runs for more than 10 seconds.

Send an email if a generator runs for more than 10 seconds, and every 30 minutes afterward. Send an email when the generator turns off if a ‘generator on’ email was sent.

‘Input1 is used as the source for the generator status

‘Input1 = 1 : Generator off

‘Input1 = 0 : Generator on

LET a = 0       ‘Generator on email sent flag

LET t1 = 100       ‘10.0 seconds

DO

‘Generator off

IF io.input1 = 1 THEN

      LET t1 = 100       ‘10.0 seconds

      IF a = 1 THEN       ‘If generator on already email sent

      EMAIL io.input1       ‘Email everything okay

      LET a = 0       ‘Set generator on flag back to false

      END IF

END IF

‘Generator on and timer expires

IF t1 = 0 THEN       ‘If timer has expired

      EMAIL io.input1       ‘Email generator on

      LET t1 = 18000       ‘30 minutes until another email

      LET a = 1       ‘generator on email flag

END IF

LOOP

END

Section 6: Auxiliary Operations

6.1  XML


Custom computer applications may be created to monitor and control the module. This method does not use a web browser. There are two XML pages that can be used to monitor and control the module: state.xml and customState.xml.

All requests to the XML files must be in the form of HTTP GET requests see Section HTTP GET Requests (for custom applications) for details.

See Section External Server and Remote Services for more information on network configurations when using XML.

6.1.1   state.xml

The state.xml page served by an X-4xx only shows the I/O that have been assigned a ‘Local I/O Number’. The XML tag names on this page represent the I/O type and Local I/O number on the X-4xx. For example, if two relays have the Local I/O Numbers 1 and 5 assigned and no other I/O on the X-4xx have a Local I/O Number assigned, then the state.xml page would appear as follows:

<datavalues>

          <relay1>0</relay1>

          <relay5>0</relay5>

          <vin>12.2</vin>

          <utcTime>1262394580</utcTime>

          <timezoneOffset>-25200</timezoneOffset>

          <serialNumber>00:0C:C8:00:00:00</serialNumber>

</datavalues>

Notice that the power supply of the X-4xx ‘vin’ always appears in state.xml, as do the time, timezone, and serial of the X-4xx.

Reading state.xml

XML Monitor All Functions

The state of the I/O configured on the X-4xx can be read by requesting state.xml. This can be demonstrated by entering the following URL into the address bar of a web browser (substituting the IP address as necessary):

http://192.168.1.2/state.xml

The following state.xml page is returned (this can vary, depending on the module and browser):

<datavalues>

          <digitalInput1>0</digitalInput1>

          <onTime1>0.00</onTime1>

          <totalOnTime1>0.00</totalOnTime1>

          <count1>0.00</count1>

          <frequency1>0.00</frequency1>

          <relay1>1</relay1>

          <relay2>0</relay2>

          <relay3>0</relay3>

          <relay4>0</relay4>

          <analogInput1>4.96</analogInput1>

          <analogInput2>4.96</analogInput2>

          <analogInput3>4.97</analogInput3>

          <analogInput4>4.97</analogInput4>

          <oneWireSensor1>x.x</oneWireSensor1>

          <vin>12.2</vin>

          <register1>0</register1>

          <utcTime>1262394580</utcTime>

          <timezoneOffset>-25200</timezoneOffset>

          <serialNumber>00:0C:C8:00:00:00</serialNumber>

</datavalues>

The numbers enclosed by the tags, <tag>, indicate the current state or value monitored by the module. Values for each tag are described in the table below.

Custom computer applications can open a TCP/IP connection with the module and send a GET request for the state.xml file to obtain the current state of the module.

XML Tags*Monitor Values
<digitalInputX>0=off (voltage not applied to input X) 1=on (voltage applied to input X)
<onTimeX>Time in seconds how long the input was on since last coming on
<totalOnTimeX>Total time in seconds how long the input has been on
<countX>The count value associated with input X
<frequencyX>The frequency associated with input X
<relayX>0=off (coil off) 1=on (coil energized)
<digitalIOX>0=off (voltage not applied to input X) 1=on (voltage applied to input X)
<analogInputX>Value of analog input X
<vin>Scaled internal Vin measurement
<frequencyInput>Value of the X-420 frequency input
<registerX>Value of the register X
<utcTime>Current UTC time expressed in seconds since January 1st, 1970
<oneWireSensorX>x.x = Indicates that the 1-Wire sensor could not be read 77.3 = Current sensor value 77.3 F = Current sensor value with units included using param showUnits=1
<timezoneOffset>Value to offset utcTime for local time
<serialNumber>00:00:00:00:00:00, serial number of X-418.

Controlling with state.xml

Commands can be sent to the module to control the I/O. The parameters used differ depending on if state.xml is used or customState.xml is used. State.xml uses the io type names and local io numbers when controlling the I/O. CustomState.xml uses the camelcase version of the user configurable name when controlling the I/O.

XML Digital Output Control

Commands are sent using the parameter composed of the io type and digital I/O number digitalIOX (X is replaced by 1 for digital IO 1, or 2 for digital IO 2, etc). A few examples of using digitalIOX are given here.

CommandDescription
state.xml?digitalIO1=0Turn Digital I/O 1 OFF
state.xml?digitalIO1=1Turn Digital I/O 1 ON
state.xml?digitalIO2=0Turn Digital I/O 2 OFF
state.xml?digitalIO2=1Turn Digital I/O 2 ON

XML Pulse Digital Output

When the pulse command is sent, the output will turn ON for the Pulse Duration specified in the Digital I/O setup page. It is also possible to send a pulse time command that is different than the configured Pulse Duration. This is done by sending a pulseTime variable. The pulseTime variable does not change the Pulse Duration in the setup page and it is not stored or recorded. The pulseTime variable only changes the duration for the single pulse initiated by that command. In other words, you must issue the pulseTime command for each pulse command that differs from the preset value. For example, if the X-420 is configured for a pulse duration of 1.5 seconds. To issue one 1.5 second pulse, three 5 second pulses, and another 1.5 second pulse to digital I/O 1, you would issue the following commands:

CommandDescription
state.xml?digitalIO1=2Pulse Digital I/O 1 for the preset time (1.5 seconds).
state.xml?pulseTime1=5&digitalIO1=2Pulse Digital I/O 1 for 5 seconds.
state.xml?pulseTime1=5&digitalIO1=2Pulse Digital I/O 1 for 5 seconds.
state.xml?pulseTime1=5&digitalIO1=2Pulse Digital I/O 1 for 5 seconds.
state.xml?digitalIO1=2Pulse Digital I/O 1 for the preset time (1.5 seconds).

NOTE: The pulseTime argument MUST come before the digitalIO1=2 command.

XML Set On Time Counters

The on time counter and total on time counter values can be set using the onTimex and totalOnTimex commands respectively:

CommandDescription
state.xml?onTime1=0Reset the onTime1 counter to 0
state.xml?onTime1=5Reset the onTime1 counter to 5
state.xml?totalOnTime1=0Reset the totalOnTime1 counter to 0
state.xml?totalOnTime1=5Reset the totalOnTime1 counter to 5

XML Set Counter

The counter values can be set using the countx command:

CommandDescription
state.xml?count1=200Set counter1 to 200.

XML Set Register Values

The register values can be set using the registerx command:

CommandDescription
state.xml?register1=10.5Set register1 to 10.5.

6.1.2   customState.xml

The customState.xml works very similarly to the state.xml page. The difference is in the customState.xml, the XML tag names are set to a name very similar to the name of the I/O it is associated with. For example, if you were to set the name of ‘Register 1’ to ‘My Register 1’ the register would show up in the customState.xml as ‘myRegister1’. Using these names allows applications interfacing with the module to use more appropriate names when reading and writing I/O values.

Controlling I/O with the customState.xml is the same as with the state.xml except you may now use the names shown in the XML tags. For example, if you wanted to set a register named ‘My Register 1’ to the value 10, you would use the following command:

http://192.168.1.2/customState.xml?myRegister1=10

You will need to reference the customState.xml for the exact names to use for each of the configured I/O.

6.2  JSON


This device can also read the current state of the devices I/O through JavaScript Object Notation (JSON). The JSON format may be preferred for some custom applications as some languages provide native methods for processing data in JSON form.

There are two primary files that can be requested from this device in JSON form. The state.json and the customState.json. Each of these files provide the same information as their XML counterparts, but will be formatted with JSON. Additionally, the methods of controlling the I/O will be the same as with the XML pages. Note that all requests to the JSON files must be HTTP GET requests, see Section HTTP GET Requests (for custom applications)

6.3  HTTP GET Requests (for custom applications)


The module has a built-in web server that responds to HTTP GET requests. These GET requests are sent from web browsers when a web page is requested. They are fairly similar to the actual addresses seen in the browser’s address bar. The following section describes the HTTP protocol and how it can be used to control and monitor the module. All examples below show the state.xml, but will be the same for customState.xml and the JSON files. It is also assumed that a TCP/IP connection has already been established from the custom application to the device. The following are the messages that should be sent over the TCP/IP connection to control and monitor the device.

6.3.1   Using GET for Control and Monitoring

No Password

GET requests to the device for XML files.

Example request state.xml:

GET /state.xml HTTP/1.1\r\n\r\n

Example set Register 1 to the value 25:

GET /state.xml?register1=25 HTTP/1.1 \r\n\r\n

Password Enabled

If the User account is enabled on the module, and the state.xml page is requested through a browser, the user will be prompted for a password. If the request is sent from custom application, the HTTP request will need to contain the password encoded as Base64.

The following is an html request header without the password:

GET /state.xml?register1=25 HTTP/1.1 (Terminated with two \r\n.)

The following example adds the password:

GET /state.xml?register1=25 HTTP/1.1 (Terminated with one \r\n.)

Authorization: Basic bm9uZTp3ZWJyZWxheQ== (Terminated with two \r\n.)

bm9uZTp3ZWJyZWxheQ== is the Base64 encoded version of the user “name:password,” none:webrelay.

6.4  SNMP Requests, Objects and Community Strings


All configured I/O and some simple network parameters can be retrieved using Simple Network Management Protocol (SNMP). For most cases, using SNMP is as simple as locating the appropriate Management Information Bases (MIB) files and loading them into the SNMP manager software. The module will generate an MIB file, based on its I/O configuration, for use with the SNMP manager software. If the I/O are configured (added/deleted), a new MIB will need to be generated.

SNMP is configured under the Advanced Network setup tab. See Section General Settings Tab > ADVANCED NETWORK SETTINGS for more information.

The module supports the following Packet Data Units (PDU):

  • GetRequest
  • GetNextRequest
  • GetBulkRequest
  • SetRequest
  • Trap
  • Notification

6.4.1   Standard Objects

The module supports several standard RFC1213 objects that usually come with SNMP management software. If not, an Internet search for RFC1213-MIB will turn up multiple links.

RFC1213 ObjectResponse
system.sysDescrX-418
system.sysObjectIDX418
system.sysUpTimeTime in hundredths of seconds since the device was last powered.
system.sysNameX-418*

*The sysName is customizable under the Control Page Setup tab. It’s the Control Page Header.

6.4.2   Module Objects

All configured I/O on the module can be monitored and controlled through SNMP. The MIB file can be generated for the module by going to General Settings Tab > ADVANCED NETWORK SETTINGS and pressing the button Generate and Download MIB File. This file should be regenerated whenever there are changes made to the I/O.

6.4.3   TRAPS

Send SNMP traps when a relay changes state, when a particular sensor value is reached, or when the supply voltage is out of the desired range. Traps are configured as actions in Conditional and Scheduled tasks. As more I/O are added to the module, more I/O will appear in the MIB file.

6.4.4   Notifications

Supports sending of SNMP Notifications when the SNMP version is 2c or 3. Notifications are similar to traps accept they require a response to be sent back from the SNMP manager. Retries will occur if the SNMP manager does not return a response. This makes notifications more reliable than traps. Notifications are configured as actions in Conditional and Scheduled tasks.

6.4.5   Community Strings

The module allows customization of both the read and write community strings. The proper community string will be needed for all read and write requests. By default both read and write community strings are webrelay. Community strings are only used by SNMP versions 1 and 2c. SNMP version 3 uses a different security mechanism.

6.4.6   SNMP V3 User-Based Security Model

The module supports the SNMP V3 User-Based Security Model (USM). This replaces the community strings “security” of SNMP V1 and 2C. The details of USM can be complicated, but the main thing is that both the module’s security settings and the SNMP Manager’s security settings need to match for it to work.

There are two protocols used for USM. The first, authentication protocol, allows the SNMP manager to authenticate the module and vice versa. The second, privacy protocol, allows the SNMP communication to be encrypted. Each protocol has an “algorithm” and a password associated with it. There is also a security username that is shared by both protocols.

6.5  External Server and Remote Services


Note: The following methods are supported by the module; however, Xytronix Research & Design, Inc. does not provide or support custom third-party applications, or external web servers.

6.5.1   Accessing the module with custom software or third-party applications

Custom applications can send commands to the module for monitoring and control functions using HTTP requests for XML or JSON files. (See Section XML and JSON for more information) The application interface can be used to provide a custom user interface, access to multiple units in a single screen, and allow for automation, logging, and other application-specific features.

6.5.2   Using an External Web Server

Rather than accessing the module directly from a computer, an external web server can be used. The term “external” web server is used here to mean a separate web server (such as Apache, IIS, or NGINX) that is not the web server built into the module. In this scenario, users access custom web pages that reside on the external web server and the external web server communicates with the module.

An external web server can integrate multiple ControlByWeb devices into a single control page. In other words, the user may not be aware that he/she is using multiple ControlByWeb™ devices, but rather the user sees an integrated control page for 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 larger web servers, including more memory and various web programming languages.

There are two approaches that an external server can use to communicate with the module and other ControlByWeb™ devices: Direct Server Control, and Remote Services.

Direct Server Control

The first approach is for the external server to create a TCP connection whenever it needs to access the ControlByWeb device. In this case, the external server opens the connection, sends commands and/or reads the device, and closes the connection.

This method is ideal when the web server and all of the ControlByWeb devices are on the same network (without routers between them). In this case, the server can communicate with the devices directly and securely since data never has to leave the local network.

When the server and the ControlByWeb devices are on different networks, routers must be configured to allow appropriate access. If a public network is used, such as the Internet, security precautions should be considered.

Remote Services

The second approach is for the ControlByWeb device to initiate a connection using Remote Services. The settings under the Advanced Network tab in the setup pages will enable the device to open a TCP connection with an external server. Once the connection is open, the external server can send commands and/or read the device. The external server can leave the connection open (so that it never closes) or close the connection.

Remote Services is ideal for installations where the server and the device are installed on different networks. This is especially useful when each device is installed on a separate private network. For example, if the user doesn’t control the network connections where the ControlByWeb device is installed, Remote Services would initiate a TCP connection over the Internet with the control computer. Since the ControlByWeb device initiates the connection, the control computer doesn’t have to know the IP address of the device. This means that the device can be installed using DHCP. In addition, no special router configuration is required. This makes the network installation of the device very simple, and since no incoming ports need to be opened in the router, security is not compromised. See Section General Settings Tab > ADVANCED NETWORK SETTINGS for more information.

The ControlByWeb device can be configured to establish a connection when triggered by an event, such as an I/O state changing. This is done by setting a conditional task with the action being Send Device State to Remote Service.

With Remote Services enabled, a connection attempt will be made periodically according to the Connection Interval setting in the Advanced Network setup tab. The Connection String consists of static information about the device, a user-defined character string configured in the Advanced Network tab and ends with sending the state.xml.

The connection string is also sent at the same interval once the connection is open. The external server is responsible for closing the connection when it is done.

A three-character “ACK” response is expected in return to every connection string. If the “ACK” is not received within 10 seconds, the ControlByWeb device will close the connection.

When an event occurs and a connection is open, the state.xml file is sent.

6.6  Log Files


The module logs information to two different log files; log.txt and syslog.txt. Both log files are text files and are stored in nonvolatile memory; this data will not be lost due to power failure and the syslog.txt is not cleared when restoring factory defaults. The log files are stored in circular buffers which write from the beginning of the allocated memory space to the end and then repeat from the beginning (overwriting the original data). The nonvolatile memory is divided into 4K byte sectors. Each time data gets erased to make room for new data, a full sector (4K bytes) is erased at one time.

Data Log File – log.txt

This log file is user-configurable under the Logging tab, and stores real-world data such as relay states, digital/analog input values, and events such as remote I/O state changes (see Section Logging Tab > GENERAL LOGGING SETTINGS for more information). It can be up to 3072K bytes long and is displayed using a comma-separated value formatting scheme.

Inputs, Relays, Counters, Vin, and Sensors will only be displayed if they are selected in the Logging setup tab. The file is read by requesting the log.txt file from the module. 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

Example File Format:

MM/DD/YYYY HH:MM:SS.mmm DDD, Digital I/O 1-2, Analog Inputs 1-4, Frequency

Input, Vin, Sensors 1-16, Trigger: Source

Date and Time Format:

      MM – Month (1-12)

      DD – Day (1-31)

      YYYY – Year (1970 – 2106)

      HH – Hour in 24 hour time (0 -23)

      MM – Minutes (0-59)

      SS – Seconds (0-59)

      mmm – Milliseconds

      DDD – DST When in daylight savings, STD When not in daylight savings time

Sample File:

The file can then be saved using the ‘Save As…’ option under the ‘File’ menu of the web browser. 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 would be read as follows:

http://192.168.1.2:8000/log.txt

The log.txt file may be erased with the following command:

http://192.168.1.2/log.txt?erase=1

Note: If the User account is enabled in the Setup pages, the password will be required to access the log file.

System Log File – syslog.txt

The syslog file records various system events, which can be used for diagnostics and troubleshooting purposes.

File Format:

MM/DD/YYYY HH:MM:SS, (category to which message applies): (message)

Sample File:

01/02/2010 04:08:13 DEVICE: Power Up.

01/01/2010 00:41:05 DEVICE: Reset factory defaults.

Listed below is a description of messages that a user may see:

CategoryMessageDescription
DEVICEPower UpDevice has been properly powered.
InitializeDevice is ready.
Reset Factory DefaultsDevice has been reset to factory defaults.

EMAIL
Failed DNS LookupUnable to lookup mail server due to an incorrect DNS setting.
Bad UsernameEmail was not sent due to an incorrect user name.
Bad PasswordEmail was not sent due to an incorrect password.
Authentication RequiredA user name and password are required by the mail server.
No ResponseNo response from SMTP server.
CLOCKRTC ResetReal Time Clock has been reset.

NTP SERVER
Request AttemptDevice attempting to connect to NTP Server.
Failed DNS LookupUnable to lookup NTP server name due to an incorrect DNS setting.
SuccessDevice successfully connected to NTP Server.
REMOTE SERVERFailed DNS LookupUnable to lookup Remote Server due to an incorrect DNS setting.
Connection Attempt StartedConnection port with Remote Server has been opened.
Connection ClosedConnection port with the Remote Server has been closed.
DHCPAddress AcquiredIP address request successful, and IP address assigned.
Lease RenewalIP address assigned to device was renewed.
MAIN_MCUNew Firmware LoadedNew firmware has been loaded to the device.

This file is read by requesting the syslog.txt file. For example, using the default IP address, the following command would be used:

http://192.168.1.2/syslog.txt

Note: The setup username and password are required to access this file.

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 would be read as follows:

http://192.168.1.2:8000/syslog.txt

To erase the file, use: http://192.168.1.2/syslog.txt?erase=1

6.7  Modbus/TCP (slave)


The module can be controlled and monitored using Modbus/TCP protocol. This provides a standard means of using the module with devices and software from other manufacturers. This section is not a tutorial on Modbus and it is assumed that the reader is already familiar with Modbus. Detailed Modbus information can be found at http://www.modbus.org.

Note: Modbus communications are disabled whenever the User account is enabled. This is because Modbus/TCP does not provide a mechanism for password protection. Make sure the User account is disabled (default) and Modbus functionality is enabled on the Advanced Network.

The module functions as a Modbus slave. Host devices, such as PLCs, open a connection with the module on port 502 (configurable under Advanced Network tab) and then send requests to read or set I/O states, or sensor values. When the module receives a command, it performs the desired function and returns a response.

The module can have additional I/O added and removed that can cause changes to the Modbus address map. For an up-to-date map of I/O on the module to the addresses for Modbus, please select the View Modbus Address Table button from the Setup pages under the Advanced Network tab.

The Modbus Address Table will list all the addresses to be used when accessing I/O on the module. It is broken down into three groups: register addresses, coil addresses, and discrete input addresses. Register addresses are used with the modbus register functions. Coil addresses are used with the modbus coil functions, and discrete input addresses are used with modbus discrete input functions.

The following is an example of a Modbus Address Table. Note that while the module might not have all the I/O hardware present in the table, it can have remote I/O for those types.


Register AddrCoil AddrInput Addr
IO NameIOPulse TimerCounterOn TimerTotal On TimerIOIO
Relay 105120
Input 121026153820501
Analog Input 14
Vin6

The first column in the Modbus Address Table lists the name of the I/O. The seconds column lists the register address for the I/O. All I/O can be read and written as a register using this address and the modbus register functions regardless of the I/O type. Columns 3 through 6 are the register addresses used to access auxiliary functions of relays that have Pulse Timers, and digital inputs that have Counters, On Timers, and Total On Timers. The seventh column contains addresses used to read and write digital I/O and relays using the modbus coil functions. The last column contains addresses used to read digital I/O and inputs using the modbus discrete input functions.

The following sections provide an overview and explanation of the different Modbus functions.

6.7.1   Modbus Function Code Summary

The module supports the following function codes for reading and writing I/O. If the I/O type does not exist on the module, the function code is still supported for use with remote I/O of that type.

Code NameModbus FunctionUsage
Read Coils01Read Relays and Digital I/O (Configured as outputs)
Read Discrete Inputs02Read Digital Inputs and Digital I/O (Configured as inputs)
Read Multiple Registers03Read Vin, Sensors, Registers, Counters, Analog Inputs (All I/O both Local and Remote)
Write Single Coil05Write Relays and Digital I/O (Configured as outputs)
Write Multiple Coils15Write Digital Inputs and Digital I/O (Configured as outputs)
Write Multiple Registers16Write Digital I/O Pulse Counters, Registers, Counters (All writable I/O)

Multiple commands may be sent without closing and re-opening the connection, but if no data is transferred for 50 seconds, the connection will time out and close. To keep the connection open, a read request can be sent periodically.

The module has two TCP sockets available for Modbus/TCP. This allows two connections to be open at one time. Requests for more than two open connections will be rejected.

When errors occur, an error code is returned. Most Modbus client software will interpret this code in a human readable form. The code is comprised of the original function code plus 0x80. For example, an error during the read coils function 0x01 would return 0x81. Each error has a qualifying exception number. The following are the possible exception codes and their meanings:

0x01 – Function code not supported (also when Modbus is disabled in the setup pages).

0x02 – Incorrect starting address/quantity of output combination.

6.7.2   Read Coils – Modbus Function Code 01 (0x01)

Read the state of relays and digital I/O configured as outputs.

Request

Start Address: Refer to Modbus map in setup pages

Coil Quantity: Refer to Modbus map in setup pages. Multiple Outputs may be read at the same time by specifying the correct starting address and quantity of coils to be read.

Response

The module will respond to the request with a data field of one or more bytes depending on the number of coils read. Each bit represents a coil status. A ‘1’ indicates the Output is ON. A ‘0’ indicates that the Output is OFF.

Bit zero of the return value will be the state of the coil corresponding to the start address. For example, if a start address of 0x0001 is used, bit zero will be the status of the first relay or digital I/O.

Coil State Byte
Bit 7654321Bit 0
XXXXXXDigital I/O 2Digital I/O 1

Errors

The sum of the start address and coil count cannot exceed the maximum coil count or an error response will be returned.

The following are possible error responses:

Coil Read Error Function Code (1 byte):0x81
Exception Codes (1 byte):0x01 – Function code not supported.
0x02 – Incorrect combination of start address and quantity of Digital I/O

6.7.3   Read Discrete Inputs – Modbus Function Code 02 (0x02)

This function returns the state of digital inputs and digital I/O (when configured as inputs).

Request

Start Address: Refer to Modbus map in setup pages

Input Quantity: Refer to Modbus map in setup pages. Multiple Inputs may be read at the same time by specifying the correct starting address and quantity of inputs to be read.

Response

The inputs states are indicated by bits in the status byte(s). A 1 indicates that the input is switched ON. A 0 indicates that the input switched OFF. Bit zero of the return value will be the state of the discrete input corresponding to the start address. For example, if a start address of 0x0001 is used, bit zero will be the status of input 2.

Discrete Input State Byte
Bit 7654321Bit 0
XXxxxxDigital I/O 2Digital I/O 1

Errors

Input Read Error Function Code (1 Byte):0x82
Exception Codes (1 byte):0x01 – Function not supported.
0x02 – Incorrect combination of start address and quantity

6.7.4   Read Holding Registers – Modbus Function Code 03 (0x03)

The Read Holding Registers function is used mainly to read analog I/O such as the analog inputs, registers, counters, and vin. All I/O can be read using this function code. The holding register addresses can be found in the Modbus Address Table in the Advanced Network setup page under Modbus.

Request

32-bit sensor values are read from 16-bit register pairs. Consequently, senors addresses and registers must be even numbers.

Start Address: Refer to Modbus map in setup pages

Input Quantity: Refer to Modbus map in setup pages. Multiple Registers may be read at the same time by specifying the correct starting address and quantity of registers to be read. The number of registers read must be divisible by 2.

Response

32-bit floating-point values are returned, either as little-endian or big-endian numbers, depending on the configuration in the Advanced Network tab.

With little-endian ordering, a temperature reading of sensor 1 would return 0x800042A2. The least significant word would be 8000 hex and the most significant word would be 42A2. This hexadecimal value converts to a temperature reading of 81.25 degrees.

If a temperature or humidity sensor is not installed, a value of 0xFFFFFFFF (NaN) is returned. Other inputs will show measured values of the open circuits.

Errors

Sensor Read Error Function Code (1 byte):0x83
Exception Codes (1 byte):0x01 – Function code not supported.
0x02 – Incorrect combination of start address and input quantity

6.7.5   Write Single Coil – Modbus Function Code 05 (0x05)

Control digital outputs and relays one at a time.

Request

Start Address: Refer to Modbus map in setup pages

Output Value: 0x00 (Off), 0xFF(On)

Response

The response mirrors the requested state, 0x00 or 0xFF.

Errors

Single Coil Write Error Function Code (1 Byte):0x85
Exception Codes (1 byte):0x01 – Function not supported. 0x02 – Address out of range. 0x03 – Padding value.

6.7.6   Write Multiple Coils – Modbus Function Code 15 (0x0F)

One or more bytes can be written to set the state of multiple digital outputs and relays, each bit representing one digital output or relay.

Request

Digital output and relay states are controlled by specifying the start address of the first digital output to be controlled, the number of the digital outputs to be affected, and the digital output state byte(s).

A value of 0xFFFF would be used to turn ON up to 16 digital outputs and relays. A value of 0x0000 would be used to turn them OFF. A value of 0xF0 would turn off the first 4 digital outputs while turning on outputs 5 through 8.

Start Address (2 bytes): Refer to Modbus map in setup pages

Output Quantity (1 bytes): Refer to Modbus map in setup pages

Byte Count (1 byte): Refer to Modbus map in setup pages (Output Quantity divided by 8)

Digital I/O Value (Byte Count bytes): 0x0000 – 0xFFFF

Digital I/O State Byte
Bit 7654321Bit 0
XXXXXXDigital I/O 2Digital I/O 1

Response

The quantity value is returned.

Errors

Multiple Coil Write Error Function Code (1 Byte):0x8F
Exception Codes (1 byte):0x01 – Function not supported 0x02 – Incorrect combination of start address and Digital I/O quantity 0x03 – Byte count out of range

6.7.7   Write Multiple Registers – Modbus Function Code 16 (0x10)

The Modbus Write Multiple Registers function can be used to set the state of writable analog I/O such as registers and analog outputs.

Request

Start Address: Refer to Modbus map in setup pages

Input Quantity: Refer to Modbus map in setup pages. Multiple Registers may be written at the same time by specifying the correct starting address and quantity of registers to be read. The number of registers written must be divisible by 2. The values sent are in IEEE 754 floating point format. Also, the endianness configured in the modbus setup pages is taken into account.

In little-endian the value 81.25 would be as follows: 0x800042A2. The least significant word would be 8000 hex and the most significant word would be 42A2. In big-endian, the least significant word would be 0x42A2 and the most significant word would be 0x8000.

Response

The request is acknowledged by responding with the register quantity that was written.

Errors

Pulse Function code Error (1 Byte):0x90
Exception Codes (1 byte):0x01 – Feature not supported. 0x02 – Address quantity not an even number. Incorrect combination of start address and register count.

6.8  BASIC Scripts


BASIC (Beginners All-purpose Symbolic Instruction Code) is a computer programming language that has been in use for many years. The module has an integrated BASIC interpreter for a simple BASIC script. This provides a great deal of flexibility by allowing users to customize basic functions of the unit.

The interpreter only supports a small subset of the BASIC commands that are available for larger computers. Some non-standard commands have been added, and some commands may function differently on the module’s BASIC interpreter than on other platforms. The following is a short tutorial on the supported BASIC functions.

Example scripts are available at https://controlbyweb.com/support/basic-script-tutorial/. Contact customer support if further assistance is required.

6.8.1   Structure

A BASIC script is written as a .txt file, which is then uploaded to the device using the Script setup tab. The maximum script size is 4-Kbytes. Each line 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 command. For those not familiar with nesting, the following is an example of nested FOR loops:

FOR a = 0 to 100

    FOR b = 0 to 100

    NEXT b

NEXT a

Every program must end with an END statement. Subroutines would then follow after the END statement, if required. The last line of the script should be left blank.

6.8.2   Line Format

Every line follows the same format. The basic format is:

      statement (variable) (=, <, >, <=, >=, <>) (expression) (THEN)

The fields in parentheses are optional depending on the statement. One space must be used between all statements, numbers, variables, operators, expressions, etc. Multiple spaces are invalid.

Comments may be inserted, but must begin with an apostrophe. All text on a line after the apostrophe is ignored. For example:

LET a=1 ‘this will return an error because of insufficient spacing

LET a = 1 ‘this is valid

LET a = 1 ‘this will return an error because of too many spaces

Only a single variable or literal is allowed on the left side of any operator. The following example is incorrect and will return an error. The error occurs because there is more than a single value to the left of the comparison operator (a + b is to the left of =).

IF a + b = 3 THEN ‘this will return an error

To fix the above line, replace ‘a + b’. One of the following options may be used:

Let c = a + b

IF c = 3 THEN

6.8.3   Supported Statements

The following are the statements supported by the ControlByWeb™ BASIC interpreter.

LET

The LET statement assigns a variable a value. The format is:

LET (variable) = (expression)

IF THEN, ELSE, END IF

The IF THEN statement tests the truth of a condition. The ELSE statement defines a second function if the condition is found false. In other words, if the condition is true, then a function is performed. If it is not true, a second function may be performed. The second function may or may not be necessary depending on the application. The IF THEN (ELSE) statement must always be followed with an END IF statement. The format is:

IF (variable) (=, <, >, <=, >=, <>) (expression) THEN

(Function 1)

ELSE

(Function 2)

END IF

A special Variable NAN is available to check if I/O values are valid before using them. To check if a 1-Wire temperature sensor value is valid before using it to send an email the following could be used:

IF NAN <> io.oneWireSensor1 Then

‘ send email

ELSE

‘ do something else

END IF

Note: In most BASIC interpreters, ‘Function 1’ (see above) may be placed after the THEN statement. This interpreter requires ‘Function 1’ to be put on the following line.

FOR TO, NEXT

The FOR TO statement loops a section of code a predefined number of times. The NEXT statement always follows the section of code to be looped. The format is:

FOR (variable) = (expression) TO (expression)

(code to be looped)

NEXT (variable)

DO WHILE, LOOP

The DO WHILE statement loops a section of code while a condition is found true. The LOOP statement always follows the section of code to be looped. Note that if the condition is omitted, the code will be looped without end. The format is:

DO WHILE (variable) (=, <, >, <=, >=, <>) (expression)

(code to be looped)

LOOP

If the loop is to continue indefinitely, the format would be:

DO

(code to be looped)

LOOP

Example:

let t0 = 100

do while t0 > 0

        ‘ wait

loop

LOG

The LOG statement causes the device to log data according to the settings specified under the Logging setup tab.

Note: In order to log, logging must be enabled in the Logging setup tab.

The format is: LOG

EMAIL

The EMAIL statement causes the device to send an email of the same format as that generated by other status change and alarm conditions. If an I/O variable is given as a parameter, then the subject line in the email will contain “Variable Name = Variable Value”. If no I/O variable is given, then the subject of the email will be “Basic Script”.

      EMAIL (io.digitalIO1, etc)

Examples:

EMAIL

      …or…

EMAIL io.analogInput1

      …or…

EMAIL io.input1

      …or…

EMAIL io.temp2

END

The END statement ends the main body of code.

CALL

The CALL statement is found within the main body of code, but requires the interpreter to skip to a subroutine found at the end of the program. After the subroutine is finished, the interpreter returns to the line immediately following the CALL statement. The format is:

      CALL (name of subroutine)

SUB, END SUB

The SUB statement defines the beginning and name of a subroutine. The END SUB statement defines the end of the respective subroutine. Subroutine names can be up to 20 characters long and are case sensitive. The SUB and END SUB statements always must follow the END statement. The format is:

      END

      ‘*** Subroutines Go Here ***

      SUB (name of subroutine)

         (contents of subroutine)

      END SUB

      SUB (name of subroutine)

         (contents of subroutine)

      END SUB

REM or ‘

The REM or apostrophe ( ‘ ) statement designates remarks made by the programmer. The interpreter will disregard any characters on the line following these statements.

6.8.4   User-Defined Variables

Two types of variables are available for use in the ControlByWeb™ BASIC interpreter, user-defined variables, and predefined variables.

Up to 10 user variables may be initialized. These must be single character, lower case letters.

      a, b, c, d, e, f, g, h, i, j

They are always global and stored internally as floating point numbers. Variables are defined using the LET statement.

Examples:

Let b = 5 ‘variable b will be set to 5

Let d = b + 2 ‘variable d will be set to 7

6.8.5   Predefined Variables

The following are useful predefined variables for the ControlByWeb™ BASIC interpreter. These are useful for accessing internal values and features states.

Timer Variables

Ten timers are available for use in BASIC scripts.

       t0, t1, t2, t3, t4, t5, t6, t7, t8, t9

Timers can be set to any positive integer (or 0) by using the LET statement. As soon as a value is assigned to a timer, it will begin to count down immediately by decrementing one count every 100 ms until it reaches zero.

Examples:

Let t3 = 1500 ‘set timer 3 to 150 seconds

Let t1 = 0 ‘disable time 1

These timers are different than the Timer I/O that can be configured under the I/O setup tab. They are only accessible to the basic script, and their resolution is 100 ms. The Timer I/O can also be accessed from the basic script as io.timer1, etc. These timers have 1 second resolution.

Date and Time Variables

The variables ‘time’ and ‘date’ are predefined, read only variables that store the current date and time. They can be used to schedule events and activities, such as sending emails, reading temperature, or setting Outputs. The date uses the mm/dd/yyyy format. Clock time is formatted as hh:mm:ss (24-hour clock).

Example:

If date = 01/01/2014 Then

  If time > 12:30:00 Then

      Let io.rmtRelay1 = 1

      Let io.rmtRelay2 = 0

  End If

End If

Note: Current date and time can only be set in the Date/Time tab.

Event Variables

Data and time variables can be used to execute script events.

Up to ten date variables are available.

      ed0 ‘event date variable 0

      ‘ed1, ed2, ed3, ed4, ed5, ed6, ed7, ed8,

      ed9 ‘event date variable 9

The value assigned to event variables should be in the format mm/dd/yyyy. The event date variables store the number of days that have passed since January 1, 1970.

Event time variables may be used in math expressions as well as comparison statements.

Time variables have a similar naming convention.

      et0 ‘event time variable 0

      … ‘et1, et2, et3, et4, et5, et6, et7, et8

      et9 ‘event time variable 9

Event time variables are declared in the format hh:mm:ss in 24-hour time. The event time variables store the number of seconds from the beginning of the day.

Event date and event time variables of the same number are linked. If the event time variable is incremented more than the number of seconds in a day (86400 seconds), the variable is reset to 0 and the event date variable is incremented by one. For example, if et3 rolls over to zero, ed3 will be incremented.

The following script example demonstrates defining the event variables and comparing it to the current date and time. Assume current time is April 10, 2010 at 1:30 AM and the event should occur in one hour and every hour thereafter.

Example:

Let a = 1

Let ed1 = 04/10/2010 ‘sets the event date to April 10,

‘2010.

Let et1 = 02:30:00 ‘sets the event time to 2:30

Do While a <> 0

  If ed1 >= date Then ‘Tests event date versus current date.

      If et1 >= time Then ‘Tests event time versus current time.

            Let et1 = et1 + 3600 ‘Increments the event time by one hour

‘(in seconds).

‘Event to occur would go on this line

      End If

  End If

Loop

End

6.8.6   I/O Variables

The BASIC interpreter has full access to all configured I/O on the module. The I/O are treated as variables and can be read and written to the same as other variables. Depending on the ControlByWeb device, the number fixed I/O resources will vary. After I/O is added and defined they can be controlled and monitored within BASIC scripts.

BASIC scripts must reference I/O resources such as digital inputs and relays in the form of io.name where “name” is the resource name defined when the resource was added in the I/O Setup tab. If the resource name has embedded spaces, they must be removed in the io.name statement. For example, if a remote relay is named “Warehouse Fan”, the fan can be turned on with the BASIC statement “LET io.warehouseFan = 1”. If a resource name is changed during development and testing, the resource name in the BASIC script must be renamed to match.

The button on the BASIC setup page displays a list of all of the I/O resources currently available together with the equivalent token to be used in BASIC scripts to reference the respective I/O resource.

Relay Variables

Relay variables are represent the state of the relays and can be used to change the state of the relays. Remote relays and local relays are read and controlled the same. Below is an example on how to access the relays provided they are at the default names.

io.relay1 ‘relay 1

io.device1Relay1 ‘remote relay 1

Note: Commands can be sent to remote relays, but the states of those relays cannot be reliably read immediately. Consequently, remote relays should not be used in safety or security-critical applications.

Relay outputs can be turned ON, turned OFF, pulsed, toggled, or read in BASIC scripts. The LET statement is used to set the output state. The state options available are:

0 – turn relay off

1 – turn relay on

2 – pulse relay

5 – toggle relay

The pulse time is specified in the Relay setup tab.

Examples:

Let io.relay1 = 1 ‘turn on relay 1

Let io.relay1 = 0 ‘turn off relay 1

Let io.relay1 = 2 ‘pulse relay 1

Let io.relay1 = 5 ‘toggle relay 1

Let a = io.relay2 ‘read the state of relay 2, state will be 0 or 1

Digital Input Variables

The digital input states can be read in BASIC scripts. Below is an example assuming the name for input 1 is left at the default.

io.digitalInput1 ‘digital input 1

Example:

Let a = io.digitalInput1 ‘sets ‘a’ equal to value of input 1

Counter Variables

The input counter can be read in BASIC scripts. Below is an example assuming the name for input 1 is left at the default.

io.digitalInput1.count ‘input 1 counter

Example:

If io.digitalInput1.count > 5000 Then ‘If input counter 1 is greater than

5000 then

Let io.relay1 = 1 ‘turn output 2 on

End If

Analog Input Variables

The analog input scaled values can be read in BASIC scripts. Below is an example assuming the name for analog input 1 is left at the default.

      io.analogInput1 ‘analog input 1

Example:

If io.analogInput1 > 4 Then ‘If Analog Input 1 is greater than 4 then

        Let io.rmtRelay1 = 2         ‘Pulse remote relay 1, otherwise

Else

        Let io.rmtRelay1 = 0         ‘remote relay 1 will be off

End If

Analog Output Variables

The analog outputs can be set in BASIC scripts. The LET statement is used to set the analog output. Note: the output value is subsequently processed by the Y=mX+b equation to generate the actual output of the digital to analog converter. In the example below the User Input Max and User Input Min fields of the Analog Outputs tab have been set for a 1 to 1 output relationship (no scaling). This allows the BASIC calculations and output settings to be in engineering units.

Example:

Let io.analogOutput1 = 0 ‘set analog output 1 to 0.0V

Let io.analogOutput2 = 2.5 ‘set analog output 2 to +2.5V

Let io.analogOutput3 = 10 ‘set analog output 3 to +10V

Let io.analogOutput4 = -2.5 ‘set analog output 4 to -2.5V

Let io.analogOutput5 = 20 ‘set analog output 5 to 20.0mA

Temperature/Humidity Sensor Variables

Each temperature sensor or humidity sensor can be read in BASIC scripts. Below is an example assuming the name for the 1-Wire sensor is left at the default.

      io.oneWire1 ‘temp or humidity sensor 1

Example:

If io.oneWire1 >= 80 Then ‘If temperature sensor reads greater than 80

‘ degrees, then

    Let io.relay2 = 1 ‘Turn on relay 2

End If

Registers

Registers are similar to general-purpose variables and can be used in the same manner. The difference between general-purpose variables and registers is that registers can be accessed by the user through a web browser and modified while the script is running. Scripts can use registers as a method of retrieving input from the user or through any of the scheduled or conditional tasks. Below is an example of how to access a register assuming it is at the default name.

      io.register1

The following example demonstrates the BASIC script reacting to user input by creating a script that will turn ON a remote relay if Register 1 equals 1 and turn OFF if a remote relay if Register 1 equals 0.

Example:

Do

    If io.register1 = 1 Then

        Let io.device1Relay1 = 1

    Else

        Let io.device1Relay1 = 0

    End If

Loop

End

Registers can also be used to show numeric values, such as a count-down timer. The following code will show a count down from 10 seconds and automatically restart. The refresh rate must be configured in the Control Page Setup in order to see each of the count-down values.

Example:

let t0 = 10 ‘Initialize variables and start timer

let io.register1 = 10

‘Main Loop

Do

if t0 = 0 ‘when timer reaches 0 decrement counter

        let io.register1 = io.register1 – 1

        let t0 = 10

end if

if io.register1 < 0 ‘restart when counter reaches zero

        let io.register1 = 10

end if

loop

end

Appendix A: Restoring Factory Default Settings


In the event that the IP address or passwords are forgotten, the module may be restored to its original factory default settings.

1. Remove the DC power from the unit.

2. Use a thin, non-conductive object (such as a toothpick) to press and hold the small button located on the bottom of the unit. When the object is inserted, a tactile feedback can be felt as the button is depressed.

CAUTION: Do not use metal objects for this function

3. While depressing the button, apply power. While holding the button, you should see both the Link and Activity lights on the Ethernet port flash.

4. Continue holding the button for five seconds before releasing the button. All settings will be back to the original factory defaults. log.txt and syslog.txt are retained.

5. Refer to Establishing Communications for Setup to begin reconfiguration of the module.

400 Series Device Reset Button Location

Appendix B: Installing New Firmware


From time to time, updates are made to the module’s firmware. As an industrial device and unlike many consumer products, firmware updates are recommended only on an as-needed basis. The firmware can be updated in the field. The procedure for updating the firmware is outlined below. Please note that it is important that this procedure is followed precisely.

Requirements

The firmware update software requires Windows 7/8/10.

Setup

1. Updating firmware will not automatically save settings, scripts, etc. Before proceeding with the firmware update, please back up all settings files and Basic scripts.

2. Contact technical support if a firmware update is needed and a download link will be provided. Only a module’s image can be installed on the module, so make sure the correct image is being downloaded.

3. bootloader.exe will connect to the module using default IP address 192.168.1.2, not the address currently assigned to the module. After the update, all settings will be lost and the device will return to its default IP address of 192.168.1.2. Configure the PC to the same subnet as the IP address 192.168.1.2, such as 192.168.1.10. For instructions on doing this see Section Establishing Communications for Setup.

Note: The IP address of the module will automatically be set to the default 192.168.1.2 during the update process. Since the module supports Auto Negotiation, a crossover cable is not necessary.

4. Open the bootloader.exe utility on the computer by double clicking on the downloaded file.

5. Within the ControlByWeb™ Programmer utility programmer, select File, then Open. Specify the firmware image downloaded from the ControlByWeb™ website.

Device Upgrade Procedure

Carefully follow the following steps to put the module into bootloader mode and perform the upgrade:

1. Remove DC power from the module.

2. Using a small, non-conductive tool, press and hold the reset button.

3. While holding the reset button, apply power to the module. The LINK and ACT lights will flash. Continue to hold the reset button for the next step.

4. While holding the reset button, press the Upload Firmware button at the bottom of the ControlByWeb™ Programmer window. After the programming process begins, the reset button can be released.

5. Programming will take approximately 60 seconds, the LINK LED will stop flashing and remain lit. The module will be set to factory defaults with an IP address of 192.168.1.2.

6. Refer to Section Establishing Communications for Setup to reconfigure the device. Verify the new version of firmware has been installed by viewing the default setup page with a web browser (http://192.168.1.2/setup.html).

Appendix C: Accessing the Device Over the Internet


The module can be monitored and/or controlled from a remote location over the Internet. Once the module can be accessed on the local network, almost all of the settings required to provide remote access are in the router and not in the module.

This guide is not meant to be a tutorial in router setup, but rather to provide a basic overview of remote access. For specific details, the user should refer to the instruction manual for the router on the local network. Users not familiar with basic IP networking should study one or more basic IP networking tutorials before proceeding (many tutorials are available on the Internet).

IP Addresses

Every device on the Internet is identified by a unique address called an IP (Internet Protocol) address. IP addresses are somewhat similar to mailing addresses in that they identify the precise logical location of the device on the Internet. The IP address identifies the global region down to the network and then the specific device on that network. IP addresses are globally maintained and assigned by an entity called the Internet Assigned Numbers Authority (IANA). IP addresses consist of four sets of numbers that range from 0 to 255 and are separated by a decimal. For example, 192.168.200.167 is an IP address.

Every device that is “directly” connected to the Internet uses a “public” IP address. The module can be assigned a public IP address for direct connection to the Internet. Typically, a public IP address to would only be assigned to the module when it is the only device on the local network. The IP address would be obtained from an Internet Service Provider (ISP).

Due to the limited number of public IP addresses, private networks can be set up with “private” IP addresses. These addresses are used within a local network and have no global designation, they are not routed on the Internet. The following address blocks are designated for private networks (where x represents decimal numbers from 0 to 255): 192.168.x.x, 10.x.x.x, and 172.16.x.x.

A Simple Local Area Network

A small Local Area Network (LAN), can be made up of two or more computers or other devices connected to an Ethernet switch. Each device on the network is assigned a unique private IP address. For example, consider a simple network that consists of a computer, an X-410, and a WebRelay™. In this example, the computer is assigned an IP address of 192.168.1.10, the X-410 has the IP address of 192.168.1.25 and a WebRelay™ has and IP address of 192.168.1.26. A person using the computer can access the X-410 by entering its IP address in the URL line in the browser, http://192.168.1.25. Similarly, the WebRelay™ can be accessed by entering its unique private IP address in the URL line in the browser, http://192.168.1.26.

X-410 LAN Connection Example

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 to the LAN and another connection to the Internet. Often the Internet connection is called a Wide Area Network (WAN) 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 203.0.113.254.

X-410 Network Connection Example

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 ISP server on the Internet. The ISP server does not send the response directly to the computer on the LAN, but to the router at the IP address of 203.0.113.254. 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 (NAT).

Port Forwarding

The router can be configured to allow outside access to the ControlByWeb devices. All requests from the Internet to any device on the local network must use the public IP address (203.0.113.254). With only a single IP address, TCP ports are used to identify the intended device for the incoming message.

Using the mailing address analogy, the port is similar to a post office box. The IP address specifies the location, and the port specifies the specific recipient. Port numbers can be set to any number between 1 and 65535. However, many port numbers are reserved for specific applications and should be avoided. As a general rule, numbers above 8000 are safe to use. All of the ControlByWeb™ devices come from the factory with the HTTP port set to 80, which is the standard port for HTTP. In the example above, the X-410 HTTP port will be changed to port 8000 and WebRelay™ port will be changed to 8001. Once the ports are changed in the two ControlByWeb™ devices, the router must be set up for port forwarding.

Port forwarding associates the IP address of each local device with an assigned port. In the above example, the address 192.168.1.25 for the X-410 would be associated with port 8000. The address 192.168.1.26 for WebRelay™ would be associated with port 8001. The X-410 would be accessed from the Internet by entering the public IP address of the router, plus the port number assigned to the X-410 in the URL window of the browser, http://203.0.113.254:8000. All Internet requests to the router for port 8000 would be forwarded to the X-410. Similarly, all request for port 8001 would be forwarded to WebRelay.

Note: When an HTTP request comes in to the router without the specific port specified (http://203.0.113.254), the router will handle this as a port 80 request (default HTTP port). In other words, http:// 203.0.113.254 is exactly the same as http://203.0.113.254:80.

Router configuration can vary widely. Some routers have the capability of translating the addresses and the ports, which would require no port configuration change on the ControlByWeb device. For example, the router would be configured so that messages sent to http://203.0.113.254:8000 would be forwarded to http://203.0.113.254:80, which is the default HTTP port.

An example screenshot of a router configuration is given below. This setup allows the two ControlByWeb™ devices in the above example to be accessed remotely from the Internet.

Network Port Forwarding Example

Example of Port Range Forwarding

Note: This screenshot is simply an example of a typical router setup page. Routers will vary.

Accessing Setup Pages

After changing ports, the setup pages are accessed on a local network as described below:

http://(ControlByWeb Device’s Local IP Address):(Port Number)/setup.html

For example, to access the setup pages when the port is set to 8000, the following command would be used:

http://192.168.1.25:8000/setup.html

To access the ControlByWeb™ devices from the Internet, enter the public IP address of the router plus the port number of the desired device in the following format:

http://(Public IP Address of Router):(Port Number of Device)/setup.html

Using the example above, the following line would be used to access the setup page of the X-410:

http://203.0.113.254:8000/setup.html

Appendix D: Specifications


Power Requirements:

ModelInput Voltage
X-400-I9-28VDC
X-400C-I9-28VDC
X-401-I9-28VDC
X-401-EPower Over Ethernet (*) and/or 9-28VDC.
X-404-I 9-28VDC
X-404C-I 9-28VDC
X-405-I 9-28VDC
X-405-E Power Over Ethernet (*) and/or 9-28VDC.
X-406-I 9-28VDC
X-406-E Power Over Ethernet (*) and/or 9-28VDC.
X-408-I 9-28VDC
X-408-E Power Over Ethernet (*) and/or 9-28VDC.
X-410-I 9-28VDC
X-410-E Power Over Ethernet (*) and/or 9-28VDC.
X-412-I9-28VDC
X-412-EPower Over Ethernet (*) and/or 9-28VDC.
X-412C-I9-28VDC
X-417:1-I
X-417:2-I
X-417:3-I
X-417:4-I
X-417:5-I 
9-28VDC
X-418-I 9-28VDC
X-418-E Power Over Ethernet (*) and/or 9-28VDC.
X-420-I 9-28VDC
X-420-E Power Over Ethernet (*) and/or 9-28VDC.

*48V injected into Ethernet Line as per 802.3af specification, POE Class 1 (0.44Watt to 3.84Watt range)

X-400-I Input Current: Values at 25

Power SupplyTypical Current (no expansion modules)Max Current (X-400 + 1.7A for expansion modules)
9 VDC134 mA1.834 A
12 VDC101 mA1.801 A
24 VDC55 mA1.755 A

X-400C-I Input Current: Values at 25

Power SupplyTypical Current (no expansion modules)Max Current (no expansion modules)Max Current (X-400 + 1.7A for expansion modules)
9 VDC190 mA240 mA1.94 A
12 VDC130 mA185 mA1.85 A
24 VDC80 mA95 mA1.80 A

X-401 Input Current: Values at 25

Power SupplyTypical No Relays or Inputs OnTypical 2 Relays and Inputs On
9 VDC107 mA233 mA
12 VDC83 mA180 mA
24 VDC46 mA108 mA

X-404-I Input Current: Values at 25

Power SupplyTypical Current (no modbus sensors)Max Current (X-404 + 1.7A for modbus sensors)
9 VDC134 mA1.834 A
12 VDC101 mA1.801 A
24 VDC55 mA1.755 A

X-404C-I Input Current: Values at 25

Power SupplyTypical Current (no expansion modules)Max Current (no expansion modules)Max Current (X-400 + 1.7A for expansion modules)
9 VDC190 mA240 mA1.94 A
12 VDC130 mA185 mA1.85 A
24 VDC80 mA95 mA1.80 A

X-405 Input Current: Values at 25

Power Supply Typical Current (1 sensor)
9 VDC 113 mA
12 VDC 90 mA
24 VDC50 mA

X-406 Input Current: Values at 25

Power SupplyTypical Current (no sensors)Typical Current (4 sensors)
9 VDC 110 mA 115 mA
12 VDC 89 mA 90 mA
24 VDC 50 mA 50 mA

X-408 Input Current: Values at 25

Power Supply Typical Current (8 inputs off)Typical Current (8 inputs on)
9 VDC 115 mA 175 mA
12 VDC 87 mA 133 mA
24 VDC 49 mA 74 mA

X-410 Input Current: Values at 25

Power Supply Typical No Relays or Inputs OnTypical 4 Relays and Inputs On
9 VDC 110 mA 240 mA
12 VDC 85 mA 180 mA
24 VDC 50 mA 100 mA

X-412 Input Current: Values at 25

Power Supply Typical No Relays On Analog Inputs Single EndedTypical All Relays On Analog Inputs Single EndedTypical No Relays On Analog Inputs 4-20mATypical All Relays On Analog Inputs 4-20mA
9 VDC 118 mA 230 mA135 mA245 mA
12 VDC 90 mA 172 mA103 mA184 mA
24 VDC 47 mA 90 mA54 mA96 mA

X-417 Input Current: Values at 25

Power SupplyTypical 5 Outputs in 0-5VTypical 5 Outputs in 4-20mA @ 20mA, 200ohmTypical 5 Outputs in 4-20mA @ 20mA, 1kohm
9 VDC 222 mA 294 mA529 mA
12 VDC 166 mA 226 mA380 mA
24 VDC 93 mA 115 mA196 mA

X-418 Input Current: Values at 25

Power Supply Typical Current Typical Current (4x 4-20mA mode)
9 VDC 134 mA 152 mA
12 VDC 103 mA 115 mA
24 VDC 58 mA 65 mA

X-420 Input Current: Values at 25

Power SupplyTypical Current
9 VDC 175 mA
12 VDC 135 mA
24 VDC 75 mA

I/O Connectors

5-position, removable terminal strip, 3.81 mm spacing

(replacement part number, Phoenix Contact 1827004)

14-position, removable terminal strip, 3.81 mm spacing

(replacement part number, Phoenix Contact 1803691)

Expansion Connector (X-400) Provides power and communication for expansion modules.

Connector:Ribbon cable,10-conductor, polarized, 2×5-position, 0.100” pitch
Communications:RS-485

RS-485 Connector (X-404) Provided power and communication with modbus sensors.

Connector:5-position, removable terminal strip, 3.81 mm spacing
Communications:RS-485

Cellular Antenna Connector (Cellular Devices only): Female, type SMA

1-Wire Sensor Input

+5Vout Output:5.0V, 100mA max

Relay Contacts (X-401)

Number of relays:2
Contact Form:SPDT (form C)
Contact Material:AgSnO2
Contact Resistance:< 50 milliohms initial
Internal Relay Mechanical Endurance:10,000,000 operations min. (under no load)
Internal Relay Electrical Endurance:100,000 operations average (under rated load)
Max Voltage:28VAC, 24VDC
Max Current:3A
Control Options:On/Off or Pulsed
Pulse Timer Duration:100ms to 86400 Seconds (1-day)

Relay Contacts (X-410)

Number of relays:4
Contact Form:SPST (form A)
Contact Material:AgNi
Contact Resistance:milli-ohm max
Internal Relay Mechanical Endurance:5,000,000 operations min. (under no load)
Internal Relay Electrical Endurance:100,000 operations average (under rated load)
Max Voltage:28VAC, 24VDC
Max Current:1A
Control Options:On/Off or Pulsed
Pulse Timer Duration:100ms to 86400 Seconds (1-day)

Digital Inputs (X-401, X-408, X-410)

Number of Inputs:X-401: 2; X-408: 8; X-410: 4
Minimum Hold Time (high or low):2.5mS
Input Current (Iin):950uA @ 4V, 8.5mA @ 26V
Reverse Voltage (Vr):6V max
Vin:26V (max)
Vin Hi:4V (min)
Vin Lo:1.5V (max)
Input Counter (24 bit):16,777,215 (max count)
Max Counter Frequency Input:200Hz

Analog Outputs (X-417)

Number of Outputs:1-5 (individually configurable)
Output Ranges:0-5V, 0-10V, ±5V, ±10V, 4-20mA (software selectable)
Resolution:16-bit DAC (0-65535)
Linearity Error: -count, monotonic DAC
Current Output (Voltage mode):10mA max (min load = 1K), 30mA max short circuit
Voltage Output Inaccuracy: .2% FSR, includes offset error, gain error and nonlinearity
Max Load Capacitance:20nF (no load), 5nF (1K load)
Current Output Range:4-20mA
Max Voltage in Current Mode24V
Current Output Inaccuracy: .2% FSR, includes offset error, gain error and nonlinearity
Isolated Power Supply:Internal DC-DC converter
Isolation:Galvanic, 1500 VAC
ESD Protection:Integrated 15kV protection (IEC61000-4-2)
Output Protection:Integrated over-temperature, open-line and short circuit protection
Output Alarms:Open current loop, high internal temperature
Load Type:Grounded, COM of all 5-channels are connected together
Output at power up:Programmable

Analog Inputs (X-412, X-418, X-420)

Number of channels:8ea (X-418), 4ea (X-420)
Resolution:16-bit, SAR
Type:Channels 1-4: Single ended, differential or 4-20mA (0-20mA)
Channels 5-8: Single ended or differential
Channels 1-8: Pseudo digital input
Input Range (programmable):1.28V, ±.56V, ±.12V, ±0.24V, ±0.48V (differential)
Max Input Voltage Range (Vin):-12.5V < Vin < +12.5V
Input Impedance (Zin):>500Meg Ohm
Channel Off Leakage:0.6nA (typ)
Input Common Mode Rejection:>100dB
Total Unadjusted Error:-9LSB (min), +9LSB (max)
Voltage Reference Drift: 5 ppm/ 
Internal 0-20mA input shunt:200.0-ohm,  .1%, 25ppm (uses  .12V range)
Logging Rate:25 Hz
Sample Rate:50 Hz

Pseudo Digital Inputs (X-412, X-418, X-420)

Vih (high-level input voltage): 3.5V
Vil (low-level input voltage): 1.5V
Sample Rate: 50 Hz

Digital Input/Output (X-420)

Number of Digital I/O: 2ea, programmable as an input or output
Pull-up/Pull-down Resistor: 47K
Vih (high-level input voltage): 3.5V min
Vil (low-level input voltage): 1.5V max
Vout: 5V CMOS logic thru a 49.9-ohm resistor
Debounce: Configurable, 0 to 250mS
Pulse Counters: 2ea, 24-bit
Max Counter Frequency Input: 200Hz

Frequency Input (X-420)

Type: AC coupled, referenced to Gnd, sine or square wave (works with millivolt magnetic wind speed sensors)
Input Voltage: +/- 12 VDC, 30Vpp AC max
Hysteresis: 25mV
Frequency: 0-20KHZ
Vin @ 1 Hz 50mVpp min
Vin @ 10 Hz 50mVpp min
Vin @ 100 Hz 60mVpp min
Vin @ 1 kHz 80mVpp min
Vin @ 10 kHz 700mVpp min
Vin @ 20 kHz 1.7Vpp min

Network

10 Base-T or 100 Base-T Ethernet IPv4 (10 Mbit/s or 100 Mbit/s)
Static IP address assignment or DHCP
HTTP port selectable
HTTPS port selectable
Standard 8-pin RJ-45 modular socket, with auto-negotiation
Supported Protocols: HTTP, HTTPS, SSL, XML, Modbus TCP/IP, SNMP V1,2C,V3, SMTP

LED Indicators

Power Green
Network Linked Green
Network Activity Yellow
Relay Yellow
Digital Input Yellow

Email Alerts

Email Addresses: Configurable, up to 8 addresses
Encrypted Email Alerts: STARTTLS and TLSL/SSL
Status Alerts: Analog and digital inputs, etc.
Other Alerts: Alert logic is fully customizable

Real-Time Clock

Manual or NTP (Network Time Protocol) setup
NTP Sync configurable for once, daily, weekly, or on power-up
Automatic daylight savings adjustment
Battery (capacitor) backup: Real-time clock, 1 register, 2 counters, 64 relay states (local and expansion modules only)
Backup Duration: 24 hours

Nonvolatile Memory

Flash Memory
All user settings are stored in nonvolatile memory. Settings will not be lost when power is disconnected.

Logging

Stored in Nonvolatile Flash

Circular Buffer

3072-Kbyte (up to 50688 log entries depending on configuration)

Unlimited data storage possible through sending the log through email or FTP services.

Password Settings

Password protection for Administrators (setup pages)

Optional password protection for Managers

Optional password protection for Users (control page)

Base 64 Password Encoding

Password Length: 18 character, case sensitive

Scripts

Implement special or custom features with a BASIC script

Max size : 4-Kbytes

Environmental

Operating Temperature: -40° to 65.5° (-40° to 150°)

Storage Temperature: -40° to 85° (-40° to 185°)

Altitude: up to 2000m

Humidity: 5-95% non-condensing

Mechanical

Size: 1.41 x 3.88 x 3.1 in. (35.7 x 98.5 x 78 mm), not including connector

Weight: 5 oz (142 g)

Electromagnetic Compliance

IEC CISPR 22, CISPR 24

EU EN55024, EN55022

X-400-I: FCC 47CFR15 (Class B)

Cellular Modules:

Contains FCC ID: N7NHL7648

Contains IC: 2417C-HL7648

Product Safety Compliance

UL 61010-1 (Electrical Equipment for Measurement, Control, and Laboratory Use)

CE Logo
FCC Logo

Appendix E: Trademark and Copyright Information


This document is Copyright 2005-2023 by Xytronix Research & Design, Inc. All rights reserved.

X-400™, X-401™, X-404™, X-405™, X-406™, X-408™, X-410™, X-412™, X-417™, X-418™, X-420™, WebRelay™, ControlByWeb™, and Xytronix Research & Design™ are trademarks of Xytronix Research & Design™, Inc. 2005-2023.

All other trademarks are the property of their respective owners.

All parts of this product and design including but not limited to firmware, hardware design, schematics, PCB layout, concept, graphics, users manual, etc., are property of Xytronix Research & Design, Inc. 2005-2023. The X-4xx modules may not be copied or reverse-engineered.

No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying or scanning, for any purpose other than the personal use by 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 this document as useful and accurate as possible, Xytronix Research & Design, Inc. assumes no responsibility for the application, usefulness, or completeness of the information contained herein. Under no circumstance will Xytronix Research & Design, Inc. be responsible or liable for any damages or losses including direct, indirect, special, incidental, or consequential damages or losses arising from either the use of any information contained within this manual or the use of any products or services referenced in this manual.

Xytronix Research & Design, Inc. reserves the right to change any product’s features, specifications, documentation, warranties, fee schedules, and conditions at any time and without notice.

Appendix F: Warranty


This Xytronix Research & Design, Inc. product is warrantied against defects in material and workmanship for a period of five years from the date of shipment. During the warranty period, Xytronix Research & Design, Inc. will, at its option, either repair or replace products that prove to be defective. This warranty is extended to the original purchaser of the equipment only.

For warranty service or repair, customer must contact Xytronix Research & Design, Inc. technical support ([email protected]) and obtain a Return Authorization number (RA#). Before issuing an RA#, a support technician will work with customer to try to resolve the issue without returning the product. If technician determines that product must be returned for service an RA# will be issued. Next, the product must be properly packaged and returned to Xytronix Research & Design, Inc. with the RA# clearly marked on the package. The purchaser shall prepay all charges for shipping to Xytronix Research & Design, Inc. For warranty repairs of products less than one year old, Xytronix Research & Design, Inc. will pay the shipping charges to return the product to the purchaser as long as the product is shipped within the continental United States. If the product is shipped outside of the continental United States or the product was shipped more than one year earlier, the purchaser shall pay all shipping charges both ways.

Limitation

The 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/environmental specifications for the product. Further, the warranty does not cover damage from Acts of God, such as lightning, fire, flood, hurricanes and tornadoes. This warranty does not cover damage to property, equipment, direct, indirect, consequential, or incidental damage (including damage for loss of business profit, business interruption, loss of data, and the like) arising out of the use or misuse of this product.

UNDER NO CIRCUMSTANCES WILL THE LIABILITY OF XYTRONIX RESEARCH & DESIGN, INC. TO THE PURCHASER OR ANY OTHER PARTY EXCEED THE ORIGINAL PURCHASE PRICE OF THE PRODUCT, REGARDLESS OF THE FORM OF THE CLAIM. No other warranty is expressed or implied. Xytronix Research & Design, Inc. specifically disclaims the implied warranties or merchantability and fitness for a particular purpose. Some jurisdictions may not allow the exclusion of limitation of liability for consequential or incidental damage.

Appendix G: FCC Statement


This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:

1. This device may not cause harmful interference.

2. This device must accept any interference received, including interference that may cause undesired operation.

Warning

This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not in-stalled and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: 

  • Reorient or relocate the receiving antenna.
  • Increase the separation between the equipment and receiver.
  • Connect the equipment into a relay on a circuit different from where the receiver is connected.
  • Consult the dealer or an experienced radio/TV technician for help.

Notice

Changes or modification not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment.

For Cellular Enabled Devices

RF Exposure Information

This equipment complies with the FCC RF radiation exposure limits set forth for an uncontrolled environment. The antennas used with this transmitter must be installed to provide a separation distance of at least 20cm from all persons and must not be located or operating in conjunction with any other antenna or transmitter.

Canadian License-Exempt Radio Apparatus (RSS-GEN)

This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device.

Le présent appareil est conforme aux CNR d’Industrie Canada applicables aux appareils radio exempts de licence. L’exploitation est autorisée aux deux conditions suivantes : (1) l’appareil ne doit pas produire de brouillage, et (2) l’utilisateur de l’appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d’en compromettre le fonctionnement.

Under Industry Canada regulations, this radio transmitter may only operate using an antenna of a type and maximum (or lesser) gain approved for the transmitter by Industry Canada. To reduce potential radio interference to other users, the antenna type and its gain should be so chosen that the equivalent isotropically radiated power (eirp) is not more than that necessary for successful communication.

Appendix H: Product Licensing


The webpages on the X-400 Series devices use javascript libraries that contain permissive free software licenses such as MIT and BSD 3-Clause. The licenses and copyrights are included directly in the source for setup.html on the module.

The firmware included in this product also contains copyrighted software that is licensed under various permissive free software licenses.

mbedtls – Copyright (C) 2006-2015, ARM Limited, All Rights Reserved

License: Apache-2.0

http://www.apache.org/licenses/LICENSE-2.0

lwIP – Copyright (c) 2001-2004 Swedish Institute of Computer Science.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Re-distributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Re-distributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Appendix I: Mechanical Dimensions


https://www.controlbyweb.com/x400/x-400_3d.stp

https://www.controlbyweb.com/x400/x-400c_3d.stp

https://www.controlbyweb.com/x401/x-401_3d.stp

https://www.controlbyweb.com/x404/x-404_3d.stp

https://www.controlbyweb.com/x404c/x-404c_3d.stp

https://www.controlbyweb.com/x405/x-405_3d.stp

https://www.controlbyweb.com/x406/x-406_3d.stp

https://www.controlbyweb.com/x408/x-408_3d.stp

https://www.controlbyweb.com/x410/x-410_3d.stp

https://www.controlbyweb.com/x412/x-412_3d.stp

https://www.controlbyweb.com/x417/x-417_3d.stp

https://www.controlbyweb.com/x418/x-418_3d.stp

https://www.controlbyweb.com/x420/x-420_3d.stp

https://www.controlbyweb.com/x432/x-432_3d.stp

400 Series Device Dimensions
Was this article helpful?

Contents

Need Support?

Can't find the answer you're looking for?
Contact Support
Shopping Cart