PLC timing

mrtweaver

Member
Join Date
May 2007
Location
Bloomsburg
Posts
329
I am having a brain **** at this time. I have been putting to much time into the project and the answer seems to be eluding me. So I thought maybe if I posted the question here someone could refresh my memory before the old say ' Of all the things I lost I miss my mind the Most' becomes true.

i have a Horner NX221 PLC. I have written the code in a nice detailed way. I have two add lines in the code. The only difference between the two add lines is the number of instructions before the add.

In line 201 I have a total of 9 contacts before the add, some are NO some are NC. then the add function block.

In line 227 I have 3 contacts and one compare then the add function block.

Both of these share 2 of the same contacts, one which is the enable signal of the machine and the other the pulse for counting.

The pulse for counting comes in from an input and is attached to a one shot. The one shot is said to be true for one scan cycle of the PLC.

The problem I am having is that during the course of the day the counter in line 201 lags the one in line 227.

And it is never by the same amount, one day for an 8 hour shift it might lag 500, the next time it might be 200, sometimes its as high as 1000.

I dont know why being as both are counting the same pulse.

Here is what is the same between the two line:
Count_in
Machine_run

Here is what is extra in line 201:
Break_Time
Paperwork
cheshier_chk
mech_loged
batch_enabled
cheshier_off
loged_job_ok

And then in line 227:
Compare function block

I have checked and rechecked the logic, I know what is on and what is not on. I have mapped the lines, so is it a timing issue that it takes longer to go thru the 9 contacts versus 3 and a function block. I just can not remember. Any thoughts greatly appreciated.

thansks and have a great day.:sick:
 
I'm not sure what you are doing... Are you maintaining a separate accumulator register (via Add 1 to Register, store in register) in each line?
If so, the simple answer is that line 227 is true when the machine is in run, and gets a count pulse.

Line 201 is only true when all conditions are met. Perhaps one or more of the line 201 conditions are not satisfied at the same time as 227?

And if they are always satisfied at the same time, there is no need for line 201 (or 227, pick one).
 

Similar Topics

the plant I am supporting uses a siemens graph function to do some of the step procedures. in several steps it waits for the step to execute for...
Replies
1
Views
768
with an A-B Pico PLC, can i monitor the duration of an event? ie. start a timer then pause it without reseting until i want to? like the upper...
Replies
2
Views
1,246
ok need some help with this...what is the maximum timing error when using a timer in a PLC? 1x the Plc scan time 300ms 2x the plc scan time 4x...
Replies
18
Views
6,462
HELLO EVERYONE! new to the postings but i would like to know what is the maximum timing error in a PLC? would really appreiciate a respones to...
Replies
1
Views
1,220
Hi Guys One question about AB PLC internal clock: Does the AB PLC clock update automatically when it change to summer saving time? Thanks
Replies
13
Views
3,193
Back
Top Bottom