difficulty with basic functions

diegov

Member
Join Date
Oct 2012
Location
Brazil
Posts
8
Hello, I'm new to the area, and I'm having problems such as addressing and how they work, and how to use funoes as: ADD, SUB, MUL, DIV, SQR, NEG, like to understand the following functions, thank'm awaiting
 
Diegov,

I would like to understand those also. If you would give the brand and model of your PLC (or the name of the software program) then I could look up the User Manual, download it, and then copy the instructions for each of those functions that you listed.

All brands do not work or look the same.
 
Problems with functions

ok, sorry for the lack of transparency, these functions are software functions rs logix pro 500. As I am still studying and discovering the functions I would like to know how to address these functions, how and when to use, how to turn, in what situations to use.
I'm not making any moments in the program but would like to know about the functions below:
ADD, SUBTRACT, DIVIDE, Negate, MULTIPLY, SQUARE ROOT.
Well, I can not understand what you mean conditions Source A, Source B and Dest. I would then know when to use, how to address, in what situations to use
 
Let us start with the ADD function. This works a lot like adding two numbers by hand. What 3 quantities or "numbers" do you have to use to add two numbers by hand? Of course you need the 1st number, the 2nd number, and the Result or Destination. If you look at the RSLogix ADD instruction, you will see "Source A" and "Source B". Is it hard to understand that "Source A" is your 1st number to be added, and Source B is the second number to be added? Now then, the last quantity "Destination" by default MUST be the place where we are going to want to place the result of Source A + Source B = Destination.
 
Source A 102
+ Source B___ + 200
= Destination 302


This output instruction adds Source A to Source B and stores the result at the Destination address. Source A and Source B can either be values or addresses that contain values, however Source A and Source B cannot both be constants.
 
Last edited:
'difficulty with basic functions'‏

No, really simple and easy to understand that an addition operation and the sum of two variables, but I want to understand how I get these two variables, they must be the bit level, or they should be at the level of word 16 bit, and how I should address with the source address bit auxiliary or should I use the function (n7 integers) (r6 control) (S 2 status)
 
Last edited:
For the ADD instruction, your numbers should be at the level of 16-bit words at least (Integer types such as N or B words), and can be longer for other types such as floating-point numbers (F type) or long integer (32-bit) numbers. There is no need to add single-bit numbers because you can use the Boolean logical functions (AND) or (OR) or simply the XIC instruction ANDed for two bits --||--||-- to find those.

how I should address with the source address bit auxiliary
What do you mean? For ADD, use the word address for each Source variable and for the Destination. You are allowed to use one constant number value as one of the Sources.

ADD [Addition]
Rockwell Software
When rung conditions are true, this output instruction adds Source A to Source B and stores the result at the destination address. Source A and Source B can either be values or addresses that contain values, however Source A and Source B cannot both be constants.
If you are using a 5/02, 5/03, 5/04, 5/05 or MicroLogix processor, you can use indexed addresses for the source or destination parameters. If you are using a 5/03 OS302, a 5/04 OS401, or a 5/05 processor, you can use indirect addresses for the source or destination parameters.
. . .
32-Bit Addition
If you are using a Series C or later 5/02, or a 5/03, 5/04, 5/05 or MicroLogix processor (capable of 32-bit addition and subtraction), you can set the math overflow bit (S:2/14) in the status file. This causes the unsigned, truncated, least significant 16 bits to remain in the destination.
If this bit is not set and an underflow or overflow conditions occurs, the operation will be the same as with a Series B 5/02 processor. The destination address will contain a 32767 (if the result is positive) or -32768 (if the result is negative).
 
Last edited:

Similar Topics

Good Afternoon , We had to replace a Powerflex 70 2 HP with a 3 HP. These drives are on Devicenet . Once installed and transferring with...
Replies
13
Views
4,005
Hello, I'm a electrician who is furthering my education and learning to be a programer , I have a Dell laptop running windows 7 with rs logics pro...
Replies
22
Views
6,360
Dear All , I am building SCADA solution for HVAC system using Factory Talk View 7, I am using rslogix 5000 to creat the automation program as you...
Replies
4
Views
3,131
This is my first time here and also my first time to work with WAGO..I need help badly...I am stuck with this WAGO Device. I am working with a...
Replies
3
Views
2,512
Hi Guys GOAL: I have HC900 PLC and a CS15 HMI that I need to configure alarms for. The goal is to require the user to acknowledge the alarm...
Replies
3
Views
2,219
Back
Top Bottom