CPT Error - Source and destination

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 destination may not be an immediate error and a couple others. So I split the equation up into three separate rungs. I eliminated all of the errors except the Source and destination may not be an immediate, and it was only on the one equation.

Here is what I have: CPT F8:22 102.0 * ( F8:10 ** ( 3.0 | 2.0 ) )

I tried replacing F8:22 with N7:0 and F8:10 with an actual number. Nothing seems to work.

F8:10 is for the head of water over a weir, and will be determined using a level sensor, and needs to be to the 3/2 power.
 
This is a guess...the problem may be with the power term (3.0 | 2.0). With RS-Logix 5, not 500, the description of the XPY (X to the power of Y) instruction is explicit about the operands being addresses, and not immediate values.

Try putting the value 1.5 in another F register (e.g., F8:11 if available) and changing the compute to: CPT F8:22 102.0 * (F8:10 ** F8:11).
 
Thanks Mikey, I tried searching for the error but nothing turned up. I figured someone had to of had the same issue before. That did fix my issue though. Thanks again everyone!
 

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...
4
Replies
1,041
Views
Hi All I am getting a 'Source and Destination may not be an immediate' Error from a CPT instruction, I am using both Floats and Ints in the...
21
Replies
7,921
Views
Hi all. Never really noticed, but I started double checking operands in the CPT instruction. I found if I have the expression N7[37,1] - N7[35,1]...
3
Replies
2,133
Views
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...
3
Replies
2,488
Views
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...
3
Replies
2,252
Views
Top