CPT Prob

PLCgen

Member
Join Date
Oct 2014
Location
Barcelona
Posts
8
Placed the below expression in RSlogix500 and I get an error when compiling


( ( I:2.0 - 4000)/(20000 - 4000 ) * ( 200 - 0 )+ 0

the error:
Invalid expression! Two operands in sequence!

How do I resolve this ?I changed up some stuff included more brackets and still got an error of either too many parenthesis or not enough parenthesis
 
Change the "divide" operand to a | (pipe) not the forward slash.

(((I:2.0-4000)|(20000-4000))*(200-0))+0

Edit: dmfrey types faster then I do.
 
Uh, you can simplify that a bit if those literal constants are truly literals...a few parenthesis will go away too:

(I:2.0-4000)|(20000-4000))*(200-0)
(I:2.0-4000)|(20000-4000)*200
(I:2.0-4000)|16000*200
(I:2.0-4000)|160*2

Put the original formula in a rung comment if you want to simplify the expression and maintain documentation of how you got there.
 
Last edited:
Placed the below expression in RSlogix500 and I get an error when compiling


( ( I:2.0 - 4000)/(20000 - 4000 ) * ( 200 - 0 )+ 0

the error:
Invalid expression! Two operands in sequence!

Looks like you had an extra parenthesis in your equation that you didn't close?

( ( I:2.0 - 4000)/(20000 - 4000 ) * ( 200 - 0 )+ 0
 

Similar Topics

I am using the following formula and I am getting error, Invalid Expression - too many closing parenthesis. when i copy the formula to notepad or...
Replies
4
Views
145
In the CPT in rung 2, i'm having an issue where if there is any value less than 0.0115 in "verticalSpeed", "festoonPosition"'s value does not...
Replies
3
Views
1,113
I have ran into something I have not seen before and wondering if any one had any ideas. The logic I'm currently troubleshooting is using a...
Replies
3
Views
1,655
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...
Replies
7
Views
1,839
Hello, I am having trouble with the CPT in RSLogix 500, with a ML1400. At first I had everything in one equation, it gave me the Source and...
Replies
5
Views
2,025
Back
Top Bottom