Plc5 cpt

Hey guys,
Wondering if any of you could tell me why this is not a valid expression in PLC5/40

((N38:73 / N38:20) * 1440) / 100
Destination is F8:0

I keep getting "Invalid Expression, Two Operands in Sequence"

Can you please point out what is wrong with this?

Also should there be spaces between each figure like I have here or should everything be run together with no spaces or does it not matter either way?

I know I can make this work with individual DIV & MUL but was trying to save the rungs.

Thanks in advance for any input.

BCS
 
As far as I remember, division is "|", not "/".
edit: "|" is not a capital "i".
"|" is also known as a "vertical bar" or "pipe".

I guess AB has done it like that to avoid getting mixed up with the bit identifier.
edit: And I guess that is where the error message gets confusing, because RSLogix5 interprets the / as part of an operand.
 
Another tip.
Since the destination is a float, the entire CPT instruction will execute with floating point precision.
Exchange the
((N38:73 | N38:20) * 1440) | 100
for
((N38:73 | N38:20) * 14.4
 

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,042
Views
Can someone please explain why these 2 CPT instructions in a PLC5 would evaluate differently? F239:1 = (N49:13 * 3000.0) | 4095.0 F239:1 =...
6
Replies
2,692
Views
Hey everyone, I'm on a commissioning currently working on a project involving a PLC5/40C and I'm in need of access to RSLogix 5. I understand the...
12
Replies
702
Views
So ya our plant is weighing upgrading photoeyes on a conveyor system of about 30 motors to better distinguish product , very limited upgrade...
34
Replies
1,592
Views
Just did a conversion of a PB32 project to CCW using a PanelView800, setting up serial DF1 (only choice of processor was ML1400) after the project...
3
Replies
283
Views
Top