Sei sulla pagina 1di 4

How to Use PLSY: Pulse Output Instruction in the ELC

Product Application AP05001005E

Effective June 2008

Application
Square-wave pulses, where the frequency can be changed and where the number of pulses sent can be selected, have numerous applications. This instruction may be used as a signal injector for testing radios and televisions, pulse plating applications, AGV (Automated Guided Vehicles) control and can be used to test digital circuits by providing a clock pulse, etc. An advantage of using square-wave pulses is that the signal remains digital all the way from the ELC to the controlled system, i.e., no digital-to-analog conversion is necessary. The dc voltage is converted to a square-wave signal alternating between full on and zero. By keeping the signal digital, noise effects are minimized. Noise can only affect a digital signal if it is of sufcient energy to change a logic-1 to a logic-0 or vice versa.

Detailed Procedure
The PLSY Instruction Format
The PLSY Instruction looks like the following:

X0 PLSY K1000 (S1) K200 (S2) Y0

FIGURE 2. PLSY INSTRUCTION

Overview
The purpose of this application note is to describe the operation of the PLSY instruction in ELC controllers. This instruction sends squarewave pulses out a digital output (Y0, or Y1) from an ELC controller. This instruction allows for the frequency of the pulses to be changed during operation. Changing the number of pulses sent will not take effect until the next time the instruction is executed. The pulses sent are always at a 50% duty cycle as shown in Figure 1 below.

The rst element represents the frequency of the output pulses in Hz. In this case, K1000 represents a frequency of 1000 Hz and is represented by S1. The second element represents the number of pulses to send. In this case, K200 represents sending 200 pulses out a digital output and is represented by S2. The nal element represents the particular output the pulses will be sent out. In this case it is output Y0. Y0 and Y1 may be used for this instruction.

1000 ms

PLSY Instruction Description and Parameter Limits


The PLSY instruction sends pulses out Y0 or Y1 of varying frequency and count. This instruction may be used twice in the same ELC program. The following are some additional facts concerning the operation of this instruction: 1. PB Models: Output frequency range supported: 1 10,000 Hz. 2. PC/PA models: Output frequency range supported: 1 32,000 Hz. 3. When the PLSY instruction is executed, the specied number of pulses (S2) will be sent out Y0 or Y1 at the specied frequency (S1). 4. When using the PLSY instruction with a particular output (Y0 or Y1), that output cannot be used by the PWM or the PLSR instructions. 5. The PLSY instruction only allows the number of pulses parameter (S2) to be changed when the instruction is stopped. 6. The frequency of the pulses (S1) in the PLSY instruction may be changed during operation. The new frequency will take effect immediately.

2000 ms FIGURE 1. SQUARE WAVE PULSES

Related Bit Addresses in the ELC for PWM


Bit address M1010 M1023 M1029 M1030 M1078 M1079 Function When ON, the pulse output is continuous for Y0. When ON, the pulse output is continuous for Y1. Pulse output execution is complete for output Y0. Pulse output execution is complete for output Y1. When energized, it will stop sending pulses out Y0 immediately. When energized, it will stop sending pulses out Y1 immediately.

The PLSY instruction for this example will look like the following:

X0 PLSY K1000 K200 Y0

FIGURE 4.

When X0 = ON, 200 pulses at a frequency of 1KHz will be sent out Y0. When all 200 pulses have been sent, M1029 = ON (execution complete). When X0 = OFF, pulses will stop being sent out Y0 immediately. When X0 is turned ON again, the pulse output will restart. If the frequency of the pulses needs to be changed on the y, a Dregister address may be used in place of the constant K1000 value. A D-register address may also be used for the number of pulses in the PLSY instruction, allowing this parameter to be changed with the program as well. However, unlike the frequency, the number of pulses may only be changed when the instruction is stopped.

Related D-register Addresses in the ELC for PLSY


D1030 D1031 D1032 D1033 Present total number of pulses for output Y0 (low word) Present total number of pulses for output Y0 (high word) Present total number of pulses for output Y1 (low word) Present total number of pulses for output Y1 (high word)

High-Speed Counter and Pulse Output Frequency Limits


The PB, PA and PC ELC controllers contain a single processor to handle all high-speed counter and pulse output operations. The PH controller has an additional processor to handle high-speed counter and pulse output functions for Inputs X10 and X11, as well as for outputs for Y10 and Y11. Each controller has unique limitations concerning a total maximum frequency, as well as frequency limits for individual I/O. These frequency limits are shown in the Table 1 below for each controller type.

