0% found this document useful (0 votes)
73 views36 pages

Chapter 3

This document summarizes the program that controls the components of an automated machine. The program is implemented on a Siemens S7-1500 PLC using TIA Portal software. The hardware configuration includes input/output modules and an HMI panel. The software configuration uses organization blocks, functions, and function blocks to control components like the top drive, blowers, oil system, and brakes. Networks of logic describe processes like torque control and display actual torque readings.

Uploaded by

rthhjgbrhefb²
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views36 pages

Chapter 3

This document summarizes the program that controls the components of an automated machine. The program is implemented on a Siemens S7-1500 PLC using TIA Portal software. The hardware configuration includes input/output modules and an HMI panel. The software configuration uses organization blocks, functions, and function blocks to control components like the top drive, blowers, oil system, and brakes. Networks of logic describe processes like torque control and display actual torque readings.

Uploaded by

rthhjgbrhefb²
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Introduction

As we presented in the previous chapter all the components and their functions. This chapter
is about the program that we develop that control the components in order to perform their function
and supervise it
This program will control and the supervise the machine. We will elaborate the details in this
chapter by presenting all the blocks, functions, tags and HMI’s screens that were used. This program
will be implemented on S7-1500 PLC’s using the software TIA PORTAL V17 from siemens

Hardware configuration
What we need to configure in this machine are :
 the INPUT/OUTPUT addresses of the each module
 the communications protocol between the PLC and the other module
 HMI panel

In this hardware configuration we have SIEMENS PLC(CPU 1516-3 PN/DP)


With
FIGURE: the PLC’s hardware configuration
 Slot 2: DQ 8x230VAC/2A ST_1.
 Slot 3: DQ 8x230VAC/2A ST_2.
 Slot 4: DI 16x24VDC BA_1.
 Slot 5: AQ 2xU/I ST_1.

Software configuration:
TIAPORATAL
Siemens' TIA Portal (Totally Integrated Automation Portal) is a software platform for
programming and configuring automation systems. It offers a unified programming and
configuration environment for PLCs, HMIs, drives, and other automation components. Engineers
can easily build complicated automation systems using a variety of tools and capabilities available
on the TIA Portal. It also has a user-friendly interface which makes navigation easy, so it's usable
for both users who are beginners as well as professionals. Engineers can use TIA Portal to manage
their automation projects and boost productivity while lowering costs and decreasing mistakes.
Overall, TIA Portal is a robust and adaptable automation platform that has won the hearts of many
automation professionals worldwide.
Program’s blocks:
In Siemens TIA Portal, program blocks refer to the basic building blocks of a PLC
(Programmable Logic Controller) application. These instructions inform the PLC what to do, such
as reading input signals, conducting logic operations, and regulating output signals. As needed,
program blocks can be created, modified, and reused, enabling efficient and flexible programming.
They are often structured in a hierarchical framework, with higher-level blocks requesting certain
duties from lower-level blocks. there are 4 types of this blocks
Organization Blocks
Organization Blocks (OBs) are the primary building blocks of a PLC program that control its
execution. They are triggered by certain events or conditions. OBs give PLC programming a
systematic and methodical approach, enabling the creation of code that is effective and easy to
maintain. There are numerous sorts of OBs, each with a distinct function.
 OB1 (cycle interrupt OB): Executed once per scan cycle and controls the overall execution
of the program.
 OB35 (time-of-day OB): Executed at a specific time of day and is used for time-based
control functions.
 OB100 (hardware interrupt OB): Triggered when a hardware error occurs and is responsible
for handling the error and stopping the program if necessary.

Function
A function (FC) in TIA Portal is a memoryless code block. It includes a program that is
executed when the function is called by another code block or another function, which makes it
perfect for recursive and complicated structures. It has no instance data block where block parameter
values can be kept. As a result, when an FC is called, all formal parameters (such as those described
under In, Out, and In-Out) must be assigned actual values rather than being left blank.
Function Block
Function blocks (FB) are code blocks that permanently store their input, output, and in-out
parameters in instance data blocks, allowing them to be accessed even after the block has been run.
Therefore, they are also known as "memory blocks". Like an FC, it contains a program that is
always performed when another code block calls it. And it can also be called several times
throughout a program. When an FB is called, the formal parameters can be left blank. When a
function block call is made, we refer to it as an instance. Each instance of a function block requires
an instance data block, which stores instance-specific values for the formal parameters stated in the
function block.

