News:

  • June 08, 2026, 07:53:00 PM

Login with username, password and session length

Author Topic: Absolute positioning using H0-CTRIO and D0-06DD2 (DL06) without an encoder  (Read 15056 times)

JoeW

  • Jr. Member
  • **
  • Posts: 12
I have a fairly basic 2-axis, open-loop, Stepper setup I am having some difficulty setting up. I'm not new to PLC programming however, I am new to the specific setup that I'm using.

I have an automationdirect D0-06DD2 PLC programmed via the latest available Directsoft 5 programming software. The only add-in card I have is an H0-CTRIO high speed counter card installed in slot 2. This has been configured via workbench with limits attached to input ch1 C and D. the counter inputs have nothing attached as there is no encoder in the package. (open-loop).  This currently functions as Dynamic velocity mode but not as needed.

For motors I have 1 x Stepper motor connected to the base units high speed output which runs well as expected. Speed is not an issue and absolute positioning (commanded) is under control as expected.  I have this configured basically as Appendix E shows for Mode 30(auto trapezoid). I'm commanding target position via V3631 and I'm pulling my current position (commanded) via V1174(CT174).

The second motor is attached to the H0-CTRIO because I need the extra speed that the base unit cannot provide yet I'm looking for similar control over absolute commanded position similar to the Rotary attached to the base unit. The memory addresses are configured using the basic example of V2000 and V2030 respectively. Is there a way that I've overlooked to command the stepper attached to the CTRIO in a similar fashion as the base unit without using WT and RD?

The ability to move an axis to a theoretical absolute position with the direction bit handled would be really helpful in this project.  I've spent countless hours reading the manuals and scanning the message boards on this with no solution.  Is there one anybody could point me towards?

Thanks,
Joe...

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Hi JoeW,

Sounds like you need to configure your H0-CTRIO for Dynamic Positioning. Here's what you need to do assuming your mapping as you stated:
1. Use CTRIO Workbench and configure a Dynamic Position pulse profile for your H0-CTRIO, setting the min/max frequencies and accel/decel rate.
2. To use this from your ladder logic, first make sure you program a CTRIO (IB-1000) IBox instruction at the top of your ladder that points to your H0-CTRIO in slot 2. This needs to be the first rung in your program and requires no contact on the input leg.
3. To execute the dynamic position, execute a CTRLDPR "CTRIO Load Profile" (IB-1001) IBox instruction that points to your dynamic positioning profile file number that you created in Step #1 above.
4. If the CTRLDPR completes with success (Succes bit ON) then you can enable the output (bit V2056.0).
5. When the CTRIO indicates the output has been enabled (bit V2022.0) then you can write your target position parameter (a double-word: V2030-2031).

NOTE: The direction (clockwise or counter-clockwise) is inferred from the difference between the target position you wrote and the CTRIO's current position, that is, if your target position is greater than the current position, pulses for a clockwise move are emitted; if your target position is less than the current position, pulses for a counter-clockwise move are emitted. When you first load the dynamic position profile with the CTRLDPR IBox the CTRIO's current position is assumed to be zero.

6. Once you have written the target position, to actually make the move happen, you must then set the Goto Position bit (bit V2056.1).
7. The CTRIO will, in turn, set the Position Loaded bit (bit V2022.1) to tell you it heard your command and is executing. When you see this bit is ON you can then reset the Goto Position bit (V2056.1) in prep for a possible next position you desire.
8. The CTRIO will accel toward max freq and then decel to the position you told it.
9. At this point, if you want to do another position simply repeat steps 5-8 above (i.e. there is no need to re-execute the CTRLDPR again).

When you're done, simply turn OFF the enable output (bit V2056.0).

Hope this helps!  :)
There are two types of people in the world; those that can extrapolate from incomplete data sets.

JoeW

  • Jr. Member
  • **
  • Posts: 12
Greg,

Awesome write-up on this however, not quite where I need to be in the end.

I have the load profile feature working quite well and plan to use these for some index moves during the part cycle.  The problem comes in with needing to know where I am relative to the home position.  Using the profiles essentially runs beautifully in relative mode, I'm in need of absolute position.

I've seen how this can be accomplished via an encoder unfortunately this is not an option on this setup. I've read about plugging the pulse and direction lines back into the input then performing math with a few stability errors, this would not be my first choice due to stability issues.

Simplified, this process runs CW until the home is reached(profile file #1). at this point home should be set. from here the drive needs to move a fixed distance in high speed(Profile File #2) then move in the same direction in low speed until a position sensor is reached(Profile File #3). from this point I can determine many details about the state of the parts loaded simply if I knew my position. This would be simple to hard code the distances except for the users ability to jog after profile #3.

Is there a memory position counter that does not reset during a dynamic move?


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Greg can elaborate, but DYNAPOS may get you where you need to be.

Do-more with CTRIO2 is a slam dunk for this, but unfortunately it will be considerably more complicated in DL06 with the H0-CTRIO.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO