calculator progam

switchGirl said:
Well, it seems I have ended up also having to make a calculator program for work. Normally, I would say that it is a dumb idea to use a PLC for this; however, we have to build one that its life size for a childrens' museum. This means I can't hack into a calculator and it has to run for years on end. However, if anyone knows of a calculator circuit (something like the keyboard emulators) I would much prefer to use that.

In the meantime, I have to figure out how to do a calculator on a PLC06. So, please keep responding to this forum, its the only help i've gotten in the past month.

Thank you. :)

What are you using to display the result
 
In switchGirl's I think you can go a little easier since a specific lesson isn't being taught. If this is just a 4-function calculator I would make four rungs, each with one of the functions. Use the same operands and destination in all of them. The run the rung you want based on the function selected.Conditioning which rung runs can get a little complicated as you can directly follow one function with another. But some conditional latches should handle that.

Keith
 
Parky100: You are indeed welcome to this forum. There are many excellent professionals here who have not only learned the trade and marvel of industrial controls, but also are great teachers who can present very good guidance for you and your classmates as well... without making you feel stupid.
I am older and came from the old school of relay logic (hey..vacuum tubes were in everyone's curriculum). I don't post much..because I am a novice even yet in PLCs. However, I do have considerable respect for many of the fine professionals here. I am still learning, even in my old age. Don't draw back or be discouraged when you meet those who lack the knack of helping you take on your self-determination to learn, or aren't very proficient in making you feel welcome to participate here.
Some may be PLC geeks, but are sorry as human resource managers. I think you will be able to tell the difference.
Good luck to you. PLCs are the future in industry :)


RDRAST:

If you think your arrogant, snide, and sarcastically rude reply is of any help to Parky or anyone else for that matter... please think again. I am sure Parky is hardly aware of the number of requests for homework help that comes across this forum from PLC students. Why then, would you treat them with such disdain? Are you trying to embarrass them into proper behavior so they never again "bother" you? Replies in these forums are by choice. Please choose to be a help and one who encourages (and patiently gives the correct example to) those who are just getting their feet wet. Keep the water clear instead of throwing up a stench. Believe me, your disdain far outweighs your demonstration of PLC knowledge, and even more, leaves a far worse lasting impression of disrespect for yourself.
 
Last edited:
parky100 said:
Hi, I need some help PLEASE. I need to get a calculator program. It needs to be a 4 digit basic calculator. Add, subtract, multiply and division. It needs to be in ladder logic & I'm using a Allen & Bradly 500 PLC. Thank you for your help. Mike

Parky

I received a lot of help here when taking PLC classes. These guys are like doctors - the more you tell them the more they can help. Pediatricians and vets have the problem their patient cant tell them what is wrong. These guys are not kid nor animal docs so dont tie their hands.

