Math operand question

jderb

Member
Join Date
Mar 2004
Location
Iowa
Posts
2
We added a branch to an existing PLC5 program at work today and ran into something no one had seen before. The programmer had sent us his addition via email and we were simply editing the rung.

The branch contained a Compute CPT statement. The CPT statement contained what seemed to be a math operand of "|" (I've always called this a pipe). I don't have the program at home but the expression was something like

(N413:117*36.4)|100

I've never run into this symbol used as a math operand before. It would seem to be a division but I've always used "/" for that. The programmer uses it mnay times in this ladder. It has to do with feed rate of a product mixture perhaps he is converting it to a percentage, unsure.

Anyone have any idea what this operand is/does?

TIA.

Jim Erb
 
remember that a "/" is a bit delimiter. It separates a bit from the element in the A-B addressing scheme.

So, the "pipe" symbol was used instead. When you move to the ControlLogix/Loix5000 they got away from the slash so the CPT does use a slash instead of the pipe. That got me the first time.

Brett
 
I got bit by that also... on my first ever programming project I found myself having to multiply by .1 instead of dividing by 10 because the PLC didn't like the / in the compute block. Boy did I feel dumb when I learned why!
 
The Water Boy said:
Boy did I feel dumb when I learned why!

You shouldn't feel dumb when you have to do something non-intuitive. If a manufacturer (AB is not the only one guilty of this) decides to muck with a standard as basic as "/" = division, it should be written in FLAMING letters on the cover of every datasheet and manual. That'll save the rest of us from having to understand that 2+2=5, but only because 4 couldn't be reached for comment.

AK
 

Similar Topics

I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
389
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,362
Hi all. First time programming a machine of this type. A center driven unwind feeding to a center driven rewind. No dancers or load cells, just...
Replies
37
Views
4,889
Hello, Been a while since I posted , Still sucking air been a interesting 3.5 years the dreaded health with old age scenario. Back at it and had a...
Replies
11
Views
2,057
Hello: Some time ago I wrote some basic code for a GuardLogix, in which I needed to add and subtract tags of LINT data type. When tried to use the...
Replies
13
Views
3,746
Back
Top Bottom