Example
Assume the PLSY pulse output will be used to send 200 pulses out Y0 at a frequency of 1KHz. The output pulse train will look like the following:

0.5 ms

Output Y0

...

200

1 ms FIGURE 3.

TABLE 1.
TOTAL FREQUENCY (HSC AND PULSE) HSC INPUT SINGLEPHASE (A ONLY) HSC INPUT 2-PHASE QUADRATURE PULSE OUTPUT SINGLEPHASE (A ONLY) PULSE OUTPUT 2-PHASE (A AND B) QUADRATURE

ELC TYPE

PB PC PA PH

40 KHz 40 KHz 40 KHz

X0, X1 20 KHz Other 10 KHz X0, X1 30 KHz Other 10 KHz X0, X1 30 KHz Other 10 KHz

X0 & X1 4 KHz X0 & X1 4 KHz X0 & X1 use C253 25 KHz X0 & X1 4 KHz X0 & X1 use C253 25 KHz X0 & X1 4 KHz X0 & X1 use C255 50 KHz

Y0 10 KHz Y1 10 KHz Y0 30 KHz Y1 10 KHz Y0 30 KHz Y1 10 KHz Y0 30 KHz Y1 10 KHz Y10 100 KHz Y11 100 KHz

Y0 & Y1 10 KHz Y0 & Y1 10 KHz Y0 & Y1 10 KHz X0-X5, Y0, Y1 40 KHz X10, X11, Y10, Y11 130 KHz

X0-X5, Y0, Y1 40 KHz X0, X1 30 KHz X10, X11, Y10, Y11 130 KHz X10, X11 100 KHz Other 10 KHz

EATON CORPORATION Cutler-Hammer Pulse Output Instruction Product Application AP05001005E Effective: June 2008

An important point to note is that the total frequency for each controller type may not be exceeded, except for one special case highlighted in Example 2 below. The maximum frequency for a particular input may also not be exceeded. The following examples will better illustrate these points.

Example #3
PB controller: X0 = 10 KHz high-speed input (50% of maximum for this terminal) X1 = 5 KHz high-speed input (25% of maximum for this terminal) X2 = 10 KHz high-speed input (100% of maximum for this terminal) Y0 = 10 KHz pulse output (100% of maximum for this terminal) Y1 = 5 KHz pulse output (50% of maximum for this terminal) The total frequency of 40 KHz is reached and no additional high-speed inputs or pulse outputs may be used with this controller. Also, none of the high-speed inputs or pulse outputs exceed the maximum frequency for each particular input or output terminal, so this application will function properly.
TABLE 2. SUPPORTING DOCUMENTATION
MANUAL REFERENCE NUMBER

Example #1
PA controller: X0 = 30 KHz high-speed input (100% of maximum for this terminal) X1 = 10 KHz high-speed input (33% of maximum for this terminal) No additional high-speed inputs or pulse outputs may be used. The maximum frequency of the controller is reached (40 KHz). The X0 high-speed input is at the maximum frequency supported by X0 for this controller type, while X1 is operating at 33% of its maximum supported frequency. The two factors that may not be exceeded are the total maximum frequency of the controller and the maximum frequency of an individual input.

Example #2
PH controller: A 2-phase quadrature encoder is connected to inputs X10 and X11. The maximum frequency of the encoder in this application is 50 KHz on both phase A and B. Due to this high frequency, counter C255 must be used, which implies 4 times mode on X10 and X11. X10 is the A-phase and X11 the B-phase and both terminals receive the same frequency of 50 KHz. The maximum frequency as seen by the controller is 50 KHz multiplied by 4 = 200 KHz. When in this mode, no other high-speed inputs or pulse outputs may be used. This is a special case where the maximum total frequency is exceeded. This is the only exception and it is shown in Table 1.

ELC System Manual

MN05003003E

In the event additional help is needed, please contact the Technical Resource Center at 1-877-ETN-CARE (386-2273).

EATON CORPORATION Cutler-Hammer Pulse Output Instruction Product Application AP05001005E Copyright 2008

Eaton Corporation Electrical Group 1000 Cherrington Parkway Moon Township, PA 15108 United States 877-ETN-CARE (877-386-2273) Eaton.com

2008 Eaton Corporation All Rights Reserved Printed in USA Publication No. AP05001005E / Z7252 June 2008

Potrebbero piacerti anche