Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 30 of 38

DL06 Micro PLC User Manual, Volume 2 of 2, pages 290 to 299

Pages 290 to 299 of 370

The original document is the PDF (6.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the AutomationDirect Direct Logic DL06

Page 290

Appendix E: High-speed Input and Pulse Output Features

Wiring Diagram

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

The generalized wiring diagram below shows pulse outputs Y0 and Y1 connected to the drive amplifier inputs of a motion control system. Motor

Amplifier

+24 VDC

Signal Common

Power Input

-

Pulse Direction

+

G LG 0V Y0 Y2 C1 Y5 Y7 Y10 Y12 C3 Y15 Y17 AC(L) AC(N) 24V C0 Y1 Y3 Y4 Y6 C2 Y11 Y13 Y14 Y16 +V OUTPUT: Sinking Output

6 - 27V

1.0A

PWR: 100-240V

50-60Hz 40VA

Interfacing to Drive Inputs

E–40

The pulse signals from Y0 and Y1 outputs will typically go to drive input circuits as shown above. It will be helpful to locate equivalent circuit schematics of the drive amplifier. The following diagram shows how to interface to a sourcing drive input circuit. Y0, Y1 Pulse Output Power +DC Power

Drive Input

Output (sinking)

+

Input (sourcing)

Common

–

Ground

The following circuit shows how to interface to a sinking drive input using a pullup resistor. Please refer to Appendix 2 to learn how to calculate and install R pullup. Y0, Y1 Pulse Output +DC power

Power

R pullup (sinking)

Drive Input

(sourcing) Output +

Input (sinking)

–

Ground

Supply Common

DL06 Micro PLC User Manual, 3rd Edition Rev. A

R Input

Page 291

Appendix E: High-speed Input and Pulse Output Features

Motion Profile Specifications The motion control profiles generated in Pulse Output Mode have the following specifications: Motion Control Profile Specifications Parameter

Specification Automatic Trapezoidal – Accel Slope / Target Velocity / Decel Slope Step Trapezoidal - Step Acceleration / Deceleration Velocity Control – Speed and Direction only –8388608 to 8388607 Absolute / relative command 40 Hz to 10 kHz V3630 to V3652 (Profile Parameter Table) CT174 and CT175 (V1174 and V1175)

Profiles Position Range Positioning Velocity Range V-memory registers Current Position

Physical I/O Configuration The configurable discrete I/O options for Pulse Output Mode are listed in the table below. The CPU uses SP 104 contact to sense “profile complete”. V7632 is used to select pulse/direction or CW/CCW modes for the pulse outputs. Input X1 is dedicated as the external interrupt for use in registration mode. Physical I/O Configuration Input

Configuration Register

–

V7632

X0

V7634

X1

V7635

X2

V7636

X3

V7637

Function

Hex Code Required

Y0 = Pulse Y1 = Direction Y0 = CW Pulse Y1 = CCW Pulse pulse input filtered input pulse input filtered input pulse input filtered input pulse input filtered input

0103 0003 (default) 0005 xx06, xx = filter time, 0-9 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default) 0005 xx06, xx = filter time, 0-99 (BCD) (default)

Logical I/O Functions The following logical I/O references define functions that allow the HSIO to communicate with the ladder program. Logical I/O/ Functions Logical I/O

Function

SP104

Profile Complete – the HSIO turns on SP104 to the CPU when the profile completes. Goes back off when Start Profile (Y0) turns on. External Interrupt - If the interrupt feature is selected for the Automatic Trapezoidal profile or the Step Trapezoidal Profile, the DL06 keeps outputting pulses until X1 turns on. After it is on the unit outputs the pulses that are defined as the Target position Start Profile – the ladder program turns on Y0 to start motion. If turned off before the move completes, motion stops. Turning it on again will start another profile, unless the current position equals the target position. Preload Position Value – if motion is stopped and Start Profile is off, you can load a new value in CT174/CT175, and turn on Y1. At that transition, the value in CT174/CT175 becomes the current position.

X1

Y0 Y1

DL06 Micro PLC User Manual, 3rd Edition Rev. A

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

E–41

Page 292

Appendix E: High-speed Input and Pulse Output Features

Setup for Mode 30

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D E–42

Recall that V7633 is the HSIO Mode Select register. Refer to the diagram below. Use BCD 30 in the lower byte of V7633 to select the High-Speed Counter Mode. Memory Location V7633 Bits

15

14

13

12 11

10

9

8

7

6

5

4

3

2

1

0

0

0

0

0

0

0

0

0

0

1

1

0

0

0

0

0

0

0

3

0

Miscellaneous Setup (BCD)

HSIO Mode Setup (BCD)

00 = Not Used (default) 10 = Battery Enabled 20 = Power-up in RUN 30 = Battery Enabled and Power-up in RUN

30 = Pulse Output

Choose the most convenient method of programming V7633 from the following: • Include load and out instructions in your ladder program • DirectSOFT 5’s memory editor • Use the Handheld Programmer D2–HPP

We recommend using the first method above so that the HSIO setup becomes an integral part of your application program. An example program later in this section shows how to do this. Memory Location V3630 (default) Bits

15

14

13

12

11 10

9

8

7

6

5

4

3

2

1

0

0

0

0

0

0

1

1

0

0

0

0

0

0

0

0

0

1 7

0

0

Profile Select (BCD)

Target Velocity Value

4 to 7, C to F = Automatic Trapezoidal Profile 0, 1, 8, 9 = Step Trapezoidal Profile 2 = Velocity Profile

Range = 0, 4 to 999, representing 40 Hz to 10 kHz pulse rate

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 293

Appendix E: High-speed Input and Pulse Output Features

Profile / Velocity Select Register The first location in the Profile Parameter Table stores two key pieces of information. The upper four bits (12–15) select the type of profile required. The lower 12 bits (0-11) select the Target Velocity. The ladder program must program this location before initiating any of the three profiles. The LD and OUT instruction will write all 16 bits, so be sure to fully specify the full fourdigit BCD value for the Profile / Velocity Select Register each time. The absolute and relative selection determines how the HSIO circuit will interpret your specified target position. Absolute position targets are referenced to zero. Relative position targets are referenced to the current position (previous target position). You may choose whichever reference method is most convenient for your application.

Profile Parameter Table

Profile Table Pointer

V7630 is a pointer location which points to the beginning of the Profile Parameter Table. The default starting location for the profile parameter table is V3630. However, you may change this by programming a different value in V7630. Remember to use the LDA (load address) instruction, converting octal into hex. The HSIO uses the next V-memory register past the bottom of the profile parameter table to indicate profile errors. See the error table at the end of this section for error code definitions.

V7630

V3630 V3631 V3633 V3634 V3635

3630

Profile Parameter Table xxxx xxxx xxxx xxxx xxxx xxxx

Pulse Output Error Code V3636

00xx

Automatic Trapezoidal Profile V-Memory

V3630, bits 12–15

Function

Range w/o interrupt Automatic Trapezoidal Profile 4=absolute 5=absolute with interrupt* without Ending Velocity w/o interrupt (Ending Velocity is fixed to 0.) C=relative D=relative with interrupt*

Automatic Trapezoidal Profile with Ending Velocity (Use V3637 to set up Ending Velocity.) V3630, bits 0–11 Target Velocity V3631 / V3632 Target Position** V3633 Starting Velocity V3634 Acceleration Time V3635 Deceleration Time V3636 Error Code V3637 Ending Velocity

6=absolute w/o interrupt 7=absolute with interrupt* E=relative w/o interrupt F=relative with interrupt* 4 to 999 or 0 to 1000 –8388608 to 8388607 4 to 100 1 to 100 1 to 100 (see end of section) 4 to 100

Units –

– x 10 pps Pulses x 10 pps x 100 mS x 100 mS – x 10 pps

* If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on.

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

**To set a negative number, put 8 in the most significant digit. For example: 8388608 is 88388608 in V3631 and V3632.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

E–43

Page 294

Appendix E: High-speed Input and Pulse Output Features

Step Trapezoidal Profile

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D E–44

V-Memory V3630, bits 12–15 V3630, bits 0–11 V3631 / V3632 V3633 V3634 V3635 V3636 V3637 V3640 V3641 V3642 V3643 V3644 V3645 V3646 V3647 V3650 V3651 V3652

Function

Range

0=absolute w/o interrupt with interrupt* Step Trapezoidal Profile 7=absolute 8=relative w/o interrupt 9=relative with interrupt* 4 to 999 Target Velocity or 0 for 1000 Target Position** –8388608 to 8388607 Step 1 Acceleration 4 to 1000 Step 1 Distance 1 to 9999 Step 2 Acceleration 4 to 1000 Step 2 Distance 1 to 9999 Step 3 Acceleration 4 to 1000 Step 3 Distance 1 to 9999 Step 4 Acceleration 4 to 1000 Step 4 Distance 1 to 9999 Step 5 Deceleration 4 to 1000 Step 5 Distance 1 to 9999 Step 6 Deceleration 4 to 1000 Step 6 Distance 1 to 9999 Step 7 Deceleration 4 to 1000 Step 7 Distance 1 to 9999 Step 8 Deceleration 4 to 1000 Step 8 Distance 1 to 9999

Units – x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses x 10 pps Pulses

* If you select to use interrupt, the DL06 will not start looking for your target count until the interrupt X1 is on. **To set a negative number, put 8 in the most significant digit. For example: 8388608 is 88388608 in V3631 and V3632.

Velocity Control V-Memory

Function

Range

Units

V3630 V3631 / 3632 V3633 V3636

Velocity Profile Direction Select Velocity Error Code

2000 only 0=CW, 80000000=CCW, 4 to 1000 (see end of section)

– Pulses x 10 pps –

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 295

Appendix E: High-speed Input and Pulse Output Features

Choosing the Profile Type Pulse Output Mode generates three types of motion profiles. Most applications use one type for most moves. However, each move can be different if required.

1 • Automatic Trapezoidal – Accel Slope to Target Velocity to Decel Slope 2 • Step Trapezoidal – Velocity to Position Control on Interrupt • Velocity Control – Speed and Direction only 3 Automatic Trapezoidal Profile Defined The automatic trapezoidal profile is the most common positioning profile. It moves the load to a pre-defined target position by creating a move profile. The acceleration slope is applied at 4 the starting position. The deceleration slope is applied backwards from the target position. The remainder of the move in the middle is spent traveling at a defined velocity. E Registration profiles solve a class of motion control problems. In some applications, product material in work 6 moves past a work tool such as a drill station. Shown to the right, registration marks on the scrap area of the work7 piece allow a machine tool to register its position relative to the rectangle, to drill properly. 8 Home search moves allow open-loop motion systems to recalibrate (preload) the current position value at powerup. 9 Finished part area

Scrap Area direction of motion

Registration marks

Velocity (Hz)

Automatic Trapezoidal Profile

800

Target = 7000 pulses positioning velocity = 800 Hz

600 400 200

Ending velocity = 0 Hz or 40 to 1000 Hz

Starting velocity = 40 to 1000 Hz 100 ms to 10 secs

0 pulses

Acceleration

100 ms to 10 secs

Time

7000 pulses

Deceleration

The user determines the starting velocity, the acceleration/deceleration times, and the total number of pulses. The CPU computes the profile from these inputs.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

10 11 12 13 14 A B C D

E–45

Page 296

Appendix E: High-speed Input and Pulse Output Features

Step Trapezoidal Profiles Defined The step trapezoidal profile is a combination of velocity and position control modes. The move begins by accelerating to a programmed velocity. The velocity is sustained and the move is of indefinite duration. When an external interrupt signal occurs (due to registration sensing), the profile switches from velocity to position control. The move ends by continuing motion a pre-defined distance past the interrupt point (such as a drill hole location). The deceleration ramp is applied in advance of the target position.

1 2 3 4 E 6 7 8 9 10 11 12

Velocity (Hz)

Step Trapezoidal Profile

1000 4

800

5

Target = 7000 pulses positioning velocity = 1000 Hz

3

600

6

2

400

7

1

200

8

100

200

400

300

5000

400

Acceleration 0 pulses

1000 pulses

300

200

100

Time

Deceleration 6000 pulses

7000 pulses

Define steps 1 through 4 for gradual acceleration to the target velocity and define steps 5 through 8 for gradual deceleration from the target velocity. This type of profile is appropriate for applications involving large stepper motors and/or large inertia loads. It can, however, be used to provide gradual ramping in applications involving smaller motors and loads.

Velocity Control Defined

13 14 A

The Velocity Control defines only the direction and speed of motion. There is no target position specified, so the move can be of indefinite length. Only the first velocity value needs to be defined. The remaining velocity values can be created while motion is in progress. Arrows in the profile shown indicate velocity changes. Velocity Control Profile Velocity (Hz) 800 600 400 200

Time

B C D E–46

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 297

Appendix E: High-speed Input and Pulse Output Features

Automatic Trapezoidal Profile Operation Starting velocities must be within the range of 40 pps to 1k pps. The remainder of the profile parameters are in the profile parameter table.

1 2 Automatic Trapezoidal Profile Velocity 3 Accel Decel 4 Starting Velocity E Time 6 Start position Target position Start External Interrupt 7 (Optional) Profile Complete 8 9 The time line of signal traces below the profile indicates the order of events. The HSIO uses logical output Y0 as the Start input to the HSIO, which starts the profile. Immediately the HSIO turns off the Profile Complete signal (SP104), so the ladder program can monitor the 10 progress of the move. Typically a ladder program will monitor this bit so it knows when to initiate the next profile move. You can also use the external interrupt (X1). Once the external interrupt feature is selected for 11 the profile, the DL06 keeps outputting the pulses until X1 turns on. Then, the DL06 outputs the pulses defined as the target position. 12 If you are familiar with motion control, you’ll notice that we do not have to specify the direction of the move. The HSIO function examines the target position relative to the current 13 position, and automatically outputs the correct direction information to the motor drive. Notice that the motion accelerates immediately to the starting velocity. This segment is useful 14 in stepper systems so we can jump past low speed areas when low-torque problems or a resonant point in the motor might cause a stall. (When a stepper motor stalls, we have lost A the position of the load in open-loop positioning systems). However, it is preferable not to make the starting velocity too large, because the stepper motor will also “slip” some pulses due to the inertia of the system. You can also set up the ending velocity for the same reason. B When you need to change the current position value, use logical Y1 output coil to load a new value into the HSIO counter. If the ladder program loads a new value in CT174/CT175 C (V1174/V1175), then energizing Y1 will copy that value into the HSIO circuit counter. This must occur before the profile begins, because the HSIO ignores Y1 during motion. D Target Velocity

Ending velocity (optional)

Y0

X1

SP104

DL06 Micro PLC User Manual, 3rd Edition Rev. A

E–47

Page 298

Appendix E: High-speed Input and Pulse Output Features

Program Example 1: Automatic Trapezoidal Profile without External Interrupt

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

The Automatic Trapezoidal Profile we want to perform is drawn and labeled in the following figure. It consists of a non-zero starting velocity, and moderate target velocity. Trapezoidal Profile Velocity Target V elocity = 1 kHz Accel = 2 sec

Decel = 4 sec

Starting Velocity = 40Hz

In this example the ending velocity is not selected.

Time Start position

Target position = 5000

The following program will realize the profile drawn above, when executed. The beginning of the program contains all the necessary setup parameters for Pulse Output Mode 30. We only have to do this once in the program, so we use first-scan contact SP0 to trigger the setup. Direct SOFT 5 SP0

LD K30

Mode 30

OUT V7633

Locate Parameter Table (optional)

LDA O3630 OUT V7630

Select Pulse / Direction

Filtered Inputs

Load constant K30 into the accumulator. This selects Mode 30 as the HSIO mode. Output the constant to V7633, the location of the HSIO Mode select register. Load the octal address of the beginning of the Profile Parameter Table. The LDA instruction converts this to a hex number in the accumulator. Output this address to V7630, the location of the pointer to the Profile Parameter Table.

LD K103

Load the constant K103 which is required to select pulse and direction for physical Y0 and Y1 functions, respectively (use K3 if your application needs CW and CCW).

OUT V7632

Output this constant to V7632, configuring the pulse output type.

LD K1006

Load the constant K1006 which is required to select filtered inputs with a 10 mS filter time constant.

OUT V7634

Output this constant to V7634, configuring X0.

OUT V7635

Output this constant to V7635, configuring X1.

OUT V7636

Output this constant to V7636, configuring X2.

OUT V7637

Output this constant to V7637, configuring X3.

Continued on next page.

E–48

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 299

Appendix E: High-speed Input and Pulse Output Features Continued from previous page.

SP0

Profile / Target Velocity Target Position

Load the constant K4100 which is required to select Automatic Trapzoidal Profile, absolute positioning, without interrupt and a target velocity of 1 kHz.

LD K4100

Output this constant to V3630, the location of the Profile Select / Starting Velocity setup register .

OUT V3630

Load the constant K5000 which selects a target position of 5000 pulses. Don’t forget to use double word size (8-digit BCD position value).

LDD K5000

Output this constant to V3631 and V3632, the location of the Target Position double-word register .

OUTD V3631

Starting Velocity

Load the constant K4 which is required to select a starting velocity of 40 Hz (4 x 10 pps).

LD K4

Output this constant to V3633, the location of the starting velocity parameter register .

OUT V3633

Acceleration

Load the constant K20 which is required to select an acceleration time of 2 seconds (20 x 100 mS).

LD K20

Output this constant to V3634, the location of the acceleration parameter register .

OUT V3634

Deceleration

Start Profile X3

Load the constant K40 which is required to select a deceleration time of 4 seconds (40 x 100 mS).

LD K40

Output this constant to V3635, the location of the deceleration parameter register .

OUT V3635 Y0 OUT

We use a spare filtered input to allow the operator to start the profile. When the operator turns X3 ON, then OFF , logical output Y0 starts the profile.

Profile Complete SP 104

Y2 OUT

SP104 is the logical output of the HSIO to indicate the move is complete. W e use Y2 to energize an annunciator that the profile has finished.

Preload Position Value At any time you can write (preload) a new position into the current position value. This is often done after a home search (see the registration example programs). C0

Profile / Target Velocity

Load the constant K1000 as the new current position value.

LDD K1000

Output this constant to V1174/V1175 (CTA174/CTA175). the location of the current position value.

OUTD V1174 Y1 PD

Turn on Y1 for 1 scan. The off-to-on transition causes the HSIO to preload the current position with the value in V1174/V1175.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

1 2 3 4 E 6 7 8 9 10 11 12 13 14 A B C D

E–49