Previous in Forum: 3 Motors to Run Using 'Start' and 'Stop' Pushbutton Switches but no Latch Coil   Next in Forum: Differences Between Parallel and Synchronization of Generators
Close
Close
Close
34 comments
Rate Comments: Nested
Active Contributor

Join Date: Dec 2010
Posts: 14

Logic Problem

12/05/2010 9:33 PM

Hi guys,

I need help figuring out some logic, so heres what i need to happen.

There are 3 modes of operation, the others arent important and the moment and i will just need help with the auto mode.

I need to controll 3 a/c units via 2 x averaging temp sensors. When inside temps hit 35 ac 1 will begin functioning, if room temps hit 37.5 then ac 1 & 2 will function and if room temps hit 40 then ac 1,2 and 3 will function.

On top of this i need the order of the ac's switching on to change once every week, for example week one the order the ac will turn on will be 1,2 then 3, week two will shuffle the order to be 2,3,1 and in week three it will work 3,1,2. this pattern will then repat itself.

I am having trouble soughting out a logic that can know wen temp is within the right range to turn the right ac's on whilst also having the order of the ac alternate weekly.

Help is appreciated.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#1

Re: Logic Problem

12/05/2010 10:09 PM

Haven't you ever heard of an "IF/AND" statement or "IF/THEN" statement. This is really pretty easy and you should be able to solve it with simple Boolean operators.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#2
In reply to #1

Re: Logic Problem

12/05/2010 10:22 PM

I understand to use those statments but i cant get my head around it.

For example how am i going to shuffle the order of the ac's whilst saying that if temp is x amount then turn on ac1 when ac's1 order of operation will change weekly.

Also having the ac turn on 1 @ 35, 1,2 @37.5, 1,2,3 @ 40 is also confusing me, if all i had to do was turn on all 3 at a given temp would be much easier.

would it work something like this,

If temp is 35-37 turn ac 1 on end

If temp is 37.5-39.5 turn ac 1,2 on end

If temp is 39.5-40 turn ac 1,2,3 on end

Thats how im thinkin but dont thinks that will operate properly.

Register to Reply
Anonymous Poster
#3

Re: Logic Problem

12/06/2010 12:02 AM

Use a thermostat and a sequence control panel. It is simple. Or three individual thermostats with sequence panel.

Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#4
In reply to #3

Re: Logic Problem

12/06/2010 12:10 AM

I would of or even a ddc but we were requested to use plc, i believe the decision had something to do with communication between units but that is not a concern of yet.

Register to Reply
Guru
Engineering Fields - Instrumentation Engineering - New Member

Join Date: Dec 2009
Location: San Antonio, TX USA
Posts: 844
Good Answers: 29
#5

Re: Logic Problem

12/06/2010 10:59 AM

What software?

__________________
"Do not worry about your difficulties in Mathematics. I can assure you mine are still greater". - Albert Einstein
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#9
In reply to #5

Re: Logic Problem

12/06/2010 7:22 PM

Allen bradley picosoft pro.

Register to Reply
Guru
United States - Member - New Member Engineering Fields - Power Engineering - New Member

Join Date: Sep 2006
Location: California, USA, where the Godless live next door to God.
Posts: 4665
Good Answers: 804
#6

Re: Logic Problem

12/06/2010 11:20 AM

You are describing a classic "triplex alternator" control system. People like Time Mark make dedicated triplex controllers for pump systems, there is no reason why it could not work for AC units. The only trick is, they will alternate every cycle, not every week. I don't know why you would not want to allow it to operate that way though, it's the most reliable way to maintain even wear and tear on the equipment.

__________________
** All I every really wanted to be, was... A LUMBERJACK!.**
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#10
In reply to #6

Re: Logic Problem

12/06/2010 7:24 PM

Hmmm, what you says make sense because the whole reason for the weekly cycle is to even out wear and tear. But its too late they have requested plc.

Register to Reply
Guru
Hobbies - Fishing - Old Salt Hobbies - CNC - New Member United States - US - Statue of Liberty - New Member