Programming
The TIA Portal programming language is a combination of two prominent PLC
programming languages: Ladder Diagram (LD) and Function Block Diagram (FBD). LD) is a
graphical programming language that employs ladder-like symbols to express logical functions,
whereas (FBD) is a modular language that uses interconnected function blocks to generate
complicated logic. The hybrid language used in TIA Portal combines the best of both worlds,
delivering an easy-to-understand and simple graphical interface while still allowing for flexibility
and versatility.
Main[OB1]:
In Siemens PLCs, OB1 is a necessary block that is run once when the PLC is started or
restarted. It is used to set up connection parameters and other system settings, as well as to initialize
variables and data structures. OB1 also acts as a watchdog, monitoring the state of the PLC and
ensuring that it remains operational. We also used Structured Text (ST) to call other function which
is a high-level language that is based on Pascal, and it is designed to be easy to read and write while
also providing powerful functionality like loops, conditional statements, and function calls, allowing
programmers to create complex and modular programs.
TDS AC Select:
The TOP DRIVE is selected when assigned to forward or reverse, the throttle is in the OFF
position, and the drill mode is selected. Once TDS is selected, it will be latched. the drive should be
on when the throttle is on or spin mode or torque mode. To change the direction, we have to go into
drill mode. In case of an emergency and the E-STOP button is pushed down, we have to go to drill
mode and pull the E-STOP button out in order to reset (TDS select).
Blowers Function:
When the TDS is selected, it triggers 3 timers :
 Start off-delay timer (TDS SELECT OFF DELAY) allows the YDS cooling and lube
system to be selected for 2 seconds after it has been turned off. This will allow the
blower and oil lube systems to remain on if you are just switching from forward and
reverse.
 Assign on-delay timer(BLOWER START DELAY) start the blowers. it’s also
triggered by (TDS SELECT OFF DELAY) and (BL&OP AUTO/ON SW)
 Start on-delay timer (BLOWER ALARM DELAY) checks if there is an air pressure
in the Drive cooling intakes
The pressure switch check if the blowers are working properly, there are also
temperature switch that detects the drive overheating
Oil System Function:
When top drive or "BL&OP AUTO/ON SW" is selected, the oil motor is turned ON, and
it is turned OFF When "TDS CHOOSE OFF DELAY" is set to OFF. The "OIL PUMP
TIMER" gives time for system pressure to rise before triggering an alarm if there is no
pressure.
IBOP Control:
When the switch is closed, energize the closed solenoid. Turn indicator light on when
pressure switch indicates that hydraulic is present for closing the valve (pressure switch
is closed). Opening of the valve and pressure reducing is done hydraulically.
Torque Wrench:
the Torque Wrench Clamp and the Shot Pin solenoid are excited when the TW button is
pressed, the throttle IS OFF and Brake are released. Which trigger a (Start extended pulse
timer) for 3 second for the rotating head to rotate intermittently.
Link Tilt Control:
The link tilt float delay (5 s) ensures that the links have been lowered (floated) before
rotation can take place. This is for safety reasons; it is dangerous to rotate while links are
extended. The jump stand allows the TDS to move slightly down by exciting the counter-
balance's solenoid.
BRAKES:

Brakes are set for any of the following events:

 The brake switch is on.


 brake switch is in automatic, throttle is off, and less than 10 rpm.
 if torque sequence fails to reach top of ramp
 If the AC drive fails and the speed is less than 10 rpm,
 e-stop pushed down, the brake is on and cannot be turned off.

If a variable frequency drive fault has occurred, the brakes will be set at the first fault. In order to
reset the brakes again, we have to take control by bringing the brake to the ON position and taking
control of the brake. It will rearm after all faults have been cleared and the brake is in the ON
position. Until the faults are cleared, it will not rearm. This was done like this in case a fault could
not be reset and we needed to rotate the TDS.
TORQUE COMMAND:
This function is mostly in charge of the torque signal delivered to the VFD. Each network, as shown
in the pictures below, each network describes a certain case. In network 1, for example, we have
logic that restricts the torque to 4000 lb/ft when the ramp fails, the throttle is in the OFF position,
and the TDS is in the drill mode. Networks 7 and 8 describe how the torque is ramped up and down.
When the "TORQUE LIMIT TO VFD" value is larger than the makeup torque value in the forward
direction or greater than 60000 lb/ft in the reverse direction, Network 9 sets the "TOP OF RAMP
SEQUENCE". After all this calculation, the "TORQUE LIMIT TO VFD" will be scaled and sent to
the VFD.
TORQUE INFORMATION:
In this function, we will see how we receive the actual torque signal from the VFD and display it on
the HMI or on a physical torque meter. In network 1, we map the signal from the analog value to the
physical value, then map it to the torque meter range by multiplying it with the gear ratio and the
efficiency and dividing it by 100 to fit the torque meter range. We also take some reference points
that we are going to use in other functions.
VFD SPEED SET POINT:
By taking the input from the HMI slider and converting it to a real value, this function will send the
speed set point signal to the VFD for the drill mode. Networks 4 and 5 set the speed for spin or
torque modes. The horsepower is also computed using this function. If the horsepower rating is
exceeded for more than 60 seconds, the speed reference sent to the drive is decreased to maintain the
TDS under the horsepower limit. After all this calculation, the "PEED SETPOINT TO VFD" will be
scaled and sent to the VFD.
RPM INDICATOR:
This function is in the process of converting the real speed signal received from the VFD into a
physical range that will be displayed on the HMI or a physical RPM meter. In network 1, we used
the "Linear Scaling (I TO R)" function to transform the signal from analog to physical, then divided
it by the gear ratio to get the shaft RPM. We also collect certain reference points that we will need in
subsequent functions.
HMl DESIGN:
HMI is an acronym for “human-machine interface”, which is a technology that allows humans to
interact with machines. It is a communication interface that lets an operator to control a machine or
system via numerous input and output devices. HMI is utilized in many industries for the purpose of
offering an intuitive and user-friendly interface via which operators can monitor and manage various
parts of a machine or process. Temperature, pressure, speed, and other data may be included.
Depending on the application, the interface may include a touchscreen, buttons, dials, voice
instructions, or other forms of input and output devices.
For our project we used the siemens The TP1200 Comfort PRO is intended to provide high
capability and usability for industrial automation applications, including machine and plant
engineering, process visualization, and data analysis. With a 12-inch high-resolution touchscreen
display, various communication ports (including Ethernet, USB, and RS232), and a number of built-
in software tools for programming and visualization are among the primary characteristics of the
Siemens TP1200 Comfort PRO. Advanced security measures, such as user authentication and data
encryption, are also included to assist secure critical information and prevent unwanted access.

