MPLC Manual
MPLC Manual
Index
1. i) Introduction to Programmable logic controller
ii) Applications of PLC
iii) Description of various ports
iv) Description of the experimental setup
3. Introduction to the Delta DVP software and its features, establishing connection
with the PLC using RS232 cable
9. Control of linear stage speed and traverse distance using the DPLSY function.
11. Gradual start and stop of stepper motor using timers and latches
12. Use of proximity sensors to limit the traverse of the linear stage.
13. Introduction to DC motors and its speed control using pulse width modulation
and calibration graphs
Introduction to programmable logic controller
1. What is a PLC?
It is a microprocessor based input output device that can be used for
industrial and domestic purpose which provides the output based on the
user defined logic. The instruction or the program will be stored in the
memory and will be executed to obtain the required output based on the
input.
Application of PLC
1. Useful for providing logic outputs without actually having to change the
physical constituents of the circuit
2. Useful for providing high rate switching for application requiring pulsed
outputs and pulse width modulation
3. Provides input in the form of ladder logic which is quite easy to learn and
easy to trace mistakes if any for troubleshooting purpose
4. Can interface with wide range of sensor (over wide range of voltages) and
is capable of controlling numerous actuators
Input ports –
There are 8 input ports starting from X0 to X7 through which input can be provided
using devices like push buttons, limit sensors, trigger sensors and virtually using HMI
memory bits
A S/S port is provided to act as a source or a sink for the input voltage
Output ports – there are four output ports (which can be expanded using an ad on
extension) starting from Y0 to Y3. The outputs can be in the form of simple logic on or
off, pulsed output (with control over pulse frequency and number of pulses) and pulses
width variable width.
The UP and ZP ports are to be connected to 24v and 0v for sinking type output (NPN
switching) and vice versa for sourcing.
The COM 1, 8 pin port will be used to connect the RS232 cable to the PC for
transmitting the program (rs232 USB to prolific communication).
At the bottom 3 pins are provided namely 24v, ground, and earth for powering up the
PLC.
The setup consists of an aluminium table on which a linear stage is mounted. The
length of the stage is 1000mm at the end of which a NEMA 23 stepper motor is
mounted. The controller consists of PLC, stepper motor driver, DC power supplies and
components required for latching action. The human machine interface provided will
be used to provide instruction to the PLC through the touch screen. Programs to the
PLC and HMI can be created and communicated with the help of the desktop
computer.
Source type and sink type connection
Source type
In sourcing type connection the control switch is placed before the load. Thus the
supply voltage won’t reach the load until the switch is closed
In the delta PLC this is achieved through connecting the S/S port to positive voltage
of the DC source and the sinking it through any of the input pins through the load back
to the DC power supply ground
In sinking type connection the control switch is after the load. Thus the supply voltage
will reach the load but circuit won’t be closed until the switch is closed.
In the delta PLC this is achieved through connecting the S/S port to negative voltage
of the DC source and sinking the negative end of the load through any of the input
pins
The select a PLC model dialog box appears, where one has enter the program title,
select the model type as PLC for PLC operation , select SA2 series , select
communication as RS232 (the COM number will appear as a default number) and then
enter the file name as one wishes and then press on OK
After which the ladder diagram mode window appears, which has to be maximized. It
is in this window that the user can create the ladder logic
After entering the program, press control+ F7 to compile the program (the end line will
appear)
Then go to options in the menu bar click on communication setting , to open the dialog
box select type as RS232 COM port as USB to PROLIFIC and click on ok
The above figure represents the connection required to perform the basic bulb on and
off operation using simple push buttons. In the input side the push buttons are
connected in sinking type i.e. the sink side of the push button is connected to the PLC
inputs X0 and X1 the S/S port is connected to the ground of the DC power supply. On
the output side one end of the bulb is connected to dc power supply positive (24v) and
the other is connected PLC output in sinking manner to pin Y0. UP is connected to
24v and ZP is connected to ground (NPN sinking type). The bottom three pins are
connected for powering up the micro-processor. The COM 1 port is connected to pc
usb using RS232 cable
Basic logic operations
The above figure represents three basic logic operation. This logic can be executed
using two normally open push buttons as input and a bulb as output.
In the first case the two normally open buttons are connected in series to obtain AND
logic (note – when normally open switch is defined in the logic it does not represent
the physical button used. For example if the physical button is NO then by default
when the program is running the logic button will remain open. If the physical button
is NC then by default the NO logic button will remain closed)
Similarly the second line represents OR logic i.e. the Y0 pin becomes high when either
of the buttons are pressed
The third line represents XOR logic i.e. the output will be obtained only when one of
the buttons is pressed and not together and not when neither is pressed (i.e. when the
inputs are dissimilar).
The above image shows the ladder program representing a timer TMR block.
When the NO switch X0 is closed the timer count will start after the timer has reached
the set value (set by the term K50 i.e. each unit indicates 100ms therefore K50
indicates a delay of 5seconds) the T0 switch will close (here it is defined as NO, if it is
defined as NC then the timer behaves like an off delay timer).
Setting M0 also turns on timer T1 after 1000 milliseconds resetting M0 thus turning Y0
on again. The duration for which M0 thus Y0 will be on or off will be decided by the
timer constants thus acting as a high speed blinker.
The above figure represents the connection required for operating a stepper motor
using delta PLC. In the input side a NO switch is provided for turning on the program.
The negative terminal of both pulse and direction is connected to the outputs Y0 and
Y1. The positive terminals of pulse and direction is connected to dc 24 v. The power
side of the driver has 24 v and ground along with four poles for the stepper motor. The
pair of coils have to be identified for the motor and the separate pair have to be
connected to A+ and A- and B+ and B- . Rest of the connection remain same as
previous case
Consider a case where the stage has to move by a distance of 300mm at a speed of
100mm/min.
In the third line the speed is entered in mm/min this again has to be divided by 5 to get
number of rotations per min and multiplied by 1000 to get pulses per min and finally
divided by 60 to get pulses per second. The returned value of pulse frequency and
total number of pulse that is D46 and D36 have to be entered to the DPLSY block
which will control Y0 output pin to get the required distance at required speed.
This above image shows the syntax for counter function. Here when X0 is closed once
the counter value K changes from 0 to 1 and when done two more times it changes to
3. This is when the switch C0 closes and turns Y0 on
In some applications it is required that on and off of an output has to be achieved using
a single NO push button. This is quite difficult as the same button will simultaneously
set and reset an output or memory bit thus contradicting itself. In order to solve this
problem a counter function can be used.
When X0 is closed and open C0’s K and C1’s K will become 1 from 0, this will close
C0 NO switch located in line 6 which will set Y0 to high. But when it is pressed again
both C0’s K and C1’s K will become 2 from 1. This turns on C1 and resets Y0, after
that for the same operation to repeat both C0’s K and C1’s K has to be set back to 0
but this cannot happen until C1 is done resetting Y0 thus a timer T0 is provided to give
a delay before everything is reset
The delta DOP soft application helps us to create a user interface to control
inputs to the delta PLC by adding blocks to the screen and linking each block
to a specific memory bit in the program
Open the delta DOP soft to open the above window and select New file
From model type select 107BV enter project name, screen name> screen _1, screen
no>1, printer >null, language > English, HMI rotation > 0degree, press next
Then click on static text, double click on the block- go to text and then type the motor
on
Next select input – numeric input – main- write address – select the register value
D32 (as D32 is mapped to the input value total distance in mm)
Perform similar changes in order to acquire speed input from the appropriate register
assigned in the DPLSY block for input in mm/min
After that select compile, and if no errors are found download the program onto the
HMI.