Sign in to follow this  
Followers 0
TBone6606

DL06 Newbie

10 posts in this topic

As some of you know, I am working on a DL06 for a summer internship. After finally getting all the parts working, I am now working on the ladder logic. How do you turn off an output during a single scan? I've tried the NJMP command, but that's turning it on when I don't want the clamp to be on. Essentially, I am trying to automate a drill press reamer. I have 4 solendoids, three of which are double functions, but they're really old. Bellow-Valvaire to be exact. So....how can i turn off a solenoid before I can turn on the other ones in a single scan? Thanks! TBone6606 Attached is my current ladder logic (no laughing....I'm a newbie!!!) REAL DEAL 1.PRJ

Share this post


Link to post
Share on other sites
I guess my first question is why would you want to turn off something based on a scan. I am pictuing an automated drill press with reaming functions and I cannot think of a way that what you are talking about is neccessary. usually things are more time dependant. Action X causes timer T to run when done Action X ends or Action Y starts. Because the time value is defined you can regulate things better that relying on something scan dependant, scan time can be inconsistent. Anyways, i am guessing. Can you describe your process more?

Share this post


Link to post
Share on other sites
I want to index the part, center the part, clamp the part, ream, unclamp, and load another part. I was toying with the idea of a drum sequencer, but I'm not sure. Any insight you can provide is greatly appreciated! TBone6606

Share this post


Link to post
Share on other sites
I've found the pause function and that is doing the trick. Now my next hurdle is getting the DL06 to repeat all the functions I want it to, including the paused one from the beginning (if that makes any sense.... ) TBone6606

Share this post


Link to post
Share on other sites
I think you are missing an important function of how PLC's operate. PLC's are not like computers in where the program just stops while waiting for the the next event to occur. PLC programs continuously cycle from the top to the bottom. The input portion of the rung is where you use logic to decide on what happens at what time. If you need to wait, you use a timer, counter, or a different input point to do the waiting. Don't use the PAUSE function! You will trip out the watchdog circuit and cause the PLC to fault out. It is only for use in very special circumstances.

Share this post


Link to post
Share on other sites
rlp is right you don't want to pause the program, and you may be on the right track about the drum sequencer. They are perfect for what you are talking about. Sometimes it is a good idea to write out everything you want to happen eg: 1.Start. I want to index the part. 2. part indexed. I want to clamp the part. 3.Part clamped. I want to start the reamer motor. 4. motor running. i want to extend the reamer. and so on till you can break down each step. If you notice, at teh beginning of each step is a criteria that needs to occur before the step may take place. This would fit in the input parameters of the drum sequence step. Sometimes there may be more than one criteria. in that case you can create a logic rung that monitors all the steps in question and turns on a register bit and then use that register bit to turn on that step in the Drum. The nice thing about the drum is it will wait until each step is complete before moving on to the next. you can enter a time constant into one of the intput parameters. Say you wanted to ream for 30 seconds. one step would be, if the reamer is entended hold for 30 seconds. You can wait for an operator input. It is pretty flexible. the biggest thing is to organize your sequence on paper first. Then transferring that into code is a mere matter of translation. Writing unorganized code causes premature balding!

Share this post


Link to post
Share on other sites
Then after you have done the above and before you start writing code fill in the descriptors of your inputs and outputs. You may understand what you did when you wrote the code but six months from now if you need to revisit or make a change you will be glad you did. I have attached a example of how your code might be written in stage logic (RLL) automate reamer stages.zip

Share this post


Link to post
Share on other sites
I made a few mistakes, here is a better version. automate reamer stages_2.zip

Share this post


Link to post
Share on other sites
Milldrone...THANK YOU SO MUCH!!! Your program is a thing of beauty. I tweaked it a little bit to tailor it to my specific needs. I still have a few questions regarding my current program. They're in the comments before rung 1. Any help is truly appreciated!!! TBone6606 Also, I'm having trouble saving my project. It keeps saying that the data documentation could not be written...so I'm losing my labeling. Please ! automate reamer stages 1.PRJ Edited by TBone6606

Share this post


Link to post
Share on other sites
Are you opening the project from the DS launch window? I'm presuming you attached only the .prj file there should also be some other extensions like wsp., SCX. SCD., LDA., LCX., LCD. ect. If that fails, sometimes the project can be salvaged by clicking on file, export, program,. This will make a txt. file that can be opened with notepad and copied as text to email or this forum. Below is the text file I just copied from my revised post, if you copy it save it where you can find it, open a new project in Direct Soft click on file, import find the txt you just saved and direct soft will open it. PLC 06 // Rung 1 // Address 0 #BEGIN COMMENT "This is an example of stage programming. It's mentioned in the second volume of the user " "manual." "" "I have found that once you get used to programming in ""stages"" you will find it hard to " "use PLC's that do not have this feature." "" "After viewing your program I need to chastize you for not naming or describing all your " "elements. What follows is an brief example using descriptions" "" "" #END ISG S0 // Rung 2 // Address 2 STRND S7 OUT C7 // Rung 3 // Address 4 STR X21 STR X0 OR C6 ANDSTR ANDN C7 OUT C6 LCD K1 """SYSTEM RUNNING""" // Rung 4 // Address 20 #BEGIN COMMENT "The first thing I would suggest is swapping the condition of X21 in the field." "" "Note: I changed the state of X21 to the opposite state. It needs to be changed in the field " "from a normally open contact to a normally closed contact. The reason for this is is " "consider what would happen if the contact would not work in the field if the wire was cut, " "the button could be pushed but the PLC would not see any change of state." "" "The second thing to consider is that the E stop circuit should supply the voltage for the " "outputs external to the PLC." "" #END STRN X21 LCD K1 """OPERATOR SAFETY""" LCD K1 """E-STOP""" // Rung 5 // Address 38 STRPD C6 SET S1 // Rung 6 // Address 40 #BEGIN COMMENT "This rung resets all but the main stage." "" "Note: if more stages were added they would need to be added to the reset" #END STRN C6 RST S1 S7 // Rung 7 // Address 43 SG S1 // Rung 8 // Address 45 #BEGIN COMMENT "I'm presuming this output is a ""bistable control valve"" " "" "This means the once the output is energised and the spool shifts, it stays shifted in that " "position until the opposite coil is energised. " #END OUT Y0 // Rung 9 // Address 46 STR X13 JMP S3 // Rung 10 // Address 48 #BEGIN COMMENT "This stage starts the drill motor. In your application you may need to use a timer to wait for " "the motor to come up to speed before we go to the next stage (advance feed)." #END SG S3 // Rung 11 // Address 50 OUT Y2 TMR T2 K10 // Rung 12 // Address 54 STR T2 JMP S4 // Rung 13 // Address 56 #BEGIN COMMENT "This stage continues to run the drill motor and advances the feed, once the prox that " "determines the feed has advanced the full stroke is energised we jump to the next stage. " #END SG S4 // Rung 14 // Address 58 OUT Y2 OUT Y3 // Rung 15 // Address 60 STR X14 JMP S5 // Rung 16 // Address 62 #BEGIN COMMENT "This stage continues to run the drill motor, but the advance feed solenoid is not inside this " "stage so the feed will reverse untill the feed retracted prox is made. Once the feed " "retracted prox is made we go to the next stage." #END SG S5 // Rung 17 // Address 64 OUT Y2 // Rung 18 // Address 65 STR X15 JMP S6 // Rung 19 // Address 67 #BEGIN COMMENT "In this stage we wait for the motor to stop. After the timer has timed out we go to the next " "stage" #END SG S6 // Rung 20 // Address 69 TMR T0 K50 // Rung 21 // Address 72 STR T0 JMP S7 // Rung 22 // Address 74 #BEGIN COMMENT "In this stage we unclamp the part and return to the main after the timer times out" #END SG S7 // Rung 23 // Address 76 OUT Y1 TMR T1 K5 // Rung 24 // Address 80 STR T1 JMP S0 // Rung 25 // Address 82 END // Rung 26 // Address 83 NOP #BEGIN ELEMENT_DOC "X0","","","start process" "X13","","","prox on clamp cylinder ""part clamped""" "X14","","","end of feed prox" "X15","","","feed retracted prox" "X21","",""," E stop" "Y0","","","clamp solenoid I'm presuming this is one is a two coil bistable control valve" "Y1","","","unclamp solenoid I'm presuming this is one is a two coil bistable control valve" "Y2","","","run drill motor" "Y3","","","advance feed solenoid" "C6","","","run process" "C7","","","end of process OS" "S0","_S0","","initial and main stage" "S1","","","clamp" "S3","","","run drill motor" "S4","","","advance feed" "S5","","","retract feed" "S6","","","motor stop time" "S7","","","unclamp" "T0","","","wait for motor to stop" "T1","","","wait for unclamp to function" "T2","","","drill motor accell timer" #END

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0