Join Date: Mar 2007
Location: Rosedale, Maryland USA
Posts: 5197
Good Answers: 266
#7

Re: Logic Problem

12/06/2010 1:07 PM

Write sub routine assigning the different ac to a variable. Changing them over a three week rotation. You may have to write the clock to keep time if the PLC does not have one or acquire software for one. The assign the variable to the temperature you wish them to come on.

__________________
Life is not a journey to the grave with the intention of arriving in a pretty, pristine body but rather to come sliding in sideways, all used up and exclaiming, "Wow, what a ride!"
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#11
In reply to #7

Re: Logic Problem

12/06/2010 7:28 PM

Thanks this helps me out a bit. Can you explaine more?

Register to Reply
Anonymous Poster
#8

Re: Logic Problem

12/06/2010 6:21 PM

Make state equation and use J-K flipflop

The pattern will repeat after every change of tempeature

Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#12
In reply to #8

Re: Logic Problem

12/06/2010 7:29 PM

This would be handy but the pattern has to repeat ever week, cheers for the suggestion.

Register to Reply
Power-User

Join Date: Jun 2010
Posts: 348
Good Answers: 10
#13

Re: Logic Problem

12/06/2010 7:43 PM

First draw a flow chart for the events to happen the right way.

PLC capable of various configurations I/O including clock function for weekly change over are available from the manufacturers, you should be able to write a program in high level computer language to make the PLC device function appropriately.

If you are not in depth familiar with PLC, best advise to you is to send your requirements to any PLC system vendor, they will do it for a charge.

__________________
Knowledge sharing is a WIN-WIN situation
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#16
In reply to #13

Re: Logic Problem

12/07/2010 12:36 AM

Hi,

i was in the middle of wirting the flow chart and this was the part doing my head in.

I have a bit of experience with plc obviously not enough but i dont have a choice and have to complete the project.

Register to Reply
Anonymous Poster
#14

Re: Logic Problem

12/06/2010 11:39 PM

Simple enough: set up three internal relays for temp 1 = bit 1; temp 2 =bit 2; temp 3 = bit3.

then use week 1 "and" temp1 to ac 1 "or"

week 2 "and" temp 2 to ac1 "or"

week 3 "and" temp 3 to ac 1..

new rung:

week 1 "and" temp 2 to ac 2"or"

week 2 "and" temp3 to ac 2 "or"

week 3 "and" temp 1 to ac2.

new rung:

week 1 "and" temp 3 to ac 3 "or"

week 2 "and" temp 1 to ac 3 "or"

week 3 "and" temp 2 to ac 3.

done.

Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#18
In reply to #14

Re: Logic Problem

12/07/2010 1:09 AM

Hi thanks for the reply i am sought of following.

By reading what u have written i gaver that everyweek the ac swap at which temp to operate i require that....temp1 turns on one unit

temp2 turns on two units

temp 3 turns on Three units

Thus would wat u propose look more like this?

week 1 "and" temp1 to ac 1 "or"

week 2 "and" temp 2 to ac1 , ac2 "or"

week 3 "and" temp 3 to ac 1, ac2, ac3

new rung

week 1 "and" temp 2 to ac1, ac 2"or"

week 2 "and" temp3 to ac 2, ac3, ac1 "or"

week 3 "and" temp 1 to ac2.

sorry if i am clueless.

Register to Reply
Guru

Join Date: Jun 2007
Location: chennai,India
Posts: 592
Good Answers: 19
#15

Re: Logic Problem

12/06/2010 11:54 PM

Dear sir

I have done similar assignment for Remote telephone exchanges with 2 nos ACs to work alternatively every 24 hours.

For you similar logic can be developed.

Please send your email id and 2 days time to send you the ladder diagram for any PLC.

Ladder diagram can be modified for your dedicated PLC.

regards

ramesh

__________________
Ramesh,Freelance Electrical/automation Consultant
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#17
In reply to #15

Re: Logic Problem

