AD DL06 programming help

ThermoT

Member
Join Date
May 2006
Location
central MN
Posts
22
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! :)
 
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! :p
 
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.
 
Last edited:
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! :confused: 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. ;)
 
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!
:site:

Mike
 
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?
 
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)
 
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)

 
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.
 
Well I hope that made sense, (I didn't realize it was so large)! :eek:

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/static/manuals/hxctriom/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

:site:
 
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.
 
Cliff notes version:

How about this:

1. Operator inserts part:sleep:
2. Operator presses button:handball:
a. machine does not worko_O
3. Operator beats machine with hammer:smas:
4 Plant manager walks by and sees Operator with Hammer:mad:
5. Plant manager takes hammer away from operator and proceeds to beats Maintenance supervisor with hammer. ;)
6 problem solved(y)
 
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.
 

Similar Topics

Hi, Mostly AB guy here with a little Koyo experience, but all of its digital. I get handed three analog I/O cards and asked to prove that they...
Replies
6
Views
478
Hey everyone, Working on a system with a Koyo DL06 processor and it's my first experience with them. I have DirectSoft 6 and we got the program...
Replies
5
Views
2,258
Hi, I am a complete newbie when it comes to PLC programming and would love some help. I am trying to configure a machine consisting of a DL-06 plc...
Replies
2
Views
1,651
Hi all, I am making a test rig to be able to wire in any DL06 (or DL05) And create a HMI in red lions crimson 3.1 to test all the inputs and...
Replies
4
Views
913
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,084
Back
Top Bottom