OK lets get into your problem
You want a PLC to be a calculator.
How do you put stuff in (data input method)?
The biggest stumbling block with PLCs is often the input methods (sensors, switches etc etc). If you dont get these right the rest of your effort is nearly wasted.
How do you get stuff out (data output method?

INPUTS thumbwheel or a switch (pressed 3 times = 3?)
So in plain English describe what you are doing and with what and what the operators actions are. That is the first step of any project regardless of size.
 
tomalbright said:
I would imagine Parky has either given up or failed the class by now.

Well if he does not have the persistance to do his homework then where will he get the persistance to overcome challenges in real life?

Dan Bentler
 
Protiusmime said:
Believe me, your disdain far outweighs your demonstration of PLC knowledge, and even more, leaves a far worse lasting impression of disrespect for yourself.
Perhaps you should spend a little more time on this forum before you start judging the other members. rdrast has been a member of this forum quite a bit longer than yourself and in that time has no doubt helped countless PLCers, including me.

The reason we get frustrated with these "plz help need trafic light program for alen-bradly" folks is that the controls field is about problem solving and does require some common sense. When these greenhorns don't even make an attempt to figure anything out on their own, it makes you wonder how they will ever succeed in this field when the information is no longer spoon-fed to them. I'm sure that if Parky had just thought about the problem for a few moments and jotted down a few thoughts about how the program should work conceptually (not even worrying about the PLC logic yet), he would have gotten a lot more help.
 
Last edited:
kolyur said:
hen these greenhorns don't even make an attempt to figure anything out on their own, it makes you wonder how they will ever succeed in this field when the information is no longer spoon-fed to them. the PLC logic yet), he would have gotten a lot more help.

There is another thread on the board where the user has spent 5 WEEKS in a PLC class, and can't turn on lights in a PLC. I refrained from posting there, and I really won't make any comments other than "if I knew this when I hired you..."

What's the difference between a doctor who makes a C average and a PLC programmer who makes a C average? They are a doctor and a programmer. Quality varies.
 
whoa

Hi, I am back. It seems the calculator discussion has changed a bit. I have all my buttons associated with numbers and they are reading on the display and saving into the memory of the PLC. I only need three numbers though and right now we can enter in 8 digits.. eak. I am sure their is a way to limit the number of presses, right?

Ok, here is the hard part for me. I am trying to do the Math function (ADDD), and I think my problem is that I don't understand the way its set up in the software.

When I select the box "ADDD" Function, it only has one entry area for one memory location. In this case its V2300 (TOTAL) I've gone through the manual and I see nothing telling me how to set this up. Do I need a function box before the ADD box, anyone know how its supposed to look in Direct Soft5?

Does this make any sense?
 
Greenhorn

I agree that people should not be looking for direct answers, I do not expect you all to tell me what to do... exactly. But, when you are new its hard to know where to look. I am realizing I just need a little more practice and some real guidance on the software interface and procedures. I can't speak for parky... but I can get lights to turn on and the PLC DVDs from http://www.plcs.net site are really great.
 
switchGirl said:
I am inputting my numbers and math functions with buttons and they are supposed to display on a c-more micro display. This is the first time I've ever used a PLC, but boss says I have to figure this out. (talk about sink or swim)

OK so you are trying to make a calculator for kids to use. What are you trying to teach them??

THINKING THIS THRU A BIT
What if you have 4 buttons 1 thru 4 (for example)
4 more buttons A (add) S (subtract) D (Divide) M (multiply)

Push 1 and the value 1 is taken from a storage spot and placed in temp spot x. Also the value is displayed on screen
Push 3 value 3 is taken from storage and placed in temp spot xxx. This value displayed on screen

Push D and division symbol is displayed on screen
it divides X by XXX (hmmm math overflow problem ??)
result of calc is shown on screen (rounded to however many decimal you want) 0.3,,, or as a (compound) fraction ie 1/3.

If your PLC has the four math functions you are in business

Hey Parky where did you go??
Dan Bentler
 
Well, we are not teaching them anything besides basic addition and subtraction. Its for small children, like 4-5 years.

I have the buttons associated with numbers, used the SHIFTL Function and the numbers display on the c-more panel. What I can't figure out is how to do the ADD in Direct Soft and how to limit the number entry to just 3 numbers...

Any suggestions?
 

Similar Topics

Dear PLCtalk Forum, I developed a generator for time-optimal trajectories with jerk limitation. You can access it online to calculate, display...
Replies
32
Views
16,008
I am currently working on a project to built a fully functional calculator through Ladder Logic Programming and could perform all forms of...
Replies
8
Views
5,073
while using PLC to control servo motors,it's necessary to find the e-gear ratio ... share an => Calculator for servo's E-gear ratio of screw...
Replies
0
Views
1,233
Hi everybody! I found alot of help in this forum, thanks very much about that. Now i have a problem about calculator average value but i dont know...
Replies
0
Views
1,836
Hi; We have an HMI designed in RS View32 Build 6.30.16 in one of our machine. Operators want to have a calculator option in it just to ADD, SUB...
Replies
5
Views
1,995
Back
Top Bottom