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,436
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
68
I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
74
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
3
Views
159
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
81
Back
Top Bottom