Plc5 cpt

Bering C Sparky

Lifetime Supporting Member
Join Date
Mar 2014
Location
Bering Sea, Alaska
Posts
1,117
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.
 
Last edited:
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...
Replies
4
Views
168
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 =...
Replies
6
Views
1,930
Preface: Kinda long, so I made section titles Intro: I just want to see if anyone here has seen anything similar. A PLC5-40 series C enhanced...
Replies
3
Views
386
Hi, can anyone help me get a pdf file for this RSP files. They are from a PLC5. Thanks
Replies
5
Views
545
Back
Top Bottom