CompactLogix/ RS Logix 5000

JkellyNPFD

Member
Join Date
Dec 2007
Location
New York
Posts
7
I have a very easy question. I'm sure it exists, but I just can't find the exponential function (i.e. Exp(4)) Does anyone know the syntax for an exponential function in rs logix 5000?
 
Alaric said:
You can also use a double asterisk in the CPT function.

CPT X Y**Z

I thought ** was "raise to the power of" and EXP was the exponential function- y = e raised to the power of x, and x is Eulers number (2.718281828)... actually... I know it is.
 
Last edited:
Your right, but instead of explicitly looking for a function [e ^ 5] I can use 2.718281828 ** 5, which is the same.
 
Last edited:
Mike6158 said:
I thought ** was "raise to the power of" and EXP was the exponential function- y = e raised to the power of x, and x is Eulers number (2.718281828)... actually... I know it is.

Also, I believe (and I could be wrong, since I am by no means a math major) e^1 is Euler's number, not x in e^x
 
A small clarification: The Logix 5000 instruction set has an "X to the power of Y" function.

In relay ladder logic and function block languages, this instruction uses the "XPY" block.

In Structured Text and inside Compute instructions, the syntax is "x ** y".

RSLogix 5000 has no built-in operators for Euler's number or for Pi. There is no "EXP" function that returns euler's number-to-the-X-power in RSLogix 5000 like there is in many PC programming languages like C++.

There is a Natural Log (LN) instruction, as well as a Log Base 10 (LOG) instruction, which are often used in similar applications.
 
JkellyNPFD said:
Your right, but instead of explicitly looking for a function [e ^ 5] I can use 2.718281828 ** 5, which is the same.

That's what I did. I never found the function that I needed and I only needed it in one place

JkellyNPFD said:
Also, I believe (and I could be wrong, since I am by no means a math major) e^1 is Euler's number, not x in e^x

Maybe so... I read it somewhere... but don't remember where.
 

Similar Topics

Good Evening , I have version 28 of Studio 5000 from a few years ago . If I got a new CompactLogix CPU , what is the lowest version of...
Replies
4
Views
499
Hi folks, In a new project, I'm trying to define variables with physical address like N7:xx, F8:xx,... I need physical address variables to...
Replies
6
Views
777
I'm trying to configure the IP address of my compactlogix l16er-bb1b in Studio 5000. I need to set it to a certain address as I'm planning on...
Replies
5
Views
3,341
New project, set my processor type and input/output cards. I tried to download and I get "Failed to go online with controller. Communications...
Replies
12
Views
6,146
I am trying to figure out the best way to get a moving average for an automated machining cell with cycle times of a couple of minutes for each...
Replies
5
Views
1,733
Back
Top Bottom