Help
-
Search
-
Members
-
Calendar
Full Version:
Making a formula in RSLogix5
Forums.MrPLC.com
>
PLCs and Supporting Devices
>
Allen Bradley
mulderm
Nov 20 2006, 02:58 PM
Hello,
I have a formula: y = -0,36x + 610
How must I program this in RSLogix5 without using Floating Points
but using integers?
Example: x=N7:0 and Y=N7:1
mulderm
newpageboba
Nov 20 2006, 04:10 PM
if x is N7:0 (integer)
and y is N7:1 (integer)
CPT N7:1 (-0.36 * N7:0) + 610
Ken Moore
Nov 20 2006, 04:53 PM
QUOTE(newpageboba @ Nov 20 2006, 04:10 PM) [snapback]44005[/snapback]
if x is N7:0 (integer)
and y is N7:1 (integer)
CPT N7:1 (-0.36 * N7:0) + 610
Since you have two varibles and only one equation, which one will you be solving for?
The example newpageboba posted is for solving for y, if you need x, it will be different.
Alaric
Nov 20 2006, 04:58 PM
Or, for a pure integer solution:
CPT N7:1 (36 * N7:0 | 100) + 610
OR
MUL N7:0 36 N7:100
DIV N7:100 100 N7:100
ADD N7:100 610 N7:1
I'm not sure why you would insist on using integers as the PLC5 supports floats.
mulderm
Nov 21 2006, 12:05 PM
Thank you for the information.
mulderm
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2010
Invision Power Services, Inc.