Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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:
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
The PLSY instruction for this example will look like the following:
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.
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
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.
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