12/07/2010 12:38 AM

Thanks mate we will also be implementing the system in similar environment.

I am using picosoft pro software.

once again thanks.

WongTong3@msn.com

Register to Reply Off Topic (Score 5)
Guru

Join Date: Jun 2007
Location: chennai,India
Posts: 592
Good Answers: 19
#25
In reply to #17

Re: Logic Problem

12/07/2010 5:11 PM

Dear sir

Program and copy of output sent to your email Id.please acknowledge receipt.

__________________
Ramesh,Freelance Electrical/automation Consultant
Register to Reply Off Topic (Score 5)
Participant

Join Date: Mar 2008
Posts: 4
#19
In reply to #15

Re: Logic Problem

12/07/2010 9:19 AM

Hello, Ramvinod

I, also I am interested in knowing this ladder logic.

My Email:instrumentosycontrolesyahoo.es

Thank.

Edgar Espinosa Marca

Register to Reply Off Topic (Score 5)
Guru

Join Date: Jun 2007
Location: chennai,India
Posts: 592
Good Answers: 19
#24
In reply to #19

Re: Logic Problem

12/07/2010 5:09 PM

Please send your correct email id.mail sent to you is getting bounced.

ramesh

__________________
Ramesh,Freelance Electrical/automation Consultant
Register to Reply Off Topic (Score 5)
Active Contributor

Join Date: Dec 2010
Posts: 14
#26
In reply to #24

Re: Logic Problem

12/08/2010 12:49 AM

Thanks ramesh i havnt had a look yet, im at work but cheers ill let you know how i go with it.

Register to Reply Off Topic (Score 5)
Participant

Join Date: Mar 2008
Posts: 4
#29
In reply to #24

Re: Logic Problem

12/08/2010 8:14 AM

Hello, Ramvinod

Excuse the mistake, but it was for the speed of the fingers.

My Email:instrumentosycontroles@yahoo.es

Thank.

Edgar Espinosa Marca

Register to Reply Off Topic (Score 5)
Guru

Join Date: Jun 2007
Location: chennai,India
Posts: 592
Good Answers: 19
#34
In reply to #29

Re: Logic Problem

12/14/2010 11:39 AM

I had already sent you the ladder logic print output in pdf format and the program in soft copy.Hope you would have received.

Kindly acknowledge.

__________________
Ramesh,Freelance Electrical/automation Consultant
Register to Reply Off Topic (Score 5)
Member

Join Date: Oct 2010
Location: Central Oklahoma, USA
Posts: 8
#20

Re: Logic Problem

12/07/2010 10:32 AM

Wong,

I would program the PLC as if it were two separate problems.

The 1st Program deals with temp and how many units to turn on and when (use m bits instead of outputs at this point).

2nd Program: Rotate the units to be turned on and in which order. If the same order over and over again is OK (i.e., 123, 231, 312), that will make it easier. Give each set a recipe name (PlanA, PlanB, PlanC). (this makes it easier for humans to understand.)

Now we select which "Plan" we want, based on which one was selected for each of the last two times (use holding registers and compare). Use the m bits set for the temp to turn on outputs for the AC units.

Sorry, my brain is VERY simple, but I am really pretty good at PLC programming. I just make it simple!

__________________
"If you can't explain it simply, you don't understand it well enough." (AE)
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#27
In reply to #20

Re: Logic Problem

12/08/2010 12:51 AM

Cheers for the response, i am beginning to understand.

Register to Reply
Power-User
United States - Member - New Member

Join Date: Aug 2008
Location: KY, USA
Posts: 367
Good Answers: 18
#21

Re: Logic Problem

12/07/2010 10:49 AM

This sequencing is simple to do in ladder logic, but it will take several lines of code since you basically must build the "truth table" into your code. I used a timer preset to 168 hours (24x7) assuming that you have a low-end pico PLC which has no internal clock (though many pico PLCs do have clock/calendar capability).

This image defines all of the variables and presets that you stated:

This image shows the ladder logic for AC1:

All you have to do is move the "greater-than / less-than" instructions around to satisfy the conditions for AC2 and AC3. (Yes, you can use XIO instructions instead of less thans in the Unlatch rung.)

You should also think about what will happen the moment that a week ends. You may want to write some extra logic to keep AC1 and AC2 from switching jobs instantaneously when the presets change. So if AC1 is already running then let AC1's cycle finish before enabling AC2.

__________________
The most valuable of all talents is that of never using two words when one will do. ~Thomas Jefferson
Register to Reply
Power-User
United States - Member - New Member

Join Date: Aug 2008
Location: KY, USA
Posts: 367
Good Answers: 18
#22
In reply to #21

Re: Logic Problem

12/07/2010 11:03 AM

Oops - the counter should be preset to 4.

__________________
The most valuable of all talents is that of never using two words when one will do. ~Thomas Jefferson
Register to Reply
Power-User
United States - Member - New Member

Join Date: Aug 2008
Location: KY, USA
Posts: 367
Good Answers: 18
#23
In reply to #22

Re: Logic Problem

12/07/2010 3:46 PM

Also need to add "NOT" instructions to make only one of 3 conditions true at one time.

__________________
The most valuable of all talents is that of never using two words when one will do. ~Thomas Jefferson
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#28
In reply to #23

Re: Logic Problem

12/08/2010 12:54 AM

Thanks mate i can see this being i big help.

Register to Reply
Power-User
United States - Member - New Member

Join Date: Aug 2008
Location: KY, USA
Posts: 367
Good Answers: 18
#30
In reply to #28

Re: Logic Problem

12/08/2010 9:14 AM

Hope it helps.

BTW: You did not specify how you wanted to write your logic. With a 1760-AWA you can display your code in 3 different formats. I use the ANSI/CSA format.

__________________
The most valuable of all talents is that of never using two words when one will do. ~Thomas Jefferson
Register to Reply
Active Contributor

Join Date: Dec 2010
Posts: 14
#31
In reply to #30

Re: Logic Problem

12/10/2010 1:43 AM

lol i dont even know what that means.

all i know is that it will be ladder logic.

Register to Reply
Power-User
United States - Member - New Member

Join Date: Aug 2008
Location: KY, USA
Posts: 367
Good Answers: 18
#33
In reply to #31

Re: Logic Problem

12/14/2010 11:31 AM

The 3 standard forms of ladder logic that you can pick from when writing code for an Allen Bradley PicoPLC are:

1) Device Display - ladder logic that does not use graphical symbols that look like contacts and coils used for electrical wiring diagrams. Instead simple symbols like brackets and absolute value bars are used.

2) DIN IEC Format - ladder logic that with rungs running from top to bottom instead of left to right, so inputs are at the top and outputs are at the bottom.

3) ANSI/CSA Format - ladder logic uses graphical symbols that look like contacts and coils used for electrical wiring diagrams.

__________________
The most valuable of all talents is that of never using two words when one will do. ~Thomas Jefferson
Register to Reply
Active Contributor

Join Date: Mar 2010
Posts: 11
#32

Re: Logic Problem

12/14/2010 11:18 AM

Step 1)

Set up "Counter" to increment by one every 7 days type integer range 1 to 3

Counter resets to 1 when incrementing from 3

Counter output = N

Step 2)

if temp > temp1 then turn on A/C N

If temp > temp2 then turn on A/C N+1

If temp > temp3 then turn on A/C N+2

Register to Reply
Register to Reply 34 comments
Copy to Clipboard

Users who posted comments:

Anonymous Poster (3); Edgar Espinosa Marca (2); EElectrician (5); Joisey (1); JRaef (1); mountk2 (1); ozzb (1); ramvinod (4); RDGRNR (1); vermin (1); Virgin Mary (1); wong (13)

Previous in Forum: 3 Motors to Run Using 'Start' and 'Stop' Pushbutton Switches but no Latch Coil   Next in Forum: Differences Between Parallel and Synchronization of Generators

Advertisement