AutomationDirect DL-06 HSIO Mode 30

rpoet

Member
Join Date
Jun 2008
Location
New York, NY
Posts
536
Hi All,

I've also posted this at the AutomationDirect forum. I'm casting for as wide an audience as possible.

I am attempting to operate a stepper motor using the DL-06's built-in "motion controller" feature. I am attempting to use the "Automatic Trapezoidal Profile Without Ending Velocity" and I'm having three maddening problems. For reference, I've been referencing the DL-06 manual, Appendix E: HSIO Features.

Problem the First:
I can't for the life of me figure out how to enter a "number of pulses" greater than 9999, even though I'm using a Load Double command. If I LDD anything bigger into V3631/V3632, I get either strange behavior, or nothing. This number format thing in the AD PLCs is getting me I think, but I have no idea where to go from here. I kind of understand that it's looking for a HEX number, but isn't that the same as a BCD number? How do I convert, if I have to? The manual is not clear as to what format is needed.

Problem the Second:
I want to be able to change the Target Velocity from my HMI which are bits 0-11 of V3630, but I don't to change bits 12-15, which are configured as "Hex C" I'm not really sure what I need to do here; would it have been so hard for "Profile Type" and "Target Velocity" to be two SEPARATE Vmem locations? I need some guidance as to how to keep my setting of "Automatic Trapezoidal Profile Without Ending Velocity, relative w/o interrupt" but be able to change my target velocity from my HMI. I think I need to manipulate individual bits, but I'm not really sure how to do this.

Problem the Third:
This may be related to Problem the First. How do I get the motor to turn the other direction? I've made it turn the other way by accident by entering large numbers into V3631/3632, but it's not repeatable and I'm very confused. The manual (not very clear) states that the PLC will figure out the direction automatically based on the value placed in the Target Position (Vmem 3631/3632).

Is there a way around this, and do I need a way around this? What I want is the motor to spin a "Desired Number of Rotations (a value from my HMI) and stop at an absolute degree mark, as measured by an absolute encoder. I want the operator to pick the direction of rotation.

Example:
Assume 2,000 pulses for one full revolution of the stepper motor.

Shaft is at 0deg, as measured by the absolute encoder.
I want to rotate (3) full revolutions, and stop at 90deg.

If I want to rotate Clockwise, I need to rotate 6,000 + 500 = 6,500 pulses.

If I want to rotate CCW, I need 6,000 + 1500 = 7,500 pulses.



The above math is boggling me a little, and the idiosyncrasies of the motion controller are not helping. I'm not sure how to attack the math without knowing exactly how the PLC is thinking.

An I-Box that handles all this motion controller setup stuff would sure be nice, but I'm guessing it's probably not likely, as most people probably don't often use the AD PLCs for stepper motors.

I'd be grateful for any light anyone can shed on this. I'll keep plugging away, and I'll call Tech Support on Monday for guidance as well. Please ask me if I haven't been clear on what I'm asking. I'll try to answer any questions.


Thanks!

rpoet
 
I'm not familiar with the HSIO feature, but comment or two about number formats.
Hex is a representative of binary numbers. BCD breaks the word into 4bit sections, each of which is a place holder for a decimal number.
400Hex = 0000 0100 0000 0000 = 1024decimal
400BCD = (0)x thousand + (4)x hundred + (0)x ten + (0) x one = 400Decimal

In the directsoft programming interface, you looking at Vmem in Hex and BCD is the same selection because the format is the same,
i.e. 4bits = 1 BCD digit OR 4 bits = 1 hex digit.
How those digits are interpetted depends on the function in the Automation Direct PLC.
For some functions, the Automation Direct uses the most significant bit as a sign bit. If you are putting large numbers you may be settingthe sign bit.

If you are using a HMI, make sure the number format of the HMI object matches the format of the function you are using in the PLC program.
 
