Host Engineering Forum

General Category => DirectSOFT => Topic started by: crdfx on August 12, 2008, 09:28:25 PM

Title: completely new to plcs
Post by: crdfx on August 12, 2008, 09:28:25 PM
i have never had any dealing with plcs before and the boss wants me to learn how to write programs so please bear with me and  thanks any help you may be able to give,i have just started with directsoft 5.3 and have no idea what or how to do anything just a beginner and real want to learn again thanks for any pointers
Title: Re: completely new to plcs
Post by: Greg on August 13, 2008, 02:31:07 PM
Hi crdfx, welcome to PLC Land!  ;D

Probably the best thing to do is to get to know your PLC. I would just advise downloading the manual for the PLC you plan on using, and then just start reading from Chapter 1 onward. The basics are dealt with first, and more specific information is given as you go. I know this might not sound like much help, but, trust me, if you are new to PLCs then you need to know what they do before you can really understand what DirectSOFT is allowing you to do.

Hope this helps!
Title: Re: completely new to plcs
Post by: milldrone on August 14, 2008, 08:01:59 AM
crdfx,

Let me second the welcome to PLC land!!!

If you are the kind of person that learns from doing and seeing what others have done. Try this approach. Go to
http://forum.automationdirect.com/
And  read the postings of others, see how they solve problems. As you get to know how PLCs work try to solve some of the problems that are posted and compare the results that are posted against what you have done.

Another site that also has a wealth of information is plcs.net.

P.S. Pay special attention to anything Bernie Carlton Posts.
Title: Re: completely new to plcs
Post by: crdfx on August 15, 2008, 09:53:20 PM
thanks guys for the warm welcome i guess its are about reading lol
Title: Re: completely new to plcs
Post by: milldrone on August 16, 2008, 07:43:55 AM
crdfx,

As an example. In this post http://www.plctalk.net/qanda/showthread.php?t=41168 at PLCs.net. The original poster wanted a "cleaner", "simpler" way to solve his problem. So I set out to find a way to do it. Fortunately direct soft had a very simple way to do it. I did not post it because he needed a Allen Bradly solution. Actually I found two solutions, but bundled them into one project and saved it for further use.

I made a new project up and tested it out on a plc that I keep at my desk. This plc is my spare parts plc. I do not keep my spare parts "on the shelf" but I put them at my desk so I can test new ways of doing things.

Have fun     
Title: Re: completely new to plcs
Post by: Vernon Leeper on August 16, 2008, 09:04:36 PM
Hello crdfx,
I too am some what new to Direcct Logic's PLC's, cut my teeth on some Allen Bradley stuff years ago. I like the Direct Logic stuff a lot better, thier service is free and more helpful more so than the other guys. Go to the AutomationDirect site and check the training link to Doug Bell's classes, I think if you attend the basic class it would help you understand how to use whatever you chose to do. It was worth the time and money to me to attend, he explains in more detail on what to do and how to do it. Plus the hands on approach is top notch, you won't be disappointed.
This site is a huge, huge, help in anything you are trying to acomplish aswell, there is more tallent , knowledge here than anywhere I have looked.
Good luck on your endervers,
Vern.
Title: Re: completely new to plcs
Post by: crdfx on August 19, 2008, 10:00:28 PM
this is my first job to do with my plc this is a dust collector system main blower is running 30 mins after main blower motor is turned off it  the plc is to start six shaker motors one at a time and run each shaker motor for two mins after all six shaker motors have ran it must start six asco valves one at a time and run them for one minute each so where and how would i program something like this,where do i start? i have no idea how this should look any help thanks ;D
Title: Congrats! you have already started
Post by: milldrone on August 20, 2008, 07:31:13 AM
this is a dust collector system main blower is running 30 mins after main blower motor is turned off   the plc is to start six shaker motors one at a time and run each shaker motor for two mins after all six shaker motors have ran it must start six asco valves one at a time and run them for one minute each

The description of the process is the first step! I think you need more detail (Push buttons, fire system? limit switches, details on outputs). In your description there are questions that need to be answered.
1. Is the main blower to be controlled by the PLC?
2. Your description seems to indicate that this is only done after the main blower shuts down is this true? What needs to happen if there is a power failure during a main blower "run cycle"?
3. Does anything need to happen when the "main blower" starts up?
4. You mention starting shaker motors, but no mention of run duration. You also imply that they need to run individually. What needs to happen if there is a motor overload and a shaker motor is unable to run?   
Title: Re: completely new to plcs
Post by: crdfx on August 20, 2008, 09:08:38 AM
the plc is just going to turn on a motor starter contactor for the shakermotors and just going to turn on six asco valves
main blower is not connected to plc
yes everything happens 2hours after main blower is shut down
nothing happens at blower startup
the six shaker motors need to run five minutes one at a time 30 seconds between each motor startup and with overload just move to next motor
Title: Re: completely new to plcs
Post by: milldrone on August 21, 2008, 07:52:15 AM

the six shaker motors need to run five minutes one at a time 30 seconds between each motor startup and with overload just move to next motor

