Logix 500 CPT

old97ss

Member
Join Date
Oct 2009
Location
kansas
Posts
13
so I have to find the standard deviation for amperage readings at my plant. when I input the formula into the CPT instruction it is automatically adding parenthesis in places I don't want. any help?? pictures attached of what I want and what it is doing. there is nothing in front of the sqr. it adds a set of parenthesis. and open in front of f43:14 and a closed at the end.

good.PNG badcpt.PNG
 
It will add them automatically to enforce the order of operation. If you want a different order of operation then you have to add the parenthesis where you want to force it.


A lot of time for the SLC 500 it may be easier to break it down into single operations. Then you can control it the way you want.
 
"Good" and "bad" in this case are subjective evaluations. The two cases are functionally equivalent. While the processor order of operation doesn't require the set of parentheses that surround what is added to F40:19, their presence doesn't change the result.

Keith
 
hmmm. from the way I'm seeing it "bad" would subtract f40:17 from f43:14 then square the number. then divide by 13. then add f40:19 then take the sqroot of that answer. NOT what I want. should subtract first. then square add f40:19 next, divide that. then take sqroot. they are not the same unless I'm not understanding Logix 500 order of operations. (2+4)/6 = 1....2+(4/6) = 16/6.
 
The way good is shown will not do what you want given normal order of operation.

Good is shown as:

SQR(F40:19+((F43:14-F40:17)**2)/13)

That will perform the subtraction, square that result, divide by 13, add F40:19 and take the square root of that result.

What you want is:

SQR((F40:19+((F43:14-F40:17)**2))/13)

Keith
 

Similar Topics

I am trying to interpret a compute function in RSLogix 500. This seems like a stupid question but it has me stumped. Maybe someone can help. The...
Replies
3
Views
13,427
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
2
Views
79
buen dia. tengo una falla al pasar los tags de mi plc SLC 5 0/4 a mi panel me aparece un error Problem writing value " " to item <tag name>...
Replies
1
Views
71
Hello, I have a 1764 1500 LSP Series A that keeps failing with DTL_E_FAIL I/O error. Searching around it seems there's a weird issue specifically...
Replies
2
Views
98
Will someone please convert this logic to pdf?
Replies
2
Views
119
Back
Top Bottom