tracer,
My plan is not to enter a negative number per-say. My plan is to have the ability for an operator to enter #of rotations, direction (cw or ccw), and the ending degree measurement 0-359 on the HMI. The PLC will then do the math to rotate to the appropriate position.

For instance, the shaft is at 90deg. I want to rotate 3 revolutions clockwise and stop at 180 deg. Assuming 2000 pulses per revolution, that would be 6000 pulses + 500 pulses.

If I want to make that same move running counterclockwise, it would be 6000 pulses plus 1500 pulses.

I've got CC/CCW figured out, but the other, conditional math is still vexing me. I can get rotations, but the stopping points don't quite work yet.

Thanks,

-rpoet
 
RP: I was curious if entering a neg # would rev the direction.
I work with some servos & if you want them to rotate ccw you have to tell it to move increment -x pulses if you want it to move cw you have to tell it to increment x pulse's (relative moves) (absolute moves, you just tell it the number where you want it to go to.)
 
Good Morning, <br><br>I maybe a few months late but someone in the future may need it. I originally wrote a program for the 205 CTRINT using a trapezoid profile, I believe the principles are the same  DL-06 also. The following may clear up some of your questions. Also I need two decimal places. When using a LDD you load that vmemory location and the next. The 9999 was not a problem for me but it can be extended.<br><br>Description<br><br>The Step Trapezoidal Profile allows for the start and finish of high inertia loads or where a slow start or finish is required. This program uses (4) steps to reach running speed and 5 steps to slow to a stop. The steps speed and distance can be entered by a K (constant) or by VMemory. <br><br>There is also a subroutine for homing. When the home position is pressed the motor turns CCW, there are two sensors one for almost home used to slow movement to avoid over shoot and the next sensor is the actual home position. When home position is reached the motor stops and zero is written to CTA174 and CTA175.<br>  <br>This program assumes that the stepper is setup so that 2000 pulses equal one complete rotation of the shaft and that one full rotation equals one inch of movement. Also the value in inches is to two decimal places, so the maximum travel for this program is 99.99 inches of movement. The mode of operation is Absolute, if a position is entered that is greater then the value in CTA174 and CTA175 then rotation is in the CW direction to that specific position. If the position entered is lees then the value in CTA174 & CTA175 then rotation will be CCW to that specific position. Incremental can also be used so that the motor turns in either CW or CCW rotation a predetermined number of pulses only. <br><br>NOTE: <br>            Bits 0 thru 11 are used to control the speed of the stepper motor.<br>             A value of K4120 equals: Absolute mode and 120pps.<br>             A value of KC120 equals: Incremental mode and 120pps.<br><br>NOTE: A speed of 500pps is the limit.<br><br>Absolute Mode<br>Use V3630 (bit #15 set to 0) to set absolute mode. In absolute when the target value is reached the target value must be changed to either higher or lower in order to start again.<br><br>Incremental Mode<br>Use V3630 (bit #15 SET TO 1) to set incremental mode. In incremental the actual pulse count is incremented to the target pulse. If CCW rotation is desired then add 80000000 to your value.<br><br>Incremental Mode CW<br>Example: If location is at 1 inch and a move 1 more inch is desired then<br>2000 + 2000 = 4000 pulses.<br>Then Load K2000<br><br>Incremental Mode CCW<br>Example: If present location is 10 inches and a move back to the 9 inch mark is desired then.<br>80000000 + 2000 = 80002000<br>Then Load K80002000<br><br>Absolute Mode<br>Use V3630 (bit #15 set to 0) to set absolute mode. In absolute when the target value is reached the target value must be changed to either higer or lower in order to start again.<br><br>Incremental Mode<br>Use V3630 (bit #15 SET TO 1) to set incremental mode. In incremental the actual pulse count is incremented to the target. <br>Example: 2000 + 2000 = 4000<br><br><br>The actual pulse count is always being counted and stored in V1175/V1174. This is<br>the running total of the module output pulses. The count values increment in<br>V1175/V1174 for clockwise output pulses and decrement for counter–clockwise<br>output pulses. The target pulse is loaded into V3631 & V3632.<br><br><br><br>Wow this was long glad I take good notes.<br><br>Tom<br>
 
🙃
This is what it should of looked like.
Sorry

I maybe a few months late but someone in the future may need it. I originally wrote a program for the 205 CTRINT using a trapezoid profile, I believe the principles are the same DL-06 also. The following may clear up some of your questions. Also I need two decimal places. When using a LDD you load that vmemory location and the next.

Description

The Step Trapezoidal Profile allows for the start and finish of high inertia loads or where a slow start or finish is required. This program uses (4) steps to reach running speed and 5 steps to slow to a stop. The steps speed and distance can be entered by a K (constant) or by VMemory.

There is also a subroutine for homing. When the home position is pressed the motor turns CCW, there are two sensors one for almost home used to slow movement to avoid over shoot and the next sensor is the actual home position. When home position is reached the motor stops and zero is written to CTA174 and CTA175.

This program assumes that the stepper is setup so that 2000 pulses equal one complete rotation of the shaft and that one full rotation equals one inch of movement. Also the value in inches is to two decimal places, so the maximum travel for this program is 99.99 inches of movement. The mode of operation is Absolute, if a position is entered that is greater then the value in CTA174 and CTA175 then rotation is in the CW direction to that specific position. If the position entered is lees then the value in CTA174 & CTA175 then rotation will be CCW to that specific position. Incremental can also be used so that the motor turns in either CW or CCW rotation a predetermined number of pulses only.

NOTE:
Bits 0 thru 11 are used to control the speed of the stepper motor.
A value of K4120 equals: Absolute mode and 120pps.
A value of KC120 equals: Incremental mode and 120pps.

NOTE: A speed of 500pps is the limit.

Absolute Mode
Use V3630 (bit #15 set to 0) to set absolute mode. In absolute when the target value is reached the target value must be changed to either higher or lower in order to start again.

Incremental Mode
Use V3630 (bit #15 SET TO 1) to set incremental mode. In incremental the actual pulse count is incremented to the target pulse. If CCW rotation is desired then add 80000000 to your value.

Incremental Mode CW
Example: If location is at 1 inch and a move 1 more inch is desired then
2000 + 2000 = 4000 pulses.
Then Load K2000

Incremental Mode CCW
Example: If present location is 10 inches and a move back to the 9 inch mark is desired then.
80000000 + 2000 = 80002000
Then Load K80002000

Absolute Mode
Use V3630 (bit #15 set to 0) to set absolute mode. In absolute when the target value is reached the target value must be changed to either higer or lower in order to start again.

Incremental Mode
Use V3630 (bit #15 SET TO 1) to set incremental mode. In incremental the actual pulse count is incremented to the target.
Example: 2000 + 2000 = 4000


The actual pulse count is always being counted and stored in V1175/V1174. This is
the running total of the module output pulses. The count values increment in
V1175/V1174 for clockwise output pulses and decrement for counter–clockwise
output pulses. The target pulse is loaded into V3631 & V3632.



Wow this was long glad I take good notes.

Tom
 

Similar Topics

Hey all! Long time reader, first time poster! I have an EA9-T7CL and an MicroLogix 1200 connected via DF1. I'm all good and got everything mostly...
Replies
3
Views
649
Hi, For a very long time, I have been using Allen-Bradley CompactLogix or ControlLogix PLC's for more complex applications with bigger budgets...
Replies
9
Views
2,250
I have a piece of equipment I need to troubleshoot. It has an AutomationDirect 05 processor. When I first tried to connect found processor was...
Replies
4
Views
2,121
I have written one program with FDB. Thought I could therefor write code for an automation direct DL-06. Huge learning curve. I believe I have...
Replies
3
Views
1,760
I think this is great news! After many years waiting for it, I'm happy we have User Defined Structures for the Productivity PLCs. For those not...
Replies
18
Views
6,776
Back
Top Bottom