Time of day based counter.

dylantzips

Member
Join Date
Jun 2018
Location
Ohio
Posts
27
I am trying to make different counters active and inactive at certain times of the day. This is to collect data based on what shift it is. I want one counter to count during 1st shift, one for 2nd shift, and so on.

I am new to PLC's and I have no idea how to do this.

I'm using RSLogix5000.
 
Put your logic for each shift in a separate program file/function (That's what it is called in AB language right?) and call the according program/file function when the shift is active.
 
How long do you need to retain the shift count?

If it's just 24 hours, I would use one counter. Say it starts counting at the beginning of 1st shift at 6am. At 3:30 when the shift is changing, MOV the counter accumulator (ACC) into a first shift DINT, then reset the counter. You could do this with a single rung of logic with a few branches. Use LIM instructions so that when the time reaches a shift change, it will move the ACC into the correct shift register before it resets and is ready to count again.

The counts would stay in the PLC until the following day when that shift change occurs again and the count is overwritten.
 
I use Limit instructions to control several time of day events. I store the set points in integer files so I can change them without entering program mode or starting edits.
 
I also use the sample code from AB called "
Time and Date Math Add-On Instructions"

Handy functions in there for time and date.
 

Similar Topics

See attached image. I am looking for a way to copy based on the count. I have an example shown, if the value .ACC value is 1, I want to copy from...
Replies
3
Views
1,710
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
168
Hello, I am trying to setup on plc so If I enter 60 jph (job per hour) it will send the vfd hertz based on what jph is entered by...
Replies
2
Views
152
I have an array of 55 REAL values. Is there a way to multiply based on the array location ? I have 55 transfer belts that are equally spaced...
Replies
3
Views
149
Hello everyone, nowadays i am working on a project for remote access to our machines. We are using a remote access module, but i want to make my...
Replies
0
Views
392
Back
Top Bottom