News:

  • April 17, 2025, 07:41:41 PM

Login with username, password and session length

Author Topic: Very new here...so bare with me.....  (Read 9371 times)

jnaarnold

  • Newbie
  • *
  • Posts: 6
Very new here...so bare with me.....
« on: February 21, 2010, 02:12:22 PM »
I am really just starting with ladder logic, so I will be reading more than posting. Good for you guys huh ? We use PLC's in just about everything at work. I am a maintenance tech in a blowmolding facility here in North Carolina. I have just started taking a liking to PLC's and all they do, and want to be more involved in our facility with the troubleshooting and programming of them. So much that I went out and bought a DL-06 and the DS5 software to program for my home aquarium. I have started writing the program for it which will include controlling the lights, fans, heaters, pumps for the automatic top-off system and dosing for pH control. I figured this would help me to learn it along with gaining proficiency. Before I head of to read, does anyone have any advice? Also, I have one question I have been searching for the answer for, but cannot find, even though it may be right under my nose... How do I write the rung for having a light come on at a certain time and go off at a certain time...? Do I use the less than greater than programming??? Thanks..
John



Below is a screen shot of what I have, is this correct?
« Last Edit: February 21, 2010, 03:12:03 PM by jnaarnold »

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Very new here...so bare with me.....
« Reply #1 on: February 21, 2010, 05:11:38 PM »
You have the basic idea of comparing numbers. Just two comments:

1. The DL06 has a real time clock included. When you connect with the DL06 you can make sure to set it from your PC time. Get the CPU manual and look for V7766 and following registers in the table in section 4. This information is in BCD.

2. You may be wondering about the TAxx nomenclature in your diagram. These are alternate names for the locations V0 and up. These locations are used by default as the location for the accumulated values of timers starting with T0. If that is what you intended then ok. Otherwise read the CPU manually carefully and be aware of these locations which have pre-dedicated uses.
An output is a PLC's way of getting its inputs to change.

jnaarnold

  • Newbie
  • *
  • Posts: 6
Re: Very new here...so bare with me.....
« Reply #2 on: February 25, 2010, 09:46:20 PM »
Like I said I am very new... at this point I am trying to figure out how to turn an output on at a certain time?? Any ideas? Thanks again

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Very new here...so bare with me.....
« Reply #3 on: February 25, 2010, 10:39:27 PM »
First, apply appropriate power to the DL06. Create a program with just one rung, an END statement. Download that to the DL06 and put it into RUN mode.

After you have done that set up a data table and watch the values in V7766 and above as I mentioned below.

Use the PLC - Setup - Clock/Calendar function to set the DL06 to your current date/time. Continue to watch the values.

Now create one more rung before the END rung. Enter a Greater than comparison with the seconds register (V7766) on the left hand side and K30 on the right. End the rung with an OUT of Y0.

Watch what goes on. Watch the Y0 light on the front of the DL06. If this doesn't start the imagination going then turn off and unwire the DL06. Put it into a closet and never open Directsoft again. (kidding)
An output is a PLC's way of getting its inputs to change.

jnaarnold

  • Newbie
  • *
  • Posts: 6
Re: Very new here...so bare with me.....
« Reply #4 on: February 26, 2010, 04:30:18 AM »
lol...thank you very much..sometimes it's those little point ins the right direction... You wouldn't want to write a simple little program for me would you??

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Very new here...so bare with me.....
« Reply #5 on: February 26, 2010, 11:32:01 AM »
Program as I suggested made up and sent via email.
An output is a PLC's way of getting its inputs to change.

jnaarnold

  • Newbie
  • *
  • Posts: 6
Re: Very new here...so bare with me.....
« Reply #6 on: February 26, 2010, 06:15:43 PM »
Thank you so much.. I have been messing with it for a while. Maybe one year I will get the hang of this. I have spent 16 years working as a Cadillac technician doing everything from electrical troubleshooting to OBD II/CAN diagnosis. Now I am in an industrial environment troubleshooting PLC's and its the hardest thing I have ever done. I find this to be all Greek. I really do appreciate you taking your time to 'guide' me. I am just so lost when it comes to the terminology...I have been wearing my eyes and my mind out reading. I just recieved from Automation Direct my LCD for the DL-06...that is going to be neat. Is there anyone out there that would be willing to write a small program for me, if I give the details? All I need it to do would be to turn on htree different sets of lights at certain times..with the ability to have manual control. It seems simple enough, but it has been a struggle.
Bernie, that program you sent me, is that just on a timer? It goes on and off every thirty seconds. Also, there were a bunch of other files in that zip...what were they for?Thanks you so much again Bernie...
John

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Very new here...so bare with me.....
« Reply #7 on: February 26, 2010, 08:36:51 PM »
A 'program' for the DirectLogic PLCs using Directsoft consists of a number of files all having the same base name. For ease I create a separate folder for each project and store the project in it. When you choose to load a project all you see from Directsoft is the .PRJ file but all the files are used for the documentation.

