QUOTE(mulderm @ Nov 24 2006, 10:19 AM) [snapback]44385[/snapback]
Hello,
I must programming a lot of expressions in a PLC5/25 processor
using RSLogix5.
When I will program the follow expression:
n7:241 = (500-n7:240)+114 with the CPT-instruction I get the
error: Expression not allowed.
When I program this using the SUB and ADD instruction I see
on the histogram that the value will changes between 311 and 425.
And this must be 425!
Who can help me?
mulderm
The RSlogix program grabs the value of N7:241 and displays it asynchronus to the program scan. Sometimes you get N7:241 before the 114 is added sometimes after. Extend the branch down and mov N7:241 to N7:242 and you'll always see 425 in N7:241. Another way to do this Sub 500 N7:240 N7:242 Add N7:242 114 N7:241 and you'll see 425 in N7:241.
What you've stumbled on is the internal working of RSLogix.