crdfx,

There appears to be some inconsistencies between your posts
start six shaker motors one at a time and run each shaker motor for two mins after all six shaker motors have ran it must start six asco valves one at a time and run them for one minute each



This how I'm interpreting your posts correct me if I'm wrong

Project definition:

1. "Main blower" shuts down (PLC needs a way to sense this condition). What do you want to happen if someone starts the main blower for say 1 minute and then turns it off?
2. Start shaker #1, run for 5 minutes.
3. Wait thirty seconds, start shaker #2 run for 5 minutes. 
4. Wait thirty seconds, start shaker #3 run for 5 minutes.
5. Wait thirty seconds, start shaker #4 run for 5 minutes.
6. Wait thirty seconds, start shaker #5 run for 5 minutes.
7. Wait thirty seconds, start shaker #6 run for 5 minutes.

What needs to happen if This cycle is interrupted by something, like the "main blower" starting again?

8. Wait Thirty seconds????? Start asco valve #1 run for 1 minute.
9. Run asco valve #2 for 1 minute.   
10. Run asco valve #3 for 1 minute.
11. Run asco valve #4 for 1 minute.
12. Run asco valve #5 for 1 minute.
13. Run asco valve #6 for 1 minute.

What needs to happen if This cycle is interrupted by something, like the "main blower" starting again?

What do you want to happen if there is no air pressure?

Do you need any indicator lights or push buttons?
Title: Re: completely new to plcs
Post by: crdfx on August 22, 2008, 06:53:37 PM
ok let me try again(sorry about this but like i said never done this plc stuff before)so please excuse me but this is what i need to do this dust collector has a main blower and six shaker motors and six asco valves the main blower motor starter has a set of aux contacts on it that close when blower is running and when the main blower is shut down i need the plc to wait 2 hours and then start 1 of six shaker motors run that motor for 2 minutes then start shaker motor 2 and run it for 2 minutes and so on till all 6 motors have shock and then wait 5 minutes and start asco valve 1 and run it for 1 minute and then wait for 1 minute and start asco valve 2 run it for 1 minute and so on
we have been running shaker motors and asco valves by hand after shutdown but now the boss man wants this plc thing put in to do the job hope this helps and sorry and thanks for your understanding
Title: Re: completely new to plcs
Post by: milldrone on August 23, 2008, 10:02:19 AM
crdfx,

OK. So now in your original post you indicated you wanted to learn about PLC's

have just started with directsoft 5.3 and have no idea what or how to do anything just a beginner and real want to learn again thanks for any pointers

I'm taking your description and writing it into steps.

1. Aux contact on Main blower "breaks" (this will be the starting point for your cycle, because you need to wait for 2 hours)

2. Wait two hours.

3. Start the sequence for the shaker motors (two of your posts indicate no time between shaker motor run times and one post indicates 30 second delay) (also one post has the motors running 5 minutes and two posts have them running 2 minutes each)

4. Start the sequence for the air valves (both of your posts that mention air valve times indicate 1 minute blow times, but one post indicates a 1 minute delay between blow times)

5. End of sequence.


BTW Presuming I have the details correct, your program will have these same steps. This is why the details and planning are important.

Questions:

1. Do you have a PLC for this project already?

2. You mentioned that you have DS5.3, do you have it installed in a computer that can be connected with the PLC when it is installed?

3. Do you have any communications gear to connect with the PLC?

4. Are you also doing the wiring and cabinet work?

5. This sounds like a bag house for a woodworking/cabinet shop. What needs to happen if the blower runs for a small amount of time (and hasn't collected any dust). Do you still want to cycle? Or do you want a minimum main blower run time to also be necessary to trigger the cycle?

6. What do you want to happen if the blower turns off and 1 hour and 59 minutes later someone turns the blower on again?

7. Do you need an indicator to inform you that a cycle "will happen sometime in the next two hours"?

8. Do you need a button to cancel the cycle for just one time, after the blower shuts down?

9. You have not indicated you need any help in interfacing with the existing equipment, is this true?

10. Presuming I have the order in the steps correct in the list at the top of this post. Do you just want the code? Or do you want some help so you can do it yourself?   



Title: Re: completely new to plcs
Post by: crdfx on August 26, 2008, 09:03:56 AM
answers to above questions
1yes
2yes
3yes
4yes
5no
6 nothing
7no
8no
9yes
10 just code and thanks again
Title: Re: completely new to plcs
Post by: milldrone on August 26, 2008, 12:13:57 PM
PLC 06

// Rung 1
// Address 0
#BEGIN COMMENT
"When the main blower stops it will set C0"
#END
STRND X15
SET C0

// Rung 2
// Address 2
#BEGIN COMMENT
"C0 will be reset when C2 is on,  The reset is also performed during a powerup condition. "
"This is because the step will be frozen  in the drum where it was. If you want the step to "
"continue then C0 will need to be re addressed to a retentive range and the SP0 will need "
"to be removed. "
""
"C2 is the last item in the second drum"
#END
STR C2
STR X15
AND C1000
ORSTR
OR SP0
RST C0

// Rung 3
// Address 8
#BEGIN COMMENT
"When C0 is on the drum is enabled"
""
"When C0 is first turned on, it jogs the step to step #2"
""
"Step #2 is 7200 seconds "
""
"The drum is reset when C2 is on. C2 is the last item in the second drum. The reset is also "
"performed during a powerup condition. This is because the step will be frozen where it "
"was. If you want the step to continue then C0 will need to be re addressed to a retentive "
"range and the SP0 will need to be removed. "
#END
STR C0
STRPD C0
STR C2
STR X15
AND C1000
ORSTR
OR SP0
EDRUM CT20 K1 K100 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 C1 Y5 Y4 Y3 Y2 Y1 Y0 K1 K7200 K120 K120 K120 K120 K120 K120 K1 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 K0 K0 K8000 K4000 K2000 K1000 K800 K400 K200 K0 K0 K0 K0 K0 K0 K0

// Rung 4
// Address 83
#BEGIN COMMENT
"When C0 and C1 are on this drum is enabled"
""
"When C1 is first turned on the step is jogged to step #2 (this is so the output is not turned "
"on all the time) This must be one of those feature /bug thingys.  "
#END
STR C0
AND C1
STRPD C1
STR C2
STR X15
AND C1000
ORSTR
OR SP0
EDRUM CT30 K1 K100 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 C2 Y13 Y12 Y11 Y10 Y7 Y6 K1 K60 K60 K60 K60 K60 K60 K60 K60 K60 K60 K60 K1 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 DEF0 K0 K8000 K0 K4000 K0 K2000 K0 K1000 K0 K800 K0 K400 K200 K0 K0 K0

// Rung 5
// Address 159
END

// Rung 6
// Address 160
NOP


#BEGIN ELEMENT_DOC
"X15","","","main blower aux"
"Y0","shaker#1","",""
"Y1","shaker#2","",""
"Y2","shaker#3","",""
"Y3","shaker#4","",""
"Y4","shaker#5","",""
"Y5","shaker#6","",""
"Y6","ascovalve#1","",""
"Y7","ascovalve#2","",""
"Y10","ascovalve#3","",""
"Y11","ascovalve#4","",""
"Y12","ascovalve#5","",""
"Y13","ascovalve#6","",""
"C0","","","cycle"
"C1","start 2nd drum","",""
"C2","reset, cyc done","",""
"C1000","","","if you want the cycle to shut down whenever the main blower turns on remove this bit but leave the main blower aux        "

#END
Title: Re: completely new to plcs
Post by: crdfx on August 26, 2008, 01:09:26 PM
thanks so how would this look in ladder?
Title: Re: completely new to plcs
Post by: MikeS on August 26, 2008, 02:00:55 PM
u can import that code directly into directsoft, simply use good ole notepad, cut from the forum, paste into noetpad, save to a .txt file.

the use directsoft's 'file-> import program' facility to bring that text into a ladder program, complete with documentation.
Title: Re: completely new to plcs
Post by: milldrone on August 27, 2008, 07:42:46 AM
crdfx,

Just in case you did not understand Mike's answer.

Save the text I wrote in a notepad file (copy and paste).

1. Launch direct soft, double click on "direct soft 5 programming"
2. Pick a name for your project, click on 06 for plc type, click on "OK"
3a. You might have a tip of the day, read it (there is lots of good tips and short cuts here) click through.
3b. Click on "file", click on "Import", click on "program", find the notepad file you saved earlier, highlight it, click on "open".

This should open the project I wrote. If you have any problems or questions, post back and we will work them out.
Title: Re: completely new to plcs
Post by: gmh on April 14, 2009, 09:23:56 PM
This is a great site i'm in the same position as newbie.  I need to control a vfd for a pressure system and start and stop 6 lag pumps according to psi which is sensed by a pressure transducer. What loop is best to use for sensing and controlling pressure open,closed, forwarding etc. does anyone have any advice for me thanks
Title: Re: completely new to plcs
Post by: milldrone on April 15, 2009, 06:23:50 PM
gmh,

Presuming you are the "gmh" that posted over at PLCs.net, and was asking questions about Omron. I doubt you will get much help here. Now if you have some questions about Automation Direct PLCs you may get what you need here. Please be specific and describe the whole process. This includes things like what do you want to happen if one of the pumps is locked out for maintenance? Are you talking about pump alternation? Are all the pumps local to each other (not connected by wireless)? We don't want to be playing 20 questions. Ect. ect.

Thinking out of the box, if you have good local support for ABB drives. There is a ABB drive that will do the PID and the lead lag for four pumps. No PLC is needed.  This drive is the ACS550 VFD. Over at PLCs.net Dick DV is the expert you will want for ABB.
Title: Re: completely new to plcs
Post by: imemotor on April 30, 2009, 12:08:24 PM

I have read some of your posts and it seems that you know this stuff, I am writing my first program to control a cooling tower.  I bought a DL-05 with analogue input card (input for 4ma to 20ma pressure sensor and temperature sensor) I know now I should have bought a DL-06 with a analogue input and output (output to send to VFD).  Anyway my project with the DL-05 is:
input from C-more touch panel
system on button (output Y0)
temperature probe (analogue input 1)
-If temp is set point 1 activate Y1 (pump on contactor) activate Y2 VFD fan (preset speed 1)
-If temp is set point 2, Y1 still on Y2 off and Y3 on (VFD preset speed 2)
- If temp is set point 3, Y1 still on Y3 off and Y4 on (VFD preset speed 3)
- Analogue input 2 (pressure sensor) if pressure drops to set point 1 turn on Y5 (alarm).
I would like to display analogue input 1 and analogue input 2 in graph form on the C-more panel (EA7-S6M-R)

I am able to program the touch panel with a button to activate an X input which triggers a Y output on the PLC but have not been able to work with analogue inputs to the PLC or touch panel.

Can you help?
Title: Re: completely new to plcs
Post by: Controls Guy on April 30, 2009, 05:50:31 PM
There are a couple more options you might want to consider for the speed interface to the VFD.  First, there are combination analog modules for the 05/06 that have both inputs and outputs on the same module.   Another possibility is that many VFD's have a "motor-pot" mode using two digital inputs to the drive.  As long as you hold one input true, the motor will speed up.  Hold the other true and it will slow down.  Leave both off and it will continue to run at the same speed.
Title: Re: completely new to plcs
Post by: imemotor on May 01, 2009, 08:31:11 AM
Thanks for your help, I didn't know there were dual analog cards available.  Can you point me in the right direction for programming the PLC with the analog inputs that trigger outputs at various set points?  also how do I set the touch panel to monitor the data.
Title: Re: completely new to plcs
Post by: plcnut on May 01, 2009, 12:04:26 PM
Imemotor:

Try importing this program, It should do just what you described. As far as the C-more is concerned whenever you program your panel you need to map V200 as your pointer for system temperature, and V201 as the pointer for pressure. You can also set pointers for all your Setpoints to v210-V213, the default values are loaded on the first scan, but you can adjust them accordingly when you program. Hope this helps, let me know if you have any more questions, and please feel free to critique my program, there are probably a lot of you guys that could do a lot better than me. Jason



PLC 05

// Rung 1
// Address 0
ISG S0

// Rung 2
// Address 2
ANLGIN K0 K0 K2 K0 V200

// Rung 3
// Address 40
STR SP0
LD K1000
OUT V210
LD K3000
OUT V211
LD K4000
OUT V212
LD K200
OUT V213

// Rung 4
// Address 49
STR X0
SET S1
OUT Y0

// Rung 5
// Address 52
STR X0
ANDN V201 V213
SET S5

// Rung 6
// Address 56
STRN X0
RST S1 S5

// Rung 7
// Address 59
SG S1

// Rung 8
// Address 61
STR V200 V210
JMP S2

// Rung 9
// Address 64
SG S2

// Rung 10
// Address 66
OUT Y1
OUT Y2

// Rung 11
// Address 68
STR V200 V211
JMP S3

// Rung 12
// Address 71
STRN V200 V210
JMP S1

// Rung 13
// Address 74
SG S3

// Rung 14
// Address 76
OUT Y1
OUT Y3

// Rung 15
// Address 78
STR V200 V212
JMP S4

// Rung 16
// Address 81
STRN V200 V211
JMP S2

// Rung 17
// Address 84
SG S4

// Rung 18
// Address 86
OUT Y1
OUT Y4

// Rung 19
// Address 88
STRN V200 V212
JMP S3

// Rung 20
// Address 91
SG S5

// Rung 21
// Address 93
OUT Y5

// Rung 22
// Address 94
END

// Rung 23
// Address 95
NOP


#BEGIN ELEMENT_DOC
"X0","On/Off switch","",""
"Y0","""System On""","","Indicator Light"
"Y1","Pump On","",""
"Y2","Fan speed 1","",""
"Y3","Fan Speed 2","",""
"Y4","Fan Speed 3","",""
"Y5","Alarm Output","",""
"V200","Channel 1","","Analog input"
"V201","Channel 2","","Analog input"
"V210","S.P. 1","",""
"V211","S.P. 2","",""
"V212","S.P. 3","",""
"V213","S.P. 4","","Low Pressure"

#END
Title: Re: completely new to plcs
Post by: milldrone on May 02, 2009, 09:54:47 AM
imemotor,

There are a couple of things in your post that might be interpreted differently than what you may have intended.

input from C-more touch panel

What are you intending to control via the input from the Cmore?

system on button (output Y0)

Is this just an indicator? Or is this an illuminated selector switch? Or an illuminated momentary push button? Or an illuminated push pull maintained button? I think plcnut thinks it's a illuminated button of some sort. And that you turn the system on and off with this. While we are on the subject of the on and off control. You stated that this is a cooling tower, and I'm guessing that if maintenance were to be performed it would be locked out. What do you want to happen if there is a power failure? Do you want it to start back up on it's own? Or do you want some sort of operator intervention? Many installations that I have seen this type of equipment is just desired to run without any operator intervention. What kind of startup do you want to happen after a maintenance lockout? You mentioned that you had been able to program the HMI to turn on an output. Do you want to be able to turn on the system from the HMI as well as the "on off button"?

-If temp is set point 1 activate Y1 (pump on contactor) activate Y2 VFD fan (preset speed 1)
-If temp is set point 2, Y1 still on Y2 off and Y3 on (VFD preset speed 2)
- If temp is set point 3, Y1 still on Y3 off and Y4 on (VFD preset speed 3)
- Analogue input 2 (pressure sensor) if pressure drops to set point 1 turn on Y5 (alarm).

It looks like plcnut is presuming you want the setpoints to be programmed in the PLC. And that they are default values that the system will start with whenever the PLC transitions to run. I'm guessing that you want the values to come from the HMI. But I have no idea if you want default values or the last values that the HMI sent to the PLC.

You have not stated what VFD you are using. In all of the VFD's that I have used the preset speeds are programmed at the VFD. You listed 3 preset speeds. This would normally be done with two inputs for speed selection.

The following would be an example of how a GS2 VFD (Automation Direct) would be preset speed selected.

P 4.00 = 01  source of frequency command by digital keypad (up down arrows)
P 3.03 = multi speed bit 1
P 3.04 = multi speed bit 2
P 5.01 = 25 Hz preset 1
P 5.02 = 40 Hz preset 2
P 5.03 = 60 Hz preset 3

Now when just the run command is on the drive will run to the last speed that the up down arrows set.

If the run command is on and the input DI 4 is on the drive will run at 25 hz

If the run command is on and the input DI 5 is on the drive will run at 40 Hz

If the run command is on and both DI 4 and DI 5 are on the drive will run at 60 Hz.

Now that we are on the subject of VFD's. Did you know that most drives are capable of very tight temperature control on it's own without a PLC? Depending on how you answered the "what do you want to happen after a power failure" question. You still might use the PLC for auto startup, In this example the PLC is going to auto start the drive.   In a GS2 you would use your 4 t0 20 ma temperature signal to the AC1 input of the drive.

P 7.00 = 04 reverse acting (cooling)
P 7.01 = process value default is 100
P 7.02 = setpoint source when only the run command  is on, 00 = keypad
P 7.10 = keypad setpoint
P 7.11 = PID setpoint 1
P 7.12 = PID setpoint 2
P 7.13 = PID setpoint 3
P 7.14 = PID setpoint 4
P 7.15 = PID setpoint 5
P 7.16 = PID setpoint 6
P 7.17 = PID setpoint 7

So you can get 8 different temperature setpoints from a combination of the run command and three digital inputs to the drive.

Now that we are on the subject of PID control let me throw another curve ball at you. You can use comm port 1 to connect to the HMI use comm port 2 to connect to a GS2 via RS232. Perform a PID loop in the PLC and give the drive what amounts to analog control through the RS232 connection. The only downside to this arraignment is that to program either the PLC or the HMI you need to unplug the com port connection.

Now for a disclaimer: I have very limited experience with PID control. But my guess is that ControlsGuy has much more experience than myself and would be willing to help you with any or all of this project.     




   



Title: Re: completely new to plcs
Post by: imemotor on May 03, 2009, 11:49:57 PM
Milldrone,

Thanks for your input, my VFD is made by Baldor but most drives are the same.  I understand that drives (mine included) have analog and digital inputs, the reason I am using a PLC is primarily for the C-more panel interface.  I want to display graphs for temp, pressure, and provide some indicator for fan speed (energy savings).  The C-more will have a system “on” button that will enable the VFD (Y0) I will have 2 graphs for temp and pressure, an indicator for fan speed (text buttons) and a valve open/closed indicator.  The system should self  “restart” after power failure.

My goal for this project is cooling tower automation (energy savings) pump and fan should turn on as required fan should increase or decrease with temperature demand.  System should auto restart after power failure.  System will have a hard lock out but will also have an electronic “lock out” via the C-more button.

Please give me your ideas for project improvement.

IMEMOTOR
Title: Re: completely new to plcs
Post by: milldrone on May 04, 2009, 07:54:28 AM
Thanks for your input, my VFD is made by Baldor but most drives are the same.
I understand that drives (mine included) have analog and digital inputs,

Yes but you said that you had an analog input card. Some drives have RS232 coms, that could be accessed by the DL05. This way you would not need an analog output from the PLC. Are you still planning on using the preset speeds?  Does the Baldor drive have PID capacity?  Do the preset speeds in your drive work like you described earlier. Ie one digital input = one preset speed, or does it use 2 preset inputs to get 3 or 4 presets (depending on if you count the keypad operation mode) or 3 preset inputs to get 7 or 8 preset speeds (depending on count)?


I want to display graphs for temp, pressure, and provide some indicator for fan speed (energy savings).

How will you know the fan speed? The VFD may have faulted or ?

  The C-more will have a system “on” button that will enable the VFD (Y0)

There is no need to use a "real" output for this. Try it with Y6, or Y7, or Y17.  Also what do you want to happen if the Cmore looses comms?

The system should self  “restart” after power failure.

I thought this might be the case. This needs to be planned for from the very beginning.

My goal for this project is cooling tower automation (energy savings) pump and fan should turn on as required

Ok! You mentioned two analog inputs pressure and temperature. You also mentioned that the pump will start and stop. From this I have to assume that this will clue the PLC to turn on or stop the pump. Will there be a delay for temperature to "homogenize" after the pump starts?

Title: Re: completely new to plcs
Post by: imemotor on May 05, 2009, 12:16:03 AM
PLCNUT

Thanks for your program, you said

"As far as the C-more is concerned whenever you program your panel you need to map V200 as your pointer for system temperature, and V201 as the pointer for pressure. You can also set pointers for all your Set points to v210-V213, the default values are loaded on the first scan, but you can adjust them accordingly when you program."

I have set the C-more temperature graph to V200 and pressure to V201.  I understand that your program left the set points at there default values please show me how the program looks with temperature set points 150, 200, 250.  Pump pressure should alarm at low level 35.  Please explain pointer set points v210-v213?

Additionally, Pump on output (Y1) I originally said should trigger "on" following temp set point 1 (150) and remain on through all subsequent trigger points.  I need to correct this statement, I need pump "on" to initiate following "system on" input X0 and a separate input X1 and remain on untill untill X1 is turned off.

Also per MILLDRONE how can we account for system restart (power failure)
Title: Re: completely new to plcs
Post by: milldrone on May 05, 2009, 07:03:57 AM


Also per MILLDRONE how can we account for system restart (power failure)


If the Cmore is the only interface then toggle a retentive bit. The default retentive ranges in an 05 are: C400  through C777. You can also increment a counter the default is retentive for all counters. You can read about setting the retentive ranges in the manual appendix A-6. (thats' where it is listed in my version of the DL05 manual)

If you have a hardwired input to the PLC (what I recommend). Use a maintained (mechanical) contact like a selector switch.
Title: Re: completely new to plcs
Post by: imemotor on May 06, 2009, 07:55:54 AM
MILLDRONE,

Can you help with the program that PLCNUT wrote. 

I have set the C-more temperature graph to V200 and pressure to V201.  I understand that your program left the set points at their default values please show me how the program looks with temperature set points 150, 200, 250.  Pump pressure should alarm at low level 35.  Please explain pointer set points v210-v213?

Additionally, Pump on output (Y1) I originally said should trigger "on" following temp set point 1 (150) and remain on through all subsequent trigger points.  I need to correct this statement, I need pump "on" to initiate following "system on" input X0 and a separate input X1 and remain on until  X1 is turned off

My temperature transmitter is 0 to 300 and pressure is 0 to 100
Title: Re: completely new to plcs
Post by: milldrone on May 06, 2009, 10:14:16 AM
MILLDRONE,

Can you help with the program that PLCNUT wrote. 


Maybe PLCnut can I'm busy untill 2:00 this afternoon
Title: Re: completely new to plcs
Post by: Controls Guy on May 06, 2009, 11:15:40 AM
Here's a non-stage version if you prefer.  I like to do the power up-handler as a subroutine (SBR) at the end of the program so you can ignore it during normal review.  I wanted to only set the pump bits and the alarm output once every second or so to avoid chattering the outputs, and would have done so inline, skipping it with a GOTO and LBL but the 05 doesn't support it, so that's in an SBR as well.  I also added the pump permissive input you mentioned.


PLC 05

// Rung 1
// Address 0
STR X0
OUT Y0

// Rung 2
// Address 2
STR X0
AND X1
OUT Y1

// Rung 3
// Address 5
STR SP4
OUT C0

// Rung 4
// Address 7
STRPD C0
GTS K2

// Rung 5
// Address 10
END

// Rung 6
// Address 11
SBR K1

// Rung 7
// Address 13
ANLGIN K0 K0 K2 K0 V200

// Rung 8
// Address 51
STR SP1
LD K1000
OUT V210
LD K3000
OUT V211
LD K4000
OUT V212
LD K200
OUT V213

// Rung 9
// Address 60
RT

// Rung 10
// Address 61
SBR K2

// Rung 11
// Address 63
STR V200 V210
ANDN V200 V211
OUT Y2

// Rung 12
// Address 68
STR V200 V211
ANDN V200 V212
OUT Y3

// Rung 13
// Address 73
STR V200 V212
OUT Y4

// Rung 14
// Address 76
STRN V201 V213
OUT Y5

// Rung 15
// Address 79
RT

// Rung 16
// Address 80
NOP


#BEGIN ELEMENT_DOC
"X0","On/Off switch","",""
"X1","Pump_Permissive","",""
"Y0","""System On""","","Indicator Light"
"Y1","Pump On","",""
"Y2","Fan speed 1","",""
"Y3","Fan Speed 2","",""
"Y4","Fan Speed 3","",""
"Y5","Alarm Output","",""
"V200","Channel 1","","Analog input"
"V201","Channel 2","","Analog input"
"V210","S.P. 1","",""
"V211","S.P. 2","",""
"V212","S.P. 3","",""
"V213","S.P. 4","","Low Pressure"

#END
Title: Re: completely new to plcs
Post by: milldrone on May 06, 2009, 07:11:11 PM
imemotor, and Controlsguy

I took the liberty of adding some rung comments to Controlsguy's code (I hope he doesn't mind)

Now you can see some different styles of programming Controlsguy Vs. PLCnut.

Questions?

PLC 05

// Rung 1
// Address 0
STR X0
OUT Y0

// Rung 2
// Address 2
STR X0
AND X1
OUT Y1

// Rung 3
// Address 5
#BEGIN COMMENT
"This rung sends the PLC scan to the subroutine every half second"
""
"The next bit of text is a quote from Controlsguy"
""
"Quote:"
"""I wanted to only set the pump bits and the alarm output once every second or so to "
"avoid chattering the outputs, and would have done so inline, skipping it with a GOTO and "
"LBL but the 05 doesn't support it, so that's in an SBR as well."""
#END
STR SP4
GTS K2

// Rung 4
// Address 8
END

// Rung 5
// Address 9
#BEGIN COMMENT
"imemotor,"
""
"This is a subroutine because it's after the ""end"" statement it is scanned only one time"
""
"This section that Controlsguy has written only gets scanned during the first PLC scan after "
"a powerup or a PLC transition from stop to run. "
""
"On larger programs this kind of programming can make the PLC much faster."
""
"He has placed some values for setpoints here also like LD k1000 then do you see the "
"""out"" underneath? this is one of your setpoints to compare against."
""
""
""
#END
SBR K1

// Rung 6
// Address 11
ANLGIN K0 K0 K2 K0 V200

// Rung 7
// Address 49
#BEGIN COMMENT
"The values in this rung are just a guess. You have not given us any info on your "
"temperature probe & transmitter and your pressure sensor and transmitter. So that we can "
"help you scale them."
""
"You can also write to the PLC from the HMI to these setpoints the PLC will overwrite them "
"on powerup or a stop to run transition."
""
"So in you HMI if you wite a value to ""V210"" this will be your new setpoint"
#END
STR SP1
LD K1000
OUT V210
LD K3000
OUT V211
LD K4000
OUT V212
LD K200
OUT V213

// Rung 8
// Address 58
RT

// Rung 9
// Address 59
#BEGIN COMMENT
"The next bit of text is a quote from Controlsguy"
""
"Quote:"
"""I wanted to only set the pump bits and the alarm output once every second or so to "
"avoid chattering the outputs, and would have done so inline, skipping it with a GOTO and "
"LBL but the 05 doesn't support it, so that's in an SBR as well."""
#END
SBR K2

// Rung 10
// Address 61
#BEGIN COMMENT
"I still think you need to check your VFD manual out for info on preset speeds."
""
"These are normally done in a binary matrix"
""
"Fan speed 1out          Fan speed 2out        Fan speed 3out                VFD preset speed #"
"ON                               off                             off                                   = preset 1"
"off                               ON                            off                                    = preset 2"
"ON                             ON                             off                                    = preset 3"
"off                              off                               ON                                  = preset 4"
"ON                             off                               ON                                  = preset 5"
"off                              ON                              ON                                  = preset 6"
"ON                            ON                                ON                                = preset 7"
""
#END
STR V200 V210
ANDN V200 V211
OUT Y2

// Rung 11
// Address 66
STR V200 V211
ANDN V200 V212
OUT Y3

// Rung 12
// Address 71
STR V200 V212
OUT Y4

// Rung 13
// Address 74
STRN V201 V213
OUT Y5

// Rung 14
// Address 77
RT

// Rung 15
// Address 78
NOP


#BEGIN ELEMENT_DOC
"X0","On/Off switch","",""
"X1","Pump_Permissive","",""
"Y0","""System On""","","Indicator Light"
"Y1","Pump On","",""
"Y2","Fan speed 1","",""
"Y3","Fan Speed 2","",""
"Y4","Fan Speed 3","",""
"Y5","Alarm Output","",""
"V200","Channel 1","","Analog input"
"V201","Channel 2","","Analog input"
"V210","S.P. 1","",""
"V211","S.P. 2","",""
"V212","S.P. 3","",""
"V213","S.P. 4","","Low Pressure"

#END

Title: Re: completely new to plcs
Post by: Controls Guy on May 06, 2009, 09:50:20 PM
Mind?  Why would I mind?  I got to do the fun part!   :D

One thing though.  I originally did STR SP4 GTS K2, but I think the internal clock bits are on a 50% duty cycle, so SP4 will be on for 0.5 sec, and off for 0.5 sec.  I meant to do a differential but forgot.  When I noticed I had posted a normal STR, I was going to go back and correct it, but then I noticed you can't do differential contacts on SP bits  (what the heck?), so I changed it to:

STR SP4 OUT C0

STRPD C0 GTS K2

and counted myself fortunate I got it changed real quick before Imemotor saw it!  So the version you commented is slightly obsolete.  Sorry about that!
Title: Re: completely new to plcs
Post by: franji1 on May 06, 2009, 10:35:02 PM
PD coil with C0 parm would work.  What's good about having a differential function as a coil (in addition to contact) is that it is power-flow based, so you could have any combinational logic driving the PD.

If only there was a ONESHOT contact like the old TISOFT had in TI Series 500, then you wouldn't even need to burn a CR.

(cloud of logic)---] powerflow oneshot contact [------(GTS) (or MATH or whatever)
Title: Re: completely new to plcs
Post by: Controls Guy on May 06, 2009, 10:44:13 PM
PD coil with C0 parm would work.

Equivalent to what I did.  Two rungs with four ops either way.

Quote
What's good about having a differential function as a coil (in addition to contact) is that it is power-flow based, so you could have any combinational logic driving the PD.

The differential coils don't enable that.  Since you guys have the nice STRPD's and STRND's, you can still do the combinatorial logic with a regular out coil, then apply the PD or ND to the contacts of THAT coil.  Plus this allows BOTH PD and ND, without having to commit to one or the other.

Now that I think about it, I guess the unique advantage of OUTPD and OUTND occurs when you use them with a NC contact.  If you do:

[logic]  OUTPD C0

STRN C0  [something enabled]

you get the stuff enabled every scan EXCEPT the first scan [logic] is true, which is hard to do with OUT/STRPD.  If that's the only contact on the second rung, you could do OUT/STRPD/NOT, but not if you want to use it in more complex logic.  So OUTPD does distinguish itself!  Plus (though I can't imagine why you would ever do this) you can do

[logic] OUTPD C0

STRND C0 [stuff enabled]  and get only the second scan!  Talk about arcana.

Quote
If only there was a ONESHOT contact like the old TISOFT had in TI Series 500, then you wouldn't even need to burn a CR.  (cloud of logic)---] powerflow oneshot contact [------(GTS) (or MATH or whatever)

I know, those were great!  I was having a discussion about that very topic with somebody a few months ago.
Title: Re: completely new to plcs
Post by: b_carlton on May 07, 2009, 09:52:08 AM
Just remember the limitation of STRPD and STRND when working with a bit location which is affected by the ladder logic (C or Y for example). The instructions only function as expected AFTER the last OUT, SET, RST or whatever in that scan. The instructions do not wrap around to work BEFORE these rungs on the next scan.
Title: Re: completely new to plcs
Post by: Controls Guy on May 07, 2009, 10:06:46 AM
Are you serious?  I'm working on an AD PLC today and I'll have to check that out.
Title: Re: completely new to plcs
Post by: imemotor on May 07, 2009, 10:21:01 AM
Gentlemen,

Thanks for your help, you have given me a great jump start to programming.  Actually the only problem I am having now is to get the PLC to acknowledge my analog sensors.  Seems like it should be easy but I can’t get it to work.
 Analog card F0-04AD-1
