Tuesday, February 17, 2015
Time Control switching with Digital Loggers 8-Channel Ethernet Din Relay
With the DIN Relay 3, you can control any AC or DC circuits from anywhere in the world using the built in Ethernet port for remote connectivity. We look at going through and setting up a simple script for time control, and turning the relays on and off at certain times of the day.
In this basic example we're going to be using all 8 relays, with lighting circuits on each one being controlled on and off with the relay. The purpose of this script is too automate turning the lights on at 8:30AM each morning, and back off again at 5:30PM.
This example assumes you have the Web DIN Relay set-up and you have access to the web page of the DIN Relay.
The default IP Address of the device is 192.168.0.100/24
The default Username is 'admin' and password is '1234'
On the Scripting page, there are a few options we need to select first:
Start on warm reboot at: 1
Enable scripting: [tick]
Trace script: [tick]
User Strings are where we define properties, such as time periods, text, IP addresses and so on.
For this example we're going to need two, one for start time in the morning (8:30AM) and one for the ending time in the evening (5:30PM).
The dates are written as:
Minute | Hour | Day of month | Month | Day of Week
For a wildcard, or for all, you insert a * into the place;
So for 8:30AM, we will put: 30 08 * * *
And for 5:30PM, we will put: 30 17 * * *
Script listing is BASIC scripting that will go through and run, and we can also reference user strings from here as well.
To start we need to have the script running, but waiting for it to be 8:30AM
So under script listing:
WAIT 1 (waits until time listed in 1 is current)
ON 12345678 (turn on relays 1 through 8)
NOP (no operation)
WAIT 2 (waits until time listed in 2 is current)
OFF 123456789 (turns off relays 1 through 8)
GOTO 1 (Goes back to script listing 1)
That's all that's needed! Make sure you change the default password on the device.
See my example below: