W&T connects
Interfaces for TCP/IP, Ethernet, RS-232, RS-485, USB, 20mA, glass and plastic fiber optic cable, http, SNMP, OPC, Modbus TCP, I/O digital, I/O analog, ISA, PCI

Application for the Web-IO Digital:

By using a Windows PC and task planner, the Web-IO Digital becomes a timer switch


Timer switches are used for a variety of tasks such as turning on courtyard or entrance lighting or neon signs, opening and closing rollup blinds or activating a break announcer. The applications for time controlled switching processes are innumerable. Typically a separate timer is used for each individual task, which needs to be configured and set individually.

Network

In most companies there are centralized file servers which are running 24/7/365 anyway. A server running under Windows can easily assume the tasks of a central timer (of course this is also possible using Linux servers and Linux PCs).

With the Windows task planner, you can use the network to control the outputs on Web-IO Digital boxes. The task planner opens a small VSCript and batch file at the desired time. In this way you have combined the switching tasks in one central location but can still switch decentrally.

The example described below shows you how this can work.

Preparations

You have already provided your Web-IO Digital

1. VBScript for controlling the outputs

To be able to directly switch from within the task planner or a batch file, you can use the VBScript setoutputs.vbs, which is available for downloading from www.wut.de. Detailed descriptions for this VBScript are located on the associated application page.

When the script is invoked the necessary parameters are passed by means of which you determine which Web-IO is supposed to execute which switching action.

IP IP address of the Web-IO
PORT TCP port of the Web-IO This parameter is optional; if it is not transmitted, the script uses Port 80
PW Administrator or operator password for the Web-IO This parameter is optional; if it is not transmitted, the script runs without a password
MASK indicates in hex format which outputs are supposed to be set This parameter is optional; if it is not transmitted, the script runs using all outputs
STATE indicates in hex format to which state the outputs are supposed to be set

The script invocation looks as follows:

setoutput.vbs IP=<IP address> [PORT=<portno.>] [PASSWORD=<password>] [MASK=<hex value>] STATE=<hex value>

Example: You want to turn Output 1 on Web-IO 10.40.22.101 ON. But Output 0 should remain unchanged. "XYZ" was assigned as the password for the Web-IO:

setoutput.vbs IP=10.40.22.101 PASSWORD=XYZ MASK=2 STATE=2

To turn Output 1 OFF, setoutputs.vbs must be parameterized as follows:

setoutput.vbs IP=10.40.22.101 PASSWORD=XYZ MASK=2 STATE=0

You could save both script invocations for example as a batch job under the name lighton.bat and lightoff.bat.

2. Creating a switching task in the task planner

Depending on which Windows version is used, the procedure may vary slightly from the example shown here.

Switching task: You want to turn on the courtyard lighting at a company on each day at 5:00 p.m.

Output 1 on the Web-IO 10.40.22.101 controls a relay which powers the lighting. For this you can use the batch file lighton.bat.

To create a new task, first select Start >> Programs >> Accessories >> System Tools >> Scheduled Tasks.

Double-click on Add Scheduled Task

.

Click on Next

.

Click on Browse

.

and select the file lighton.bat

.

Select Daily and click on Next

.

Enter 5:00 p.m. as the time of day

.

and indicate under which user account you want to run the batch file

.

Then finish by clicking on Apply.

Turn off the courtyard lighting in the same manner by using the batch file lightoff.bat and setting the time for example to 8:00 a.m.

An alternative to the Windows task planner is provided by the tool Z-CRON, which is available as a free download from the Web site of IMU Hard- und Softwareservice. Commercial users may acquire a license for Z-CRON in exchange for a small fee.

Z-CRON allows direct invoking of the VBScript with the necessary parameters without having to go through a batch file. In addition, the tasks can be managed and created in much more organized fashion.

A detailed description of VBScript used together with the Web-IO can be found on the corresponding application page

Download VBSCript

You don’t have a Web-IO yet but would like to try the example out sometime?

No problem: We will be glad to send you the Web-IO Digital 2xInput, 2xOutput at no charge for 30 days. Simply fill out a sample ordering form, and we will ship the Web-IO for testing on an open invoice. If you return the unit within 30 days, we will simply mark the invoice as paid.

To sample orders