Tip22 e PDF
Tip22 e PDF
Tip22 e PDF
Seite 1 von 6
Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs (Tip 22) Category: Positioning Special Hardware Requirements:
l
l l l
l l l
l l l
One SIMATIC S7-200 CPU (224, 226, 226XM) Because a pulse output is used in this tip, a CPU with DC power supply, DC inputs, and DC outputs (DC/DC/DC) is required. One PC/PPI cable One programming device or PC One SIMOSTEP stepper motor, rated load torque 2 Nm, rated current IN = 1.8 A Order number: 1FL3041-0AC31-0BG0 You can find technical specifications in the online catalog CA 01, URL: http://www.ad.siemens.de/ One FM STEPDRIVE Order number: 6SN1-227-2ED10-0HA0 You can find technical specifications in the online catalog CA 01, URL: http://www.ad.siemens.de/ One motor cable, 10 m Order number: 6FX5-008 5AA00 1BA0 One sub D connector, 15-pin, for FM STEPDRIVE Order number: 6FC9 348 7HX One voltage transformer 24 VDC/5 VDC Adaptation of the voltage levels of the outputs of the S7-200 to the pulse interface of the FM STEPDRIVE Resistors or Calex Model 8502 You can find data sheets under: http://www.calex.com or http://www.recom-electronic.com One cable for control signals to power section One simulator for S7-200
Project Example Print this Tip The CPU 221 used in this example is equipped with two pulse outputs which were developed for generating control pulses for stepper motor drives. (To generate higher stepping frequencies [up to 20 kHz], you can use the ramp function of the CPU 221, CPU 222, or CPU 224. See Tip 50.) A special power section (here the FM STEPDRIVE) converts the control pulses into a current supply for the motor coils using a certain pattern. This creates a rotating field in which the rotor can change its position only in fixed steps with an angle measure of a. A continuous sequence of control pulses leads to a corresponding sequence of steps with the same frequency (synchronous machine). If the control frequency is high enough, the step-by-step motion of the motor shaft becomes a continuous rotary motion. This example demonstrates using the pulse output Q0.0 to trigger a power section of a stepper motor. After the Motor START signal at input I0.0, the control reads out a fixed number of square pulses which lead to a motion of the motor shaft by the corresponding number of steps. The break contact at input I0.1 switches the motor off. The position of the switch at input I0.5 determines the rotation direction of the motor. Note: To reduce errors for high frequencies, you can use pulse ramps to control the stepper motor because these ramps allow a slow acceleration or deceleration of the stepper motor (see Tip 50). Pulse ramps are supported by CPU 221, CPU 222, and CPU 224.
file://D:\T&T\English\tips\tip22.htm
05.08.2002
Tip 22: Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs
Seite 2 von 6
Description FM STEPDRIVE The FM STEPDRIVE power section is used to drive three-phase stepper motors. Motors in the lower range of performance can be driven with 5 W to 600 W.
Each positive pulse edge causes one step of the motor if it is ready to at the GATE N input.
For a de-energized signal input DIR, the motor turns clockwise; for an input, the motor turns counterclockwise. If the ENABLE input is energized, the power section is enabled. The level of the motor phase current that is set can be changed with modulated signal.
Signal Interface
file://D:\T&T\English\tips\tip22.htm
05.08.2002
Tip 22: Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs
Seite 3 von 6
The signals of the higher level controller that are fed in at the PULSES input can be enabled for driving the motor by means of the GATE_N input of the signal interface. The signal interface has 24V inputs. Inputs: GATE_N Enables the clock pulse signal
When there are 24 V at the GATE_N input, the signals tha the PULSES input are used for driving the stepper motor. pending signals are disabled.
Outputs: ZERO READY2 MSTILL Zero signal ring counter Ready status Motor stopped
In the zero position of the internal ring counter, there are 2 output.
After the ENABLE input is activated, the power section rep ready by means of the READY2 output.
If the clock pulse signal is disabled by means of the GATE motor is brought to a standstill, this standstill is acknowled MSTILL sign.
Parameters of the FM STEPDRIVE You assign parameters for the motor phase current, the number of steps, and the current decrement by means of the switch for current and parameter. Selector switch for motor phase current: 0 -> IN = 1.7 A (for SIMOSTEP stepper motor 1FL3041 0AC31 0BG0)
Voltage Conversion for the Driver of the Stepper Motor The following figures show how you can easily create a circuit in order to connect the programmable logic controller to the drive of the stepper motor that requires a 5V current-sinking signal. Note: All inputs of the pulse interface of the FM STEPDRIVE are 5-V inputs.
file://D:\T&T\English\tips\tip22.htm
05.08.2002
Tip 22: Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs
Seite 4 von 6
As an option, you can also use a Calex converter (such as a Model 8502), to generate a 5-V currentsinking signal.
Note: For the pulse train output (PTO) function, the switching times of the outputs for the switching procedures On/Off and Off/On are different. This difference is evident as a distortion of the relative duty cycle. The PTO outputs require a minimum load of 10% of the rated load in order to generate clean transitions. Without the load, the stepper motor could lose steps when switching from one pulse rate to another.
Program Description
Initialization In the first program scan cycle (SM0.1=1), important parameters for the pulse functions are preset. Here, among other things, the operating speed as well as the number of step pulses is specified. How to Select the Direction of Rotation You can use the switch I0.5 to select the direction of rotation. If input I0.5 = 1, output Q0.2 is set to high level and this enables counterclockwise rotation. If input I0.5 = 0, output Q0.2 is set to low potential and this enables clockwise rotation. In order to protect the motor and to avoid loss of steps, a change in direction of rotation is possible only when the motor is switched off (M0.1 = 0).
file://D:\T&T\English\tips\tip22.htm
05.08.2002
Tip 22: Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs
Seite 5 von 6
How to Turn on the Motor 1. Push the Motor START button, that is, there is a positive edge transition at input I0.0. 2. There is no interlock present, that is, interlock memory bit M0.2 is reset. 3. The drive is turned off, that is, operation memory bit M0.1 is reset If these conditions have been met, memory bit M0.1 is reset and the controller uses the instruction PLS 0 to start the pulse output at output Q0.0. A prerequisite for starting is that the basic data of the pulse output function (cycle time, pulse width, and pulse count) have been preset in the corresponding special memory areas of the PTO/PWM instructions and output Q0.3 is set.
How to Turn Off the Motor 1. Push the Motor STOP button, that is, there is a positive edge transition at input I0.1. 2. The drive is turned on, that is, M0.1 is set. If these conditions have been met, memory bit M0.1 is reset. After that, the pulse output at output Q0.0 is interrupted because pulse width modulation is activated in connection with the instruction PLS 0. When this happens, the pulse width is reduced to zero (the basic setting required for this takes place already during initialization in the first scan cycle) and this action suppresses the output signal. After the complete pulse train has been output, interrupt routine 0 is processed in which memory bit M0.1 is reset again in order to enable starting the drive again. For a better overview in the flowchart, this part of the program is not shown. Interlock To protect personnel and equipment, an interlock of the drive is provided after the Motor STOP (I0.1) button is pressed. Following the stop signal, interlock memory bit M0.2 is set and the drive is turned off immediately. The motor cannot be restarted until M0.2 is reset. In order to prevent the drive from starting up in an uncontrolled manner when the Motor STOP button is released, M0.2 is not reset until both the buttons at input I0.0 and I0.1 have been released. A new start signal must be given for any further motion. After complete output of the pulses, interrupt routine 0 is processed. In this routine, memory bit M0.1 is reset in order to enable the restart of the drive. The S7-200 Programmable Controller System Manual provides additional information about pulse sequences and more detailed data about the interrupt routines. Program Flowchart:
file://D:\T&T\English\tips\tip22.htm
05.08.2002
Tip 22: Trigger a Stepper Motor Drive Using Integrated DC Pulse Outputs
Seite 6 von 6
file://D:\T&T\English\tips\tip22.htm
05.08.2002