The program I sent is working from location V7766. Get out your manual for the DL06 (I'm sure you either bought one or downloaded the free PDF version.). Look for the Real Time Clock information. I have referred twice before to this and subsequent V registers. They belong to the Real Time Clock in the DL06. This particular register counts seconds in a minute advancing from 0 through 59 at one second each. The following registers contain hours, day, month, year.

It's time to start experimenting yourself. If you don't see possibilities in turning on a light based on seconds in a minute and other parts of time then you really may want to stop. As I said, with power hooked up just go ahead and experiment.

At AutomationDirect go to http://learn.automationdirect.com/welcome.html for videos.
An output is a PLC's way of getting its inputs to change.

milldrone

  • Full Member
  • ***
  • Posts: 48
  • I'm changing my attitude to thumbs up
Re: Very new here...so bare with me.....
« Reply #8 on: February 27, 2010, 09:09:13 AM »
jnaarnold,

Since you mentioned the DL06 LCD display. I have a program for changing the preset values of timers and counters. This is just the display and preset value changing part of a program. I hope I'm not giving you too much to chew at one time. There is a feature of Direct Soft that allows the use of text as way of sharing PLC program content. Copy the text below into notepad, save it, open a new instance of Direct Soft for a DL06, click on "file", import program. This will import the text as a ladder diagram you can use and view.


PLC 06

// Rung 1
// Address 0
#BEGIN COMMENT
"Someone once asked  about the DL06 LCD display"
""
"They were disapointed that it did not have the features of a HMI!"
""
"All they wanted to do was adjust the preset times of some timers and the preset count of a "
"counter."
""
"This is an example program for doing this "
""
""
#END
NOP

// Rung 2
// Address 1
#BEGIN COMMENT
"This rung advances the LCD display from one timer to the next and for the product "
"counter"
#END
STRPD X100
STR CT0
CNT CT0 K4

// Rung 3
// Address 6
#BEGIN COMMENT
"When the display counter accumulator equals 0. Display the slowdown timer in the first "
"LCD line and display the timer preset in the second line. "
""
"If the input X107 is depressed INC V400 if it's within operating limits "
""
"Note: X107 needs to be a rising edge other wise the INC instruction will INCREMENT "
"every scan "
""
" "
#END
STRE CTA0 K0
LCD K1 """Slow down timer"""
LCD K2 """Time .1 sec "" V400:B"
ANDPD X107
ANDN V400 K500
INC V400

// Rung 4
// Address 37
#BEGIN COMMENT
"This rung decrements the value of the preset in the slow down timer"
""
"Note: the compare is to limit the value so it does not ""go below zero"""
#END
STRE CTA0 K0
ANDPD X106
AND V400 K1
DEC V400

// Rung 5
// Address 44
#BEGIN COMMENT
"When the display counter accumulator equals 0. Display the warm up time in the first LCD "
"line and display the timer preset in the second line. "
""
"If the input X107 is depressed INC V401 if it's within operating limits "
""
"Note: X107 needs to be a rising edge other wise the INC instruction will INCREMENT "
"every scan "
""
" "
#END
STRE CTA0 K1
LCD K1 """Warm up time"""
LCD K2 """Time .1sec "" V401:B"
ANDPD X107
ANDN V401 K9999
INC V401

// Rung 6
// Address 72
STRE CTA0 K1
ANDPD X106
AND V401 K1
DEC V401

// Rung 7
// Address 79
#BEGIN COMMENT
"Because the value in the product counter could be large a tmer was implemented to have "
"the number increment faster and faster "
#END
STR X107
TMR T0 K5

// Rung 8
// Address 83
#BEGIN COMMENT
"SP5 is an internal coil that ""flip flops"" every 100 ms. "
""
"A ""PD"" coil is a ""positive differential""coil, which means it turns on for one scan only every "
"time the logic preceding it is true."
""
"The net effect of this is it pulses 10 times a second (1 PLC scan each time it turns on). "
"This used to increment the counter preset at a medium fast rate"
""
"Hint: In my definition of the ""PD"" coil I like to use the ""OS"" in the last line all by itself to "
"alert me that it is a ""one shot"" coil "
#END
STR SP5
PD C0

// Rung 9
// Address 85
#BEGIN COMMENT
"When the display counter accumulator equalls 2 it changes the LCD display to ""units to "
"run"" the intent of this was to limit how many pieces the machine manufactured. "
""
"As before there is the rising edge transitional contact to increase the value one count at a "
"time. "
""
"Also this is where the ""PD"" coil comes into play it increments the count at 10 times a "
"second when the medium speed timer times out."
""
"The last branch in the rung uses the same timer (it's still counting up) and by comparing "
"the timer accumulator to the value of ""50"" (5 seconds) when it's over the 5 second time "
"the incrementing of the product counter preset increments every PLC scan "
#END
STRE CTA0 K2
LCD K1 """units to run"""
LCD K2 """Number "" V402:B"
STRPD X107
STR X107
AND C0
ANDN TA0 K50
ORSTR
STR X107
AND TA0 K50
ORSTR
ANDSTR
ANDN V402 K9999
INC V402

// Rung 10
// Address 121
STR X106
TMR T1 K5

// Rung 11
// Address 125
STRE CTA0 K2
STRPD X106
STR X106
AND C0
ANDN TA1 K50
ORSTR
STR X106
AND TA1 K50
ORSTR
ANDSTR
AND V402 K1
DEC V402

// Rung 12
// Address 142
STRE CTA0 K3
LCD K1 """Seal timer"""
LCD K2 """Time .1 sec "" V403:B"
ANDPD X107
ANDN V403 K500
INC V403

// Rung 13
// Address 170
STRE CTA0 K3
ANDPD X106
AND V403 K1
DEC V403

// Rung 14
// Address 177
END

// Rung 15
// Address 178
NOP


#BEGIN ELEMENT_DOC
"X0","","","E-Stop #1"
"X1","","","E-Stop #2"
"X2","","","Conveyor VFD Fault"
"X3","","","Product Jam Fault"
"X4","","","Downstream Equipment Stopped"
"X5","","","Low Product Level on Infeed"
"X6","","","Auto Run"
"X7","","","Reset PB"
"X100","Adv display","","display PB (advances display)"
"X106","","","dec"
"X107","","","inc"
"C0","","","                   100 ms               OS"
"C1","","","E-Stop Condition Bit"
"C2","","","Product Jam Condition Bit"
"T0","","","med speed inc"
"T1","","","med speed dec"
"CT0","CT0","","display counter"
"TA0","_ta0","","med speed inc accum"
"TA1","_ta1","","med speed dec accum"
"V400","_v400","","slowdown timer preset"
"V401","_v401","","warmup timer preset"
"V402","_v402","","product counter preset"
"V403","_v403","","seal timer preset"
"CTA0","_CTA0","","display counter accumulator"

#END
Vaughn

jnaarnold

  • Newbie
  • *
  • Posts: 6
Re: Very new here...so bare with me.....
« Reply #9 on: March 02, 2010, 09:25:42 PM »
well, since bernie made me feel like a complete idiot, I decided to spend a few hours studying and reading a bit...well maybe more than just a few hours.. lol. I have my PLC up and running and my lights are all timed. Just trying to figure a few things out like getting the LCD to beep and light when the outputs energize...this is great stuff. Thanks to all who helped.
John

jnaarnold

  • Newbie
  • *
  • Posts: 6
Re: Very new here...so bare with me.....
« Reply #10 on: March 29, 2010, 09:10:17 PM »
Well things have been working very well with my 'automated aquarium'. All lights are programed and even my power heads are timed for a wave making effect. Next will be my automatic top off system, with float sensors. I even have a fan set up to come on when water temp gets too high(blows across the top of the water). Thanks for all the help...this really wasn't as hard as I thought it would be.
John

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Very new here...so bare with me.....
« Reply #11 on: March 29, 2010, 10:28:01 PM »
You are now officially hooked. Though it may not be as bad to just be doing this as a hobby. Imagine sitting all day seeing everything around you as something to be controlled by a PLC and getting paid to do that.

As the motto of my website - "Controlling your world one contact at a time."
An output is a PLC's way of getting its inputs to change.

rubberboy

  • Newbie
  • *
  • Posts: 9
Re: Very new here...so bare with me.....
« Reply #12 on: March 30, 2010, 12:05:43 PM »
Be careful with the float sensor, my friend had his output stick on him and it flooded his basement...

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3594
  • Darth Ladder
Re: Very new here...so bare with me.....
« Reply #13 on: March 30, 2010, 12:32:17 PM »
Maybe have a time limit that the valve can only come on for 30 seconds per day or something.  Observe how much makeup is typically needed and hard code a limit of no more than say twice that amount.  Or put the aquarium in a shallow pan and put a water sensor in the outer pan behind the aquarium (for looks) if the outer pan ever sees water, lock out the valve.

Unless you mean the PLC output itself was actually sticking (this can happen too if the output is a poor match for the load it's driving).  Interpose a pilot relay with a much smaller draw than the load (valve) and/or snub the valve.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.