You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old May 24th, 2006, 09:27 AM   #1
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Question AD DL06 programming help

Hi Everyone;
ElevMike told me to look here for help with this issue that I posted on the AD forum:
I am trying to feed a length of product through a punch which cuts it to length. I have a DO-06-DD1-D PLC with a H0-CTRIO controlling a STP-DRV-4035 stepper drive, STP-MTR-34066 motor, & TRD-GK360-RZD quad encoder. The stepper turns a roller and the encoder. There are sensors on the infeed and outfeed of the punch. I can get the PLC to eject the material if it's in the machine at startup, and I can get it to feed and trim cut the material. But I can't seem to get it to feed the material to length. I am wondering what would be the best mode to do this: dynamic positioning, or run to position? The cut length varies and I'll be inputting the length in ASCII from a PC which is hooked into port #2. I am not working, on that part yet, I'm just trying to get the piece to feed to a preset length. I have DS5 software.
ElevMike said that there was an example here that would help me, he said to search under "learning by doing" but i can't seem to find it.
Any help would be appreciated. I'm not looking for someone to write my code, just a push in the right direction. I'm starting to push up against a deadline on this project and would like to get it done.
Thanks!
  Reply With Quote
Old May 24th, 2006, 09:49 AM   #2
Thomas Sullens
Member
United States

Thomas Sullens is offline
 
Join Date: Feb 2004
Location: Idabel, Ok
Posts: 390
This may be what Mike was refering to http://www.plctalk.net/qanda/showthread.php?t=11015
  Reply With Quote
Old May 24th, 2006, 10:02 AM   #3
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Thanks!

That looks like it! I really appreciate the help. I'll get back with any other questions I have and also post the code when I get it done for everyone's review.
Thanks, ElevMike for showing me to this site!
  Reply With Quote
Old May 25th, 2006, 07:04 AM   #4
elevmike
Member
United States

elevmike is offline
 
elevmike's Avatar
 
Join Date: Feb 2004
Location: Detroit, MI
Posts: 4,012
Your welcome and welcome to the forum. Be sure to read the entire thread before applying it to your application, as it takes a few twists and turns. Also note that Paula did not use a stepper and still was able to produce the accruacy necessary for her application.

Note: The key to the sucess of the "Learning by Doing" thread was the well orginized detail Paula provided in her posts.
__________________
If you think you can do a thing or think you can't do a thing, you're probably right.... Henry Ford

Last edited by elevmike; May 25th, 2006 at 07:08 AM.
  Reply With Quote
Old May 25th, 2006, 07:15 AM   #5
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Thanks again for the info, I'm about 1/3 of the way through it. I'm glad that my employer is really understanding about things. I went to tech school for automated systems back in the late 80's and worked in the field for a few years after that,then I branched out into other areas and only dealt with PLC's as a hardware issue for the past 12-13 years. Things sure have changed from those old days! I'm picking it up again, though.
I have most of my code hashed out, i just need to get it to feed to the length and DL the ASCII from the PC. Once I get these ares figured out, I'll drop the code on here to let you all critique it.
  Reply With Quote
Old May 30th, 2006, 12:52 PM   #6
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Well, I read through all 849 posts in that thread. It was very informative and helped me to pick up a few ideas. However, it does not answer my current question. With my stepper/encoder application, which mode would be the best fit: dynamic positioning, or run to position?
The PLC needs to be able to D/L a numeric value in ASCII from a PC and feed the part to the proper length. The ASCII consist of 5 digits (inches plus 3 decimal places) The cut length can vary by 32nds from 12" to 84" The accuracy needs to be + or - 1/64".
Also, would anyone recommend using the scaling feature provided with the CTRIO workbench software? or should I do all of the conversion in the program?
As I mentioned before, I have most of the program fleshed out, the only issues I have left is the ASCII D/L and run the production length.
I'll post the theory of operation in this afternoon after I make a few minor changes to it.
Once again I would like to thank everyone for reading this and any help or advice you all may have. Please let me know if you need any more information.

