mrtweaver
Member
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.
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.