Help - Search - Members - Calendar
Full Version: old school
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
bowhunter2000
Hi : this is some thing that I found in one of mi new costumes equipment
they got a machine whit an SLC 150 and a 15 or 16 rung program very simple and the pepole from the conpany say that this machine was build in 1990 +/_ any way the call me last nigth 11:00 p.m. because the SLC is on fault whent I got to the plant and conetme to the SLC the fault say somting like a timer or a whit a negative value on the PRE.
I remuve the Fault and change to run mode but whent they try to run the machine the SLC go to fault again so I start to look at the program and foun they use a selector to change the PRE. via ADD(1) to incrise the PRE. and one ADD(-1) to redused so if the operator deside to reduce the cicle time but crake the selector to muche he well set a negative value to the timer and cause the SLC go to fault.
micuestin her is
this is some thing comon in lod shcool I mean use an ADD-1 to reduse a value in stead of using a SUB 1
Mickey
QUOTE (bowhunter2000 @ Oct 22 2009, 07:57 PM) *
Hi : this is some thing that I found in one of mi new costumes equipment
they got a machine whit an SLC 150 and a 15 or 16 rung program very simple and the pepole from the conpany say that this machine was build in 1990 +/_ any way the call me last nigth 11:00 p.m. because the SLC is on fault whent I got to the plant and conetme to the SLC the fault say somting like a timer or a whit a negative value on the PRE.
I remuve the Fault and change to run mode but whent they try to run the machine the SLC go to fault again so I start to look at the program and foun they use a selector to change the PRE. via ADD(1) to incrise the PRE. and one ADD(-1) to redused so if the operator deside to reduce the cicle time but crake the selector to muche he well set a negative value to the timer and cause the SLC go to fault.
micuestin her is
this is some thing comon in lod shcool I mean use an ADD-1 to reduse a value in stead of using a SUB 1


Whats the difference? You are still going to get a -1.Subtract 1 from 0 you get -1. At least in the school I went to.
paulengr
QUOTE (Mickey @ Oct 23 2009, 12:47 AM) *
Whats the difference? You are still going to get a -1.Subtract 1 from 0 you get -1. At least in the school I went to.


Technically, nothing, not even a performance hit.

You have an electrician. He knows how to add, subtract, multiply, and divide. He learned all the basics of arithmetic in high school. They talked about negative numbers, but he never "got" the concept and always looks at it as subtraction.

Your seemingly simple math makes the electrician have to spend 5 minutes just thinking about whether or not it's the right answer. Might as well be doing SUB -1 when you mean to ADD 1. Sure it's the same thing. But some folks just aren't wired that way.

The key here is to add a further line after you do either the add or subtract that does this:
LES TIMER.PRE 0 CLR TIMER.PRE

This must be done for both adds and subtracts. I'll leave it as an exercise to figure out why an ADD statement would ever result in negative values in a timer (hint, think about math overflows).

bowhunter2000
QUOTE (paulengr @ Oct 23 2009, 07:00 AM) *
QUOTE (Mickey @ Oct 23 2009, 12:47 AM) *
Whats the difference? You are still going to get a -1.Subtract 1 from 0 you get -1. At least in the school I went to.


Technically, nothing, not even a performance hit.

You have an electrician. He knows how to add, subtract, multiply, and divide. He learned all the basics of arithmetic in high school. They talked about negative numbers, but he never "got" the concept and always looks at it as subtraction.

Your seemingly simple math makes the electrician have to spend 5 minutes just thinking about whether or not it's the right answer. Might as well be doing SUB -1 when you mean to ADD 1. Sure it's the same thing. But some folks just aren't wired that way.

The key here is to add a further line after you do either the add or subtract that does this:
LES TIMER.PRE 0 CLR TIMER.PRE

This must be done for both adds and subtracts. I'll leave it as an exercise to figure out why an ADD statement would ever result in negative values in a timer (hint, think about math overflows).

Yes: the way I fix this proble I add a rung whita a LEQ and a MOV if I got a value equal or less of "0" then move a "0" to the timer PRE.
BobLfoot
QUOTE (bowhunter2000 @ Oct 23 2009, 12:38 PM) *
Yes: the way I fix this proble I add a rung whita a LEQ and a MOV if I got a value equal or less of "0" then move a "0" to the timer PRE.


This will work in the older SLC 150, but in the new control and compact logix you'd still fault because the -1 in .pre is there to be evaluated for the LEQ Statement.

In the newer processors you need an intermediate variable and reset it to zero and then move that into .pre to avoid faults during pre-scan.

New School made the processors faster but made this old school problem worse.
bowhunter2000
QUOTE (BobLfoot @ Oct 26 2009, 11:43 AM) *
QUOTE (bowhunter2000 @ Oct 23 2009, 12:38 PM) *
Yes: the way I fix this proble I add a rung whita a LEQ and a MOV if I got a value equal or less of "0" then move a "0" to the timer PRE.


This will work in the older SLC 150, but in the new control and compact logix you'd still fault because the -1 in .pre is there to be evaluated for the LEQ Statement.

In the newer processors you need an intermediate variable and reset it to zero and then move that into .pre to avoid faults during pre-scan.

New School made the processors faster but made this old school problem worse.

Finaly I talk whit costumer and after analice the cost of a micrologix 1000 and the cost of an old SLC 150 plus the cost of tool crib for stoking and obsolet SLC deside to replase al 3 old SLC 150 whit Micrologix1000 P.#1746-L16AWA
and to prevent a future Fault I replase the ADD -1 for a SUB 1

anoder coment the logic is only 15 runs and thats it


bowhunter2000
QUOTE (bowhunter2000 @ Oct 26 2009, 05:22 PM) *
QUOTE (BobLfoot @ Oct 26 2009, 11:43 AM) *
QUOTE (bowhunter2000 @ Oct 23 2009, 12:38 PM) *
Yes: the way I fix this proble I add a rung whita a LEQ and a MOV if I got a value equal or less of "0" then move a "0" to the timer PRE.


This will work in the older SLC 150, but in the new control and compact logix you'd still fault because the -1 in .pre is there to be evaluated for the LEQ Statement.

In the newer processors you need an intermediate variable and reset it to zero and then move that into .pre to avoid faults during pre-scan.

New School made the processors faster but made this old school problem worse.

Finaly I talk whit costumer and after analice the cost of a micrologix 1000 and the cost of an old SLC 150 plus the cost of tool crib for stoking and obsolet SLC deside to replase al 3 old SLC 150 whit Micrologix1000 P.#1746-L16AWA
and to prevent a future Fault I replase the ADD -1 for a SUB 1

anoder coment the logic is only 15 runs and thats it

I well sare the logic rung 007 is the one I add and rung # 008 is wherw the ADD -1 was
BobLfoot
QUOTE (bowhunter2000 @ Oct 26 2009, 06:31 PM) *
I well sare the logic rung 007 is the one I add and rung # 008 is wherw the ADD -1 was


This logic will survive the prescan test I referred to because N7:10 is being used as an intermediary and your adds and subs do not directly touch the timer preset.
b_carlton
Place your current rung #7 AFTER the ADD and SUB rungs but before the rung which moves N7:10 into the preset.
BobLfoot
QUOTE (b_carlton @ Oct 27 2009, 10:28 AM) *
Place your current rung #7 AFTER the ADD and SUB rungs but before the rung which moves N7:10 into the preset.


Good Catch Carlton I was asleep at the wheel on that one.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.