"compute" instruction

ssrmr2

Member
Join Date
Mar 2006
Location
Santa Fe Springs, Ca
Posts
9
I am using a slc 500/03. while writing the instructions for the running average, one of the last rungs had a "compute" instruction for dividing. I was using this key here "/" for the divide, which didnt look like the key that was on the download which looks more like a lower case "L." perfectly verticle. and i received an error about bit addressing.

i ended up using the divide instruction instead of the compute. can anyone tell me what is used in the compute instruction for "divide?"

thanks

steve
 
'|'
Which is the shifted '\' key.

For single math operations the CPT instruction executes slower. Its advantage is when multiple math operations must be done because it skips the necessity of storing intermediate results.
 
there IS a reason ...

Greetings Steve,



the reason that you can’t use the same intuitive “/” (forward slash) character like most calculators use for division is that Allen-Bradley addresses use that particular character to reference the address of a “bit” ...



therefore the “|” (pipe) character is used as a substitute ... in some screen/printer/keyboard fonts it looks like two vertical lines (arranged like a colon) ... in others (as in this post) it looks like just one continuous vertical line ...



note that the name “pipe” comes from the good-old days of DOS ... for example: TYPE|MORE meant “TYPE the contents of this file on the screen but PIPE it through the MORE operation so that the contents are displayed page-by-page" ...



(and yes, I’m fully aware that I’m giving away my advanced age) ...
 
Last edited:
Ron Beaufort said:
note that the name “pipe” comes from the good-old days of DOS ... for example: TYPE|MORE meant “TYPE the contents of this file on the screen but PIPE it through the MORE operation so that the contents are displayed page-by-page" ...

Actually the "pipe" is used extensively in the UNIX shells preceding DOS by quite a few years. Per your example, it feeds the output of a command or process into the input of another command.
 

Similar Topics

I am using a legacy Allen Bradley PLC5/40E Series F CPU Having issue with compute instruction syntax with the expression Doing a divide by...
Replies
7
Views
1,775
PLC: Compact Logic 1100 series b RS Logix 500: version 8.40 Issue: No compute Instruction, it is greyed out and I can't use it. Why? Thanks
Replies
6
Views
2,176
What am I missing? Why will my CLX Processor not buy this formula...
Replies
16
Views
4,653
How can i get (N7:31 * 6 / 5) to work in compute instruction? This is very annoying. I know i am missing something?? Please help. Thanks, Ven
Replies
6
Views
2,245
What the formula will look like? Assuming that all of the 3 Pumps running time (in Minutes) are stored in N7: 1 / N7: 2 and N7: 3. How would you...
Replies
4
Views
4,575
Back
Top Bottom