Temperature transmitter TTD25N-20-0300F-H
Pressure Transmitter PTD25-20-0100H
My PLC is D0-05AR

I have figured out that the + - sensor leads don’t just plug into the analog card + - channel slots, apparently you need a separate 30V DC power source.  My PLC is AC with no DC power supply, so I have a separate DC power source running through the analog sensors back to the channel inputs on the analog card but is still doesn’t work.

I’m thinking maybe my sensors need to run through a step down resistor?

IMEMOTOR
Title: Re: completely new to plcs
Post by: b_carlton on May 07, 2009, 10:25:22 AM
Here's a thread on the STRPD/STRND limitation from the AD forum: http://forum.automationdirect.com/showthread.php?t=1476&highlight=strpd

 Look for the PDF tech reference in post #16

I also talk about it on my site: http://www.theplcguy.com/ABtoAD/Differential.html
Title: Re: completely new to plcs
Post by: Controls Guy on May 07, 2009, 10:40:31 AM
Gentlemen,

Thanks for your help, you have given me a great jump start to programming.  Actually the only problem I am having now is to get the PLC to acknowledge my analog sensors.  Seems like it should be easy but I can’t get it to work.
 Analog card F0-04AD-1
Temperature transmitter TTD25N-20-0300F-H
Pressure Transmitter PTD25-20-0100H
My PLC is D0-05AR

I have figured out that the + - sensor leads don’t just plug into the analog card + - channel slots, apparently you need a separate 30V DC power source.  My PLC is AC with no DC power supply, so I have a separate DC power source running through the analog sensors back to the channel inputs on the analog card but is still doesn’t work.

I’m thinking maybe my sensors need to run through a step down resistor?

IMEMOTOR


Refer to http://web1.automationdirect.com/static/specs/f004ad1.pdf (http://web1.automationdirect.com/static/specs/f004ad1.pdf) for wiring.  The "+" shown in that diagram at the transmitter is Pin 1 on your temp transmitter (brown if using AD cable) and the "-" is Pin 2 (white).  The pressure transducer is probably similar.  So DC+ to transmitter brown, transmitter white to PLC CH1+, CH1- to DC -, and also ground the DC-.