Please,l need a help !

Titan_cu

Member
Join Date
Mar 2008
Location
Jackson
Posts
2
to design a progran to use PLC as a simple 4- function BCD calculator with this specifications:

-The calculator should support 4 arithmetic funtions:addition,subtraction,multiplication and division.Each function should be selected by a push buttom and must be interlocked by programming to prevent use of more function at the time.
-Pilot lights should be used to indicate any error conditions of the 4 arithmetics functions: overfloe/underflow,carry/borrow,sign,zero or an answer greater than 999.
-The calculator should have a pushbutton that changes the values to zero.

Thanks for your helpo_O
 
We don't generally do homework for you, but we will help you understand what you need to do your own homework.

The statement of the problem is the first step, and you have that. Next, what PLC and software are you using?

Decide what input addresses will be used for each of the five function buttons. List the buttons with the input address next to them.

Decide what output address will be use for the error condition lights, list them and the error condition. List the internal bit from the processor that you will use to indicate each error.

Once you have that you are halfway there. But to complete the task we need to know a little bit about the PLC you are using.
 
To design a progran to use PLC as a simple 4- function BCD calculator with this specifications:

-The calculator should support 4 arithmetic funtions:addition,subtraction,multiplication and division.Each function should be selected by a push buttom and must be interlocked by programming to prevent use of more function at the time.
The inputs values used by the arithmetics instructions will be entered using a location named BCD_IN should be 16 bit location (INT) and displayed in hexadecimal format.A selector switch should decide whether to put the converted value from BCD_IN in Storage_1 or Storage_2.One pushbuttom should be pressed to actually place the value into the location.
The answer should be placed in Answer.it should then be converted to BCD and stored in BCD_OUT.BCD_OUT should be 16 bit location (INT) and displayed in hexadecimal format
-Pilot lights should be used to indicate any error conditions of the 4 arithmetics functions: overfloe/underflow,carry/borrow,sign,zero or an answer greater than 9999(maimum value that can be displayed in BCD_OUT).
-The calculator should have a pushbutton that changes the values of BCD_IN,Storage_1,Storage_2,Answer to zero.

It should have the followings functions:

-Selector Switch--Off)Input first value from BCD_IN to Storage_1.
--On Input second value from BCD_IN to Storage_2.
-Pushbuttom 1 place value as indicated by selector switch
-Pushbuttom 2 perfom addition (Storage_1 + Storage_2)
-Pushbuttom 3 perform subtraction ( Storage_1 - Storage_2)
-Pushbuttom 4 perform multiplication (Storage_1 x Storage_2)
-Pushbuttom 5 perform division (Storage_1 / Storage_2)
-Pushbuttom 6 place zero in.

And the following pilots lights:

Light 1 carry/borrow (c)
Light 2 Overflow/Underflow (v)
Light 3 zero (z)
Light 4 sign (n)
Light 5 answer greater than 9999

PLC: ControlLogix (1756-L6x,L55Mxx) RSLOGIX 5000

Thanks for your helpo_O
 
You might want to check out Fred and Todd, as they may turn out to be your good friends! Look in the listing of ladder logic commands for FRD and TOD. Also, MOV and or COP to relocate or copy from one location to another. CLR to zero things or MOV a zero to clear a register. Check out the simple math statements for ADD, SUB, etc and you may like the CPT it you go into the more upscale math.

There are many ways to do these things, but some will be more eligant that others. Try all the ways that you can think of.

Study the processor status file. There are bits for the math overflow, etc.

If you haven't figured it out yet, the only way that you learn this is by doing it. Once you do, you will never stop. This is a one way trip! Enjoy the ride.

Best Regards,

Bob A.
 
Try to find tutorial on the internet, it will help. I remember doing a very similar project as you back few years ago when I was in school.
 
Hey they invented these in the 60's it's called a calculator it was even cheaper then than a plc.

only kidding......
I assume this is for some kind of test rather than an actual application, you could use a small plc with very little i/o & use the programming software to enter data & display the results rather than expensive I/O.
 

Similar Topics

Hello, I've got a program from a customer for a Micrologix, but can't open it without upgrading to a newer version of RSlogix 500. Could someone...
Replies
3
Views
1,044
Hello guys, Just wondering if someone can help me please I have a timer when gets enable I move .acc value of that timer to another tag to store...
Replies
4
Views
1,783
I'm an electrician and I started to learn programming. My dream is to start programming for Siemens. I spoke with a company more about a job and...
Replies
17
Views
4,785
dear experts I'm using Siemens plc s7 1200 14c dc/dc/relay and it's voltage level is 24v and i need to use sensors with less than that level so...
Replies
11
Views
1,902
Can anyone please give me a link to click on that shows an example of RSLogix 500, 5000 and Allen Bradley wonderware, I have never even seen any...
Replies
2
Views
1,758
Back
Top Bottom