Main Screan:

The main screen has a variety of controls and feedback tools that allow the operator to select the
various modes via a user interface. The operator is able to choose the desired speed and torque, as
well as the direction of the TDS. There are two gauges that allow the operator to monitor the shaft
torque and speed, as well as an emergency stop button in case of an accident.
THE GRAPH SCREEN

The Trend View is strong feature in the TIA Portal HMI tools that allows the user to monitor and
analyze process data over time. It displays historical process data graphically, allowing operators to
quickly recognize trends, patterns, and abnormalities in the process which help the operator to
develop strategies to optimize it. Users can define different colors for each data point, set up
zooming and scrolling functions for better data analysis, and add annotations and comments to the
trend view
THE ALARM SCREEN

The Alarm tool is another powerful feature that provide the ability to monitor and respond to the
occurrences of alarms in real time. It alerts the operator visually when an aberrant situation arises in
the process being monitored like motor overheating or exceeding the horsepower limits. It also is
used to establish alarms based on predefined criteria such process variables, time, and limit values.
When an alarm occurs, the tool shows the alarm message on the HMI screen, as well as an auditory
alert and a flashing visual cue. This allows operators to quickly determine the type and severity of
an alert and take necessary action to remedy the problem.

BRK&PH;
It is an acronym that stands for BRAKES AND PIPIE HANDLER. This screen provides the
operator with a centralized control to regulate the TDS's critical functions, such as the brakes, LINK
TILT POSITION, IBOP, and TORQUE WRENCH to ensure the safety and efficiency of drilling
operations.

MAKEUP TORQUE RECIPE


The TIA Portal HMI software provides its users with a recipe tool that creates templates that define the
structure of a recipe, including the types of data, variables, and values needed to produce a product. Once
the template is created, users can then create individual recipes by filling in the required data and values for
each step of the process. The user can also change or delete according to the change in process. In our case,
the driller can set the required makeup for each type or size of the drill pipes.

CPU characteristics
The Siemens 1200 series is a programmable logic controller (PLC) that is flexible, scalable, and
cost-effective. It is intended for an extensive range of applications. Multiple modules can be
added to fit the particular requirements of each application. The Siemens 1200 series also has
sophisticated features like as integrated motion control, safety functions, and diagnostic tools,
making it suited for demanding applications. For our project we used the SIMATIC 1217C with the
characteristic that are shown in the table below.
SOURCE FROM SIEMENS WEB SITE

characteristic value
Dimensions (mm) 150 x 100 x 75
CPU Processing Time Bit operation 0.08 µs / instruction
Word operation 1.7 µs / instruction
Floating point 2.3 µs / Operation
arithmetic
Work 150 Kbytes
User memory Load 4 Mbytes
Retentive 14 Kbytes
Inputs (I) 1024 bytes
Process image size
Outputs (Q) 1024 bytes
Size of bit memory address area 8 Kbytes
Signal module (SM) expansion 8
Communication module (CM) expansion 3

14 integrated
Total
6 HSC (HIGH SPEED COUNTING)
Digital Inputs Rated value: 24
Input voltage for signal "0" 5 V DC at 1 mA
for signal "1" 15 V DC at 2.5 mA
10 integrated
Total
4 with 100 kHz Pulse Train Output
for signal "0": max. 0.1 V; with 10 kΩ load
Digital Outputs Output voltage
for signal "1": min. 20 V
for signal "1" rated value: 0.5 A
Output current
for signal "0" residual current: 0.1 mA
Total 2
0 to +10V
Analog Inputs Input resistance (0 to 10V): ≥100 KΩ
Ranges
Resolution: 10 bits
Conversion time: 625µs
2
Total
Analog Outputs
0 to 20mA
Ranges
Resolution: 10 bits
Total 6
Counters Max counting 1 MHz
frequency
Alarm Inputs Total 4
Total 4
Pulse Output
Limit frequency 1 MHz
Memory card SIMATIC memory card (optional)
2 x PROFINET with a max Transmission rate of
Communication interfaces
100MBits
Rated value Rated voltage: 24 V
Power supply Lower limit: 20.4 V
Range
Upper limit: 28.8 V
Safety rated versions SIL3, SIL2, SIL1
IP degree of protection IP 20
SURCE FROM SIEMENS WEB SITE

You might also like