Anda di halaman 1dari 5

SIMATIC S7-200

Tips & Tricks

Tip 23: How to Use Integrated Pulse Outputs for Open-Loop Control Positioning with a Stepper Motor
Version 4.1. Updated 08/00

Category: Positioning Special Hardware Requirements:


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

Overview:
Positioning tasks differentiate between closed-loop control and open-loop control operations. Stepper motors do not require continuous position control and therefore are used in open-loop control mode. This program example achieves relative positioning with a stepper motor drive by using the integrated pulse outputs of the SIMATIC S7-200 CPU 224. Although a reference point is not necessary for this type of positioning, the example describes a simple procedure for specifying a reference bit because, from a practical standpoint, it makes sense to assign a fixed reference point to an axis. Next, this example program uses an input byte in binary format to provide the CPU with the positioning angle. From this information, the program then calculates the number of required positioning steps and causes the CPU to read out a corresponding number of control pulses.

600 Load resistor

Pulse interface FM STEPDRIVE SIEMENS


PULSE_N DIR_N Enable_N PWM_N GND GND GND Ready_N 15
Selector switch for motor phase current

1 Pulses Dir Enable PWM GND

2.2 k 2.2 k 2.2 k

Q0.0 pulse output Q0.2 direction of rotation Q0.3 - enable

Unassigned GND

1M 1L+
Siemens

Out .0 .1 .2 .3

CPU 224

Signal interface
L+ (24V) M (24V GND) Gate_N 24 VDC power supply

SF Run Stop

.0 .1 .2 .3 .4 .5 .6 .7 In

MSTILL ZERO
Parameter switch

Ready2

Motor connection
u v w

I0.0 to I0.7: binary format of the position angle

I1.1:

I1.0: Motor start Motor stop I1.4: Set/delete reference point I1.5: Direction of rotation switch

Stepper motor

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.

Interfaces of the FM STEPDRIVE Power Section


Pulse Interface
The module can be driven with clock signals of a higher level positioning unit by means of the pulse interface. For each clock pulse, the motor executes one step. Note: The pulse interface has 5V optocoupler inputs and therefore cannot be connected to the controller directly.

Input Signals: PULSE

Clock pulse

Each positive pulse edge causes one step of the motor if it is ready to run and has 24 V at the GATE N input.

DIR

Direction of rotation

For a de-energized signal input DIR, the motor turns clockwise; for an energized signal input, the motor turns counterclockwise.

ENABLE PWM Output signals: READY1_N

Enable Current control

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 a pulse width modulated signal. After the ENABLE input is activated, the power section reports that it is ready by means of the output READY1_N.

Ready status

Signal Interface
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 that are pending at the PULSES input are used for driving the stepper motor. For 0 V, the pending signals are disabled. In the zero position of the internal ring counter, there are 24 V at the ZERO output. After the ENABLE input is activated, the power section reports that it is ready by means of the READY2 output. If the clock pulse signal is disabled by means of the GATE_N input and the motor is brought to a standstill, this standstill is acknowledged by the MSTILL signal.

Outputs: ZERO READY2 MSTILL

Zero signal ring counter Ready status Motor stopped

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)

Parameter Switch:

1000 steps/revolution

No function Current decrement active in standstill

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.

FM STEPDR. CPU 224 380 Pulses 24 V 100 Pulses_N 5V

5V

CPU 224

380

FM STEPDR Pulses

24 V

5V 100 Pulses_N

TTL

As an option, you can also use a Calex converter (such as a Model 8502) to generate a 5V current-sinking signal.

Pulse interface Calex Calex Calex


Q0.3 - enable Q0.2 direction of rotation Q0.0 pulse output

Enable Dir Pulses

Load resistor

Out .0 .1 .2 .3

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
Input and Output Definitions
Inputs: I0.0 to I0.7 I1.0 I1.1 I1.4 I1.5 Outputs: Q0.0 Q0.2 Q0.3 Q1.0 Pulse Output Direction of Rotation Indicator Drive Enabled Indicator Reference Angle Indicator Reference Angle (in binary format) Motor START Motor STOP Set/Delete Reference Angle Direction of Rotation

Copyright 2001 Siemens Energy & Automation


SIMATIC S7-200 customers have free use of the application tips. These tips are only a general approach to using the S7-200 with various applications. Your specific application may be different. It is your responsibility to use the SIMATIC S7-200 properly in your applications.

Anda mungkin juga menyukai