PM: SLC 500 timing problem

rsdoran

Lifetime Supporting Member
Join Date
Apr 2002
Location
Birmingham, AL
Posts
7,371
I got this PM from rayc about a program that involves time and information being put on an Excel sheet. I am going to refer him and his request to the forum; albeit I may still answer.

rayc said:
Hi rsdoran,

My name is Ray and I work in a cannery in Australia. I am very new to PLC programming and my boss asked me to write/modify some PLC code (RSLogix 500) my colleague left me before he resigned. I have a problem with a "second pulse" and I thought you may be able to help me.

Basically I have this Excel file that talks to a PLC does a DDERequest to a SLC 5/05 every second 24/7. This excel file will then be saved automatically at the end of every shift (8hrs or 480 mins). There is a second pulse generated by a Timer On Delay (Time Base 0.01, preset 100) and a XIO contact is attached on the same rung and used in many others. All counter acc values in the PLC will also reset at the beginning of each shift and it's done by comparing S40-S42 with a preset value.

At the end of the shift, the "shift" counter is always short of approx 5 mins (475min) and I realised that the TON is running a fraction slower than the PLC clock S42.

I've tried using S:42/0 as a second pulse output it in a counter then multiply the accumulated value by 2. Again this is done throughout many rungs. I got 478 mins out of 1 shift, which is not so bad but other values do not add up to 478 mins.

For example in my situal,
Shift minutes = 475 min
Runtime = 300 min
Downtime = 175 min
Cleaning = 0 min
Available time = Run + Down + Cleaning time

Each variable above has a S42/0 pulse, a CTU and a MUL by 2.

Shift time should equal Available time but it's not at the momemnt.


The Scan Times for this code are
S:22 = 2
S:23 = 1
S:3L = 0-1
S:3H = 10
S:35 = 6-7


Sorry for this long mail and I hope you can understand what I am trying to say. I am really desparate to find out the best way to get a accurate second pulse. Please help me..please.


Thank you very much from downunder.

Regards,
Ray
 
A bit of update on my code...

I used clock pulse S:42/0, 1 XIO & 1 XIC contact to count up in 2 CTU then ADD them up for a shift counter in seconds, which works like a dream.

The trouble is I cannot target my downtime instance to start precisely at the time it occurs. When my downtime occur at real-time 0.7 to 2.2, the accumulated counter is 3 where it should only be 1.5 "seconds"



S:42/0 XIC

_____|-----|_____|-----|_____ ---> CTU 1

t.......0.......1.......2.......3.......4

S:42/0 XIO

-----|_____|-----|_____|----- ---> CTU 2
t.......0.......1.......2.......3.......4


_________|----------|________
dt...........0.7..........2.2


Sum of 2 Counters

F8............1....2.....3
_________|-|-----|--|________ ---> CTU1.ACC + CTU2.ACC = 3


That's the best I can do for now lol... Thanks!!!!

Ray
 
Last edited:

Similar Topics

Hi All, Am new here. Would appreciate any ideas to help me do some sequence/timing programming am wanting to do. Am wanting to keep track of how...
Replies
21
Views
7,725
Hi everybody have not had a chance to look at this issue but I will be tonight. The other person who had it said there was a fault that system...
Replies
12
Views
3,719
I have a program that I've used 100 times. SQO settings: File N7:0, Mask 0FFFFh, Dest B3:1, Control R6:0, Length 8, Pos 2. Length & Position...
Replies
48
Views
957
Everyone, i am in the process of purchasing the Slc 500 version of software to support what we have and i have a question. Several of our...
Replies
9
Views
766
In a slc 500 plc I am trying to move data with out using a lot of moves. I want to move data from n7:1 to n7:2 and data that was in n7:2 to n7:3...
Replies
16
Views
1,355
Back
Top Bottom