Step Motor Control System by Means of Human Machine Interface and Programmer Logic Controller
description
Transcript of Step Motor Control System by Means of Human Machine Interface and Programmer Logic Controller
-
1
Step Motor Control System by means of Human Machine Interface and Programmer Logic
Controller
J.C. Quezada(1)
, E. Flores(2)
, J. Bautista(3)
, A. Lpez(4)
(1),(2)
Universidad Autnoma del Estado de Hidalgo, Escuela Superior de Tizayuca, Tizayuca, Hidalgo, Mxico (3)
Universidad Autnoma del Estado de Mxico, Valle de Teotihuacn, Estado de Mxico, Mxico (4)
Centro de Investigacin y de Estudios Avanzados del IPN, Departamento de Ciencias Computacionales, D.F.,
Mxico
Abstract: Step motors are widely used in motion
control systems and they require the driver to provide
high precision in pulses synchronization in order to
obtain high precision in motor speed and thus in the
mechanisms motions, including rotation direction of
the set step motor-mechanism. In this work a control
system for a step motor is designed and implemented
on a test bank; the system consists of a GUI (Graphical
User Interface) to interact with the operator. The HMI
(Human-Machine Interface) has been designed on
proprietary software and considers, to the operator,
rules for control and monitoring of system conditions.
The HMI is interconnected with a PLC (Programmable
Logic Controller) in which the control rules and system
protections are implemented using Ladder Diagram
Language (or Ladder Logic, LL).
Key Words: Graphical User Interface, GUI; Human-
Machine Interface, HMI; Ladder Logic, LL;
Programmable Logic Controller, PLC; Step motor.
1. Introduction
At industry, many manufacturing systems and
continuous processes use different types of motors (AC-
motors, DC-motors and Step motors). Step motors are
commonly used for accurate motions of mechanisms
required by sophisticated machines and/or production
plants [1],[2]. The step motor control has been
traditionally carried out by using microcontroller
technologies, Field Programmable Gate Array (FPGA)
and Digital Signal Processing (DSP); however,
nowadays, industrial processes and machines are often
controlled through algorithms developed on
Programmable Logic Controllers (PLC) allowing to
modify them in an easy, quick and secure way before
new control requirements of the machines or plants
[3],[4]. PLC applications related to motors have been
primarily focused toward its startup and stopping
control and remote control by means of speed
controllers (driver). Logical programs developed in
PLC must guarantee the process reliability through
rules that allow to include all the risk possibilities as
much for people as for the plant (in this work, the step
motor) [6]. For this project the control logic has been
developed in Ladder Logic (LL) since it is still the most
used in PLC and therefore in process control [5],[6].
On the other hand, Human-Machine Interfaces
(HMI) at the present time are employed to represent in
an identical way the reality of the processes, allowing
the operators an interrelation between the physical
equipments of the plant with the virtual equipments of
Graphical User Interfaces (GUI) [7]. Besides, graphical
interfaces allow including events (mainly by means of
the computers mouse) in order to carry out control
actions and protection of the system equipments, as
well as to read the memory registers containing
information about the PLC variables and could using
their states to indicate, through color changes in virtual
equipments, the condition that those variables keep into
the real process and thus to facilitate to system operator
to make decisions [8].
This work shows to PLC as the step motor control
system and to HMI as the monitor through the designed
GUI. The system development is stated with a logic
about the variables state-event to be realized:
protection and/or animation through color.
2. Problem statement
In order to design the control algorithm, have been
considered the following aspects:
1. General requirements about the step motor control
system: variables to be controlled and/or monitored.
2. Employed control devices: HMI - PLC - Step motor.
3. The control algorithm development on LL.
4. GUI design for system control and monitoring.
-
2
2.1. System requirements
Basic system function is to control a six-wire two-phase
step motor in high torque configuration. The control
system must have industrial security conditions, that is
to say, IN-OUT selection, and physical (of field) and
virtual (on HMI) emergergency stop. Control stage
have to involve an option to five preset velocities and
an option to variable speed, as well as for rotation
change in both conditions. Control type selection,
preset-variable; rotation direction, left-right; system in-
out condition, and preset and variable velocities
buttons, must have of virtual type.
The step motors electric connection is shown in the
next circuit (Figure 1) and the motor step sequence in
the Table 1.
Orange
White
Blue
M
RedBlack
Yellow
Figure 1. Motor electrical circuit
Table 1. Motor step sequence
White/
Black Orange Red Blue Yellow
Ste
p
1 + - -
2 + - -
3 + - -
4 + - -
2.2. Control devices
The GUI has been developed on software by means
of a proprietary HMI installed on a PC, and reads and
writes data into the PLC register variables, in order to
be manipulated and/or monitored and assigns them the
same TAG or label. TAG assignation is based on the
Instrument Society of America (ISA) norm [12].
The employed PLC is modular type [9],[10] with
capacity for modules endowed of inputs and outputs for
24 VCD digital signals, as in this work; however, also
can manipulate analogical signals. The step motor
control system is shown in Figure 2.
Digital inputs and outputs are addressed through %I
and %Q respectively; in case of the inner signals of the
PLC memory, they are addressed through %M for
digital signals and %R for 16-bits registers [11].
Variables statement and addressing in the PLC are
shown in Table 2. The same variables TAG is used for
stating points in the HMI development.
Fuen
te
CPU
%I
%Q
USB - RS485
PLC
HMI
S tep Motor
Figure 2. HMI - PLC - Step motor
Table 2. HMI PLC variables addressing
2.3. Control algorithm development
Figure 3 shows the main control diagram; the first
algorithm line is related to the system security
conditions: physical and virtual stop, and system
conditions (HS_FISICO, HS_VIRTUAL and
SIST_D_F, respectively). Line two is proposed in order
to make sure that at any system stopping, the motor
startup-stopping signal A_P_MOTOR becomes zero.
Subsequently, there are two subroutines with crossed
contacts of the signal TIPO_CTL conditioned to only
one at once is activated; first subroutine is for
controlling the preset velocities, and the second one for
controlling variable speed of the step motor.
For controlling the preset velocities a timer block
is employed for determining each velocity (Figure 4);
the timers output signal are inputs to a counter block
with a preset value of four for four step control (Figure
5).
Address TAG Description
%I129 HS_FSICO Physical emergency stop
%M1 HS_VIRTUAL Virtual emergency stop
%M2 A_P_MOTOR Motor start up/stopping
%M3 SIST_D_F In-Out system
%M4 TIPO_CTL Control type: preset velocities variable
speed
%M5 SENT_GIRO Motor rotation direction
%M10 COND_SIST System conditions
%M11 VEL_1 Preset speed 1
%M12 VEL_2 Preset speed 2
%M13 VEL_3 Preset speed 3
%M14 VEL_4 Preset speed 4
%M15 VEL_5 Preset speed 5
%Q17 MOTOR Motor start up-stopping
%Q21 BOB_NAN orange coil
%Q22 BOB_ROJA red coil
%Q23 BOB_AZUL blue coil
%Q24 BOB_AMA yellow coil
%R35 LEC_VEL Speed reading
-
3
Figure 3. Main algorithm
Figure 4. Timer block
Figure 5. Counter block
Figure 6. Equal comparative block
Figure 7. Line for a motor coil
From the counter block, the real count value is taken
out from the corresponding register in order to be
compared through an equal comparative block (Figure
6); the output of this block is employed in the
energizing sequence of the coils, as shown in Figure 7.
It can be seen in Figure 6 that the equal comparative
block is enabled by the signal selecting the control type
TIPO_CTL. In Figure 7 the rotation direction sequence
of the step motor is enabled through SENT_GIRO.
The variable speed control employs a timer block for
which its desired value register is manipulated by
means of the GUI, as shown in Figure 8.
. Figure 8. Timer block to variable speed
-
4
For counting, comparison and points sequence, the
same algorithm structure is used, which guarantee that
at change of control type and of motor rotation, the
sequence holds since the registers in the used blocks are
the same and the containing information is taken out
independently from the time in which the change of
control type and of rotation direction are carried out.
2.4. GUI design
The developed GUI shown in Figure 9 presents the
protection elements, the physical emergency stop
through a security label (monitoring signal comes from
field), and the following virtual elements (signals
modified from the HMI or read from the PLC
registers): emergency stop represented by means of a
retentive emergency button, selector of in-out
condition, selector of control type preset-variable
speed, selector of rotation left-right direction, button for
startup-stopping of the step motor, five buttons for
selecting preset velocities, an analogical and digital
speedometer, and buttons for increasing or decreasing
the step motor speed in the variable speed control
mode.
The HMI logic has been developed combining the
programming of states of the variables with the
programming of events conditioning an action. Figure
10 shows the GUI events diagram and the states of the
variables, in the PLC, about the system protections:
HS_FISICO, HS_VIRTUAL and SIST_D_F.
Symbol indicates the execution, by means of the
computers mouse, of an action on the GUI virtual
instruments, which at the same time carry out an action
on the HMI points variables interrealted with the PLC
data registers.
Velocidad 1
Velocidad 2
Velocidad 3
Velocidad 4
Velocidad 5
Velocidades
DERIZQ
DENTROFUERA
Giro
Condiciones del Sistema Control de Velocidades
I
OO
PARO DEEMERGENCIA
PO W ER SUPPLY
GE FanucSERI ES 9 0 - 3 0
PRO G RAM M ABLECO NTRO LLER
+24VDCO UTPUT-
100- 240VAC 40A50 / 60HZ
BATTERY
PW RO K
RUNBATT
A 1 2 3 4 5 6 7 8
FB 1 2 3 4 5 6 7 8
A 1 2 3 4 5 6 7 8
FB 1 2 3 4 5 6 7 8
A 1 2 3 4 5 6 7 8
FB 1 2 3 4 5 6 7 8
A 1 2 3 4 5 6 7 8
FB1 2 3 4 5 6 7 8
A 1 2 3 4 5 6 7 8
FB 1 2 3 4 5 6 7 8
PARO DE
EMERGENCIA
Predeterminadas
HMI - PLC - MOTOR A PASOS
VARDET
Tipo de Control
0300
150 22575
RPM
000
Figure 9. GUI in edition
Based on the control rules, the step motor startup
and stopping can be achieved if HS_FISICO,
HS_VIRTUAL and SIST_D_F are equal to zero, which
guarantee that in absence of electricity feed for the
physical emergency stop, the step motor stops. In the
diagram, the actions for changing the state of a variable
into the PLC memory and/or the element color in the
GUI, are indicated. Any of these three signals put the
A_P_MOTOR at zero when they are activated.
Figure 10. Logic of HMI protections
Changing the step motor rotation direction is
independent from the speed control type being
operated. For step motor control at preset velocities,
Figure 11 presents the logic of events and actions
corresponding to the speed selection 1 (VEL_1); for
selecting other options is the same procedure.
Figure 11. Logic of the preset speed control in HMI
TIPO_CTL VEL_1 = 1
VEL_2=VEL_3=VEL_4=VEL5=0
0
HS_FISICO
Label PARO DE
EMERGENCIA hidden in the
GUI
A_P_MOTOR=0
Label PARO DE
EMERGENCIA
oscillating in GUI
0
1
HS_VIRTUAL
Label PARO DE
EMERGENCIA at GUI in
green color
A_P_MB=0
Button PARO DE
EMERGENCIA
at GUI in red color
0
1
SIST_D_F
At selector CONTROL in
green color and knob positioned
in GUI
A_P_MB=0
At selector FUERA in red color
and knob positioned in GUI
0
1
-
5
Figure 12. Logic of the variable speed control
The variable speed control type is manipulated by
means of the HMI in order to increase or decrease the
used register value of the timer block.
3. System testing
Two types of tests were carried out to the step motor
control system, that is:
System security, and
Step motor speed control.
Figures 13 and 14 show the security tests of the
control system; in Figure 12 the HS_VIRTUAL is
activated, button and step motor in red color, and
SIST_D_F is in out-position with red letters.
Figure 13. HS_VIRTUAL and SIST_D_F at 0
In Figure 14 it can be observed that HS_FISICO is
activated through the label centered at the GUI; the step
motor stays in red color. The HS_VIRTUAL is no
longer active and the button is in green color.
Figure 14. HS_FISICO at 0
Figures 15 and 16 show the control system at preset
velocities TIPO_CTL in 0, and with the left rotation
direction SENT_GIRO in 0 at Figure 13; while in
Figure 15 SENT_GIRO is in 1 showing the message
corresponding to the selector in green color and the
knob in its corresponding position. Also, the system
conditions at normal operation are showed, that is to
say, HS_FISICO = HS_VIRTUAL = SIST_D_F = 1,
and the motor and stop button in green color; and the
emergency stop label corresponding to the physical
stopping is not showed in the GUI. The on-off switch of
the step motor is activated and A_P_MOTOR = 1 is in
wine color.
Figure 15. System operation with left rotation direction
In the case of variable speed control of the step
motor, the configuration is such that the changes in the
corresponding timer block last 5 milliseconds (ms) each
time the buttons of signal increment or decrement are
pressed, which allows having an accurate speed control,
TIPO_CTL Increasing %R31
Decreasing %R31
1
-
6
as can be seen in Figure 17 where the digital indicator
displays 1.05 rpm, and Figure 18 shows 85.71 rpm. The
interval can be modified in the GUI design.
Figure 16. System operation with right rotation direction
Figure 17. Variable speed control 1.05 rpm
Figure 18. Variable speed control 85.71 rpm
The maximum programmed speed of the system is
300 rpm for the variable speed control type, as shown
in Figure 19. Figure 20 presents a picture about the test
bank where the speed control system of a step motor
was implemented.
Figure 19. Maximum speed of the step motor
Figure 20. Test bank of the speed control system of a step
motor
4. Conclusions
New technologies for industrial processes automation
commonly employ PLC for sequence control, and HMI
for variables monitoring and manipulation with
animation in real time by means of GUI. The
programming by events and actions implemented in the
HMI allows support to the operators in the processes
interpretation and in the early solution to problems
and/or faults in the system, through programmed
alarms; however, also gives as a consequence the
-
7
necessity of highly qualified personnel in applying
those new technologies. The control algorithm and the
logic of events and actions allow optimize the pulse
sequence toward the step motor for a better speed
control of this.
5. References
[1] De Lucena, S.E.; Kaiser, W.: "Stepping-Motor-Driven
Constant-Shear-Rate Rotating Viscometer"
Instrumentation and Measurement, IEEE Transactions
on , Vol. 57, No.7, pp. 1338-1343, July 2008.
[2] Zhihuang Huang; Lin Li; Donghui Guo: "Design of
stepping motor driving module for automatic
microscope system" Anti-counterfeiting, Security, and
Identification in Communication, 2009. ASID 2009. 3rd
International Conference on, pp.328-331, 20-22 Aug.
2009.
[3] Ljungkrantz, O.; Akesson, K.; Fabian, M. and Yuan,
C.: Formal Specification and Verification of Industrial Control Logic Components IEEE Transactions. Automation Science and Engineering, Vol. 99, pp. 1-
11, Dec 2009.
[4] Gulpanich, S.; Tipsuwanporn, V.; Suesut, T. and
Tirasesth, K.: "Implementation Programmable Logic
Controller for THAILAND Industries" Computational
Intelligence for Modeling, Control and Automation,
2005 and International Conference on Intelligent
Agents, Web Technologies and Internet Commerce,
International Conference on, Vol. 2, pp. 234-239, Nov
2005.
[5] Johnson, D. Programmable Logic Controllers Control Engineering, pp. 83-90, Sep 2008.
[6] Konaka, E.; Suzuki, T. and Okuma, S.: "Safety
Verification of Programmable Logic Controller taking
into account the Physical Dynamics - Application to
Material Handling Robots" SICE 2003 Annual
Conference , Vol. 1, pp. 818- 823, Aug 2003.
[7] Mathiesen, M.L.; Vefling, H.; Indergaard, R. and
Aakvaag, N.: "Trial Implementation of a Wireless
Human Machine Interface to Field Devices" Emerging
Technologies and Factory Automation, ETFA '06. IEEE
Conference on, pp.189-193, Sep 2006.
[8] Hall, S.; Cockerham, K. and Rhodes.: "What's your
color? [human-machine interface design]" Industry
Applications Magazine, IEEE, Vol. 8, No. 2, pp. 50-54,
Mar/Apr 2002.
[9] W. Bolton: Programmable Logic Controllers, 4th
Edition, Elsevier, 2006, pp. 9-12.
[10] Domingo, J.; Gmiz, J.; Grau, A. and Martnez, H.:
Introduccin a los Autmatas Programables, 1st
published, VOC, 2003, pp. 124, 135.
[11] Ge FanucTM, PLC Serie 90TM - 30/20/Micro, Juego de
Instrucciones de la CPU, Manual de referencia GFK-
0467-SP, 2002, pp. 2-10,11,27,31.
[12] American National Standard, Instrumentation Symbols
and Identification, ANSI/ISA 5.1-1984 (R-1992), Jul
1992.
6. Authors Biography
Jos Carlos Quezada Quezada, is
an engineer in electronics by the
Technological Institute of Lzaro
Crdenas, Mexico, 1992. He
obtained his M.Sc. in Mechatronics
Engineering in 2008 at TESE. His
research is Instrumentation and
Automation.
Ernesto Flores Garca, Ernesto
Flores obtained his MSc in
Automatic Control specialty from
the CINVESTAV-IPN of Mexico
City, Mexico. He is currently a PhD
candidate in the same specialty and
Institution. He received his Engineer
degree in Aeronautics from the IPN
of Mexico. His research interests include
Electromechanical Systems Control, Servomechanisms,
Robotics, Microcontrollers, among others. MSc Flores
has worked as a university researcher-professor in
Control and Mathematics areas from 2004; nowadays
he is working at the Universidad Autnoma del Estado
de Hidalgo, Mexico.
Asdrbal Lpez Chau is an
engineer in electronics and
telecommunication by ESIME-IPN,
Mexico, 1997. He obtained his
M.Sc. in computer engineering in
2000 at CIC-IPN, Mexico.
Currently, he is pursuing his PhD,
working in the area of adaptive
classification algorithms for high speed data streams, at
CINVESTAV-IPN, Mexico.
Jorge Bautista Lpez, is an
engineer in communication and
electronics by ESIME-IPN, Mexico,
2002. He is candidate to master in
sciences by SEPI-IPN. Working
embedded systems with
microcontrollers and programmer
logic controllers.