Thanks!


Mike
  Reply With Quote
Old May 30th, 2006, 01:55 PM   #7
elevmike
Member
United States

elevmike is offline
 
elevmike's Avatar
 
Join Date: Feb 2004
Location: Detroit, MI
Posts: 4,012
I'm not sure just what you mean by "dynamic positioning or run to position"? Everybody seems to have their one set of definitions; what's yours? I assume that your going to stop to cut?? (aka not a flying shear?). Do you want to track how much stock you've used?

Ok so considering the required accuracy, I'd be inclined to start at zero run to length-slowdown, stop on position, auto jog(allow for both directions), cut, ADDD current count to acumulated length used, reset to zero and go at it again. Resetting your cut lenth to zero will reduce the problem with an accumulated error due to slip. It would also be a little easer to program since your ramps could then be fixed values in reference to the length.

Maybe you can post the program?
__________________
If you think you can do a thing or think you can't do a thing, you're probably right.... Henry Ford
  Reply With Quote
Old May 30th, 2006, 02:29 PM   #8
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Theory of operation (part I)

Here is the theory of operation as I have planned it. this is long so I'll need to do 2 posts. Please let me know if it doesn't make sense:
  • Insert power plug into receptacle. (110 VAC)
a. Connect shop air. (90-100 PSI)


  • Turn disconnect switch on:
a. Power is sent to power supply PWR2.

b. PLC boots & enters RUN mode, if selected.

c. Sensors activate.

d. PLC activates output Y1:

i. RED light on the front of enclosure #1 is illuminated steadily.


  • Press the black button labeled START:
a. Contactor CAV1 is activated.

b. Power is sent to power supply PWR1.

c. Servo drive is activated.

d. Aux contactor X0 closes:

i. Input XO on the PLC sinks.

ii. PLC pauses for 2 seconds

iii. If any of the infeed (X4-X7, or X10-X13) or outfeed sensors are activated, the PLC will run the material eject subroutine (see below).

iv. PLC deactivates output Y1:

D. RED light on the front of enclosure #1 turns off.

v. PLC activates output Y0

D. GREEN light on the front of enclosure #1 is illuminated steadily.

vi. PLC is now waiting for input.

e. The PLC will reset the stored cut length value to zero.
  • Insert a part into any infeed slot:
a. The infeed sensor (1-4) for the corresponding feed slot (1-4) will activate.

b. The PLC input (X4-X7) for the appropriate infeed sensor (1-4) will sink.

c. A part can be inserted into the other related slot (1& 4 or 2&3):

i. The related infeed sensor for that slot will activate (1-4)

ii. The PLC input (X4-X7) for that infeed sensor (1-4) will sink.

d. If a part is inserted in a non-corresponding slot, the PLC will hold until the part is removed.


  • Press the green button labeled FEED ADVANCE:
a. Input X1 on the PLC sinks.

b. The PLC will activate the load material subroutine:

i. The PLC commands the servo drive to move counterclockwise at low speed.

ii. The drive will move counterclockwise until the part(s) reach the corresponding outfeed sensor(s) (5-8):

iii. The PLC input(s) (X10-X13) for the appropriate outfeed sensor(s) (5-8) will sink.

iv. If any of the appropriate outfeed sensors do not activate at the proper time, the PLC will activate the parts jammed/error subroutine (see below).


  • The PLC program will then run the trim cut subroutine:
a. The PLC will zero the encoder pulses at this time.

b. The PLC will activate output Y4.

i. The solenoid valve will fire, and the parts will be cut.

c. The trim cuts can then be removed and discarded.

i. The appropriate outfeed sensors will deactivate when the trim pieces are removed, and the PLC will set to the production subroutine.

D. If the PLC does not sense that the trim pieces are removed (appropriate outfeed sensors deactivating), it will hold until the trim pieces are removed

ii. The PLC will reset the length remaining value to its preset value.

( see part II)
  Reply With Quote
Old May 30th, 2006, 02:34 PM   #9
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
THeory of operation (part 2)

    • Press the green button labeled FEED ADVANCE to enable the production routine:
  • a. Input X1 on the PLC sinks.

    b. If the PLC does not have a cut length value stored, the PLC will hold until it receives the first cut length from the PC:

    c. The PLC will store that value in its internal memory:

    i. The PLC will hold that value until the cut is completed and the green FEED ADVANCE button is pressed

    d. The PLC will compare the cut length value to the length remaining value:

    i. If the cut length value is equal to (=) or less than (<) the length remaining value, the PLC will proceed with the production subroutine.

    ii. If the cut length value is greater than (>) the length remaining value, the PLC will go to the inadequate length routine (see below).

    e. The PLC will reset the encoder count to zero (0)

    f. The PLC program will convert the stored cut length value to pulses.

    g. The PLC will command the servo drive to move at low speed counterclockwise until the appropriate outfeed sensors are activated:

    i. If any of the appropriate outfeed sensors do not activate at the proper time, the PLC will activate the parts jammed/error subroutine (see below).

    ii. If the PLC loses any of the activated infeed sensors, the PLC will activate the parts jammed/error subroutine (see below).

    h. The PLC will then command the servo drive to move at full speed counterclockwise to the length as determined in step (7b).

    i. The drive will move counterclockwise the appropriate number of pulses, and then stop

    ii. If the PLC loses any of the activated infeed or outfeed sensors, the PLC will activate the parts jammed/error subroutine (see below).

    i. The PLC will verify the movement via the encoder.

    j. If the movement is not correct, the PLC will activate the parts jammed/error subroutine (see below).

    k. If movement is correct, the PLC will activate output Y4.

    i. The Solenoid valve will fire, and the parts will be cut.

    l. The cut parts can then be removed and stored in the appropriate bin.

    i. If the PLC does not sense that the cut pieces are removed (appropriate outfeed sensors deactivating), it will hold until the cut pieces are removed

    ii. The appropriate outfeed sensors will deactivate, and the PLC will reset the production sub routine.

    iii. The PLC will subtract the current cut length value from the length remaining value.

    iv. The PLC will clear the cut length value from its internal memory.

    v. The PLC will store the difference of operation iii as the length remaining value.


    • Press the green button labeled FEED ADVANCE again, and the production subroutine will be repeated.

    • Press the white button labeled RESET at any time to reset to the original startup routine

    • Press & hold the green button labeled FEED ADVANCE for three seconds, and the PLC will run the material eject subroutine (see below).
    (see part 3)

  Reply With Quote
Old May 30th, 2006, 02:34 PM   #10
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Theory f Operation (part III)

  • Press the red button labeled STOP or the large red button labeled EMERGENCY STOP to immediately stop the machine:
a. Power to the coil of contact CAV1 will be interrupted:

i. Contact CAV1opens:

ii. Power is disconnected to power supply PWR1.

iii. The servo drive deactivates.

b. Aux contactor X0 opens:

i. PLC will halt any currently active stages and movement of the servo drive

ii. Input XO on the PLC opens.

iii. GREEN light on the front of enclosure #1 turns off.

iv. RED light on the front of enclosure #1 is illuminated steadily.

c. PLC saves the current cut length value.

i. The PLC will continue to save the cut length value until the production subroutine is completed successfully.

d. PLC saves the current length remaining value.

i. The PLC will continue to save the length remaining value unless the PLC receives any encoder pulses or any of the infeed or outfeed sensors change states.


  • Parts Jammed/Error Subroutine:
a. PLC will halt any movement of the servo drive.

b. PLC saves the current cut length value.

i. The PLC will continue to save the cut length value until the production subroutine is completed successfully.

c. PLC saves the current length remaining value.

i. The PLC will continue to save the length remaining value unless the PLC receives any encoder pulses or any of the infeed or outfeed sensors change states.

d. PLC activates output Y1 in conjunction with a 1 second timer:

i. RED light on the front of enclosure #1 is blinking.

e. PLC waits for input:

i. Press & hold the green button labeled FEED ADVANCE for three seconds, and the PLC will run the material eject subroutine (see below).

ii. Press the white button labeled RESET to reset to the original startup state.


  • Press & hold the green button labeled FEED ADVANCE for three seconds to enable the material eject subroutine:
a. PLC saves the current cut length value.

b. PLC commands the servo drive to move counterclockwise until the appropriate both the infeed and outfeed feed sensors deactivate

c. PLC then resets to the original startup state.
  Reply With Quote
Old May 30th, 2006, 02:55 PM   #11
Tark
Member
United States

Tark is offline
 
Tark's Avatar
 
Join Date: Apr 2004
Posts: 503
Do you have a Cliffs Notes version?
  Reply With Quote
Old May 30th, 2006, 03:04 PM   #12
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Well I hope that made sense, (I didn't realize it was so large)!

Elevmike; "I'm not sure just what you mean by "dynamic positioning or run to position"? Everybody seems to have their one set of definitions; what's yours?"
My definitions are taken from the AD manual for the HO-CTRIO
card. here is the link to the manual:

http://web3.automationdirect.com/sta.../hxctriom.html


The description for dynamic positioning is located on page 6-35, and the description for run-to-position is located on page 6-45.

Elevemike; "I assume that your going to stop to cut?? (aka not a flying shear?). Do you want to track how much stock you've used?
That is correct. The part must be stopped to cut. I would like to track the total. I think that I have the latter figured out.

Elevmike; "Maybe you can post the program?"
I will, as soon as I add some more descritions to it, hopefully tomorrow if nothing else breaks in the plant!

Thanks again for the prompt reply, and all the help. 3

  Reply With Quote
Old May 30th, 2006, 03:09 PM   #13
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
I'll try to condense it down a bit. I apologize about the length. When I do a T.O.O. I try to make it as detailed as possible. sometimes my projects get put on hold for several days to weeks and I like to have something to refer back to when I try to get going on them again.
  Reply With Quote
Old May 30th, 2006, 03:27 PM   #14
ThermoT
Member
United States

ThermoT is offline
 
Join Date: May 2006
Location: central MN
Posts: 22
Cliff notes version:

How about this:

1. Operator inserts part
2. Operator presses button
a. machine does not work
3. Operator beats machine with hammer
4 Plant manager walks by and sees Operator with Hammer
5. Plant manager takes hammer away from operator and proceeds to beats Maintenance supervisor with hammer.
6 problem solved
  Reply With Quote
Old May 30th, 2006, 04:22 PM   #15
elevmike
Member
United States

elevmike is offline
 
elevmike's Avatar
 
Join Date: Feb 2004
Location: Detroit, MI
Posts: 4,012
What's the material to be cut like, (physical properties)?

Ok so this is the issue I see. You can never overcome mechanical issues with programming, (not usually anyway). This seems to be a traction machine, and ALL traction devices encounter some slip. So in the case of a traction driven motion system, you cant really count on using the pulse output to the drive to give you the actual position of the wire. In short, you need a feedback device to provide true positioning. So you are going to run to position, but your positions should be a feed back from an encoder on an idler following the wire (never on the drive roller).

I dont use the CTRIO workbench for setting up my CPUs. The setup is in my standard program codes, so I dont have to mess with it when making multiple panels.
__________________
If you think you can do a thing or think you can't do a thing, you're probably right.... Henry Ford
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
AD stage programming Rod LIVE PLC Questions And Answers 19 January 31st, 2013 03:56 PM
Ad Dl06 geniusintraining LIVE PLC Questions And Answers 4 May 4th, 2006 02:51 PM
AD Stage Programming TimothyMoulder LIVE PLC Questions And Answers 6 April 7th, 2006 03:47 PM
AD DL06 port 1 parity setting elevmike LIVE PLC Questions And Answers 26 February 1st, 2005 02:06 PM
AD DL06 ASCII out help! John Deitz LIVE PLC Questions And Answers 7 August 20th, 2003 04:43 PM


All times are GMT -5. The time now is 04:30 AM.


.