UsingMicro820as a simple On OFF timer

gbradley

Lifetime Supporting Member
Join Date
Apr 2002
Location
Corona, Ca.
Posts
1,637
I want to replace a Grasslin timer
attachment.php

with something that Communicates via EtherNet/IP™
I keep getting schedule changes that force me to go out and mannually change the timer settings.
I was thinking of using a Micro820
http://www.plctalk.net/qanda/attachment.php?attachmentid=58442&stc=1&d=1622562114
Anybody done something like this, or have a link to a sample so I don’t have to reinvent the wheel?

FM1D14-AV-U.JPG Micro820-1.JPG
 
A Micro820 seems like a bit of a sledgehammer to crack this nut; do network-capable programmable timers not already exist e.g. like HVAC thermostats, Google nest, etc.*?


Assuming a PLC, there are several approaches, each too simple to warrant complete examples. One could model an analog Grässlin with an array of 96 bits, each representing one 15-minute (quarter-hour) period of the day. The PLC continually checks the time of day to to calculate an index into that array, and sets the output based on the value of the bit at that index. That should be a fairly trivial program, with the meat of it like this:

Code:
the_output := bitarray[index];

OR

 bitarray[index]    the_output
------] [--------------( )-----
depending on the language of choice

The parts that will take more time and reading of the documentation to implement will be:

  • getting the time of day (e.g. seconds since zero epoch modulo 86400, plus time zone and DST correction)
  • convert that time of day to the index in the range 0-95
    • e.g. divide time of day in seconds by 900
      • dealing with any rounding in the quotient
  • ensuring the PLC internal clock keeps synchronized with external time to some desired accuracy
    • an NTP client may be built-in
    • if clock drift is small and accuracy requirements large, then a manual adjustment once per month might be adequat
  • dealing with daylight savings time, if an NTP client does not handle it
    • e.g. if changing the time settings is a regular occurrence, then manually adjusting the internal clock for DST is only two more steps per year
  • dealing with power outages
I think one would spend far more time on the user interface to choose the array of bit states, although if the Micro820 has a web server, then it might be possible to use that alone and no custom interface would be required.


* Cf. here, probably overkill.
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
163
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
247
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
316
I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
212
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
308
Back
Top Bottom