Twincat Training Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

Six Month Training

Report at

SOFTWARE DEVELOPMENT CENTRE

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD OF


THE DEGREE OF

BACHELOR OF TECHNOLOGY

(Electrical Engineering)

JAN-JUNE 2023

SUBMITTED BY:

PRINCE KUMAR

U.R.N. 1905137

C.R.N. 1916056

DEPARTMENT OF ELECTRICAL ENGINEERING

GURU NANAK DEV ENGINEERING COLLEGE LUDHIANA-141006


(An Autonomous College Under UGC Act 1956)

1
STUDENT’S DECLARATION

I hereby declare that have undertaken “Six Month” training at “Software Development Centre

(GNDEC), Ludhiana” during a period from February,2023 to June,2023 in partial fulfillment of

requirements for the award of degree of B. Tech (Electrical Engineering) at Guru Nanak Dev

Engineering College, Ludhiana. The work which is being presented in the training report

submitted to Department of Electrical Engineering at Guru Nanak Dev Engineering College,

Ludhiana is an authentic record of training work.

Name of Students Signature of Students

Prince Kumar (1905137)

The six months industrial training Viva–Voce Examination of has been held on
and accepted.

Signature of Internal Examiner Signature of External Examiner

2
ACKNOWLEDGEMENT

It is a great privilege for us to express our profound gratitude to our respected Dr. Sehijpal Singh

(Principal) and Dr. Kanwardeep Singh (HOD) Electrical Engineering Department, Guru Nanak

Dev Engineering College, Ludhiana.

I would like to thank Prof. Gagandeep Singh Sodhi for providing us an opportunity to do our

training at “Software Development Centre GNDEC, Ludhiana”. I would like to take this

opportunity to thank all the respected teachers who have been a constant source of inspiration for us

and have shown us the right way when needed it the most.

I express our sincere gratitude to the Dr. Hardeep Singh Rai (Head) Software Development

Centre for providing this opportunity to carry out six months industrial training and project work.

NAME & SIGNATURE OF STUDENT

PRINCE KUMAR (1905137)

3
ABSTRACT

This report showcases TwinCAT 3 as a robust PC-based control and automation solution that offers

flexibility, performance, and scalability for a wide range of industrial applications. TwinCAT 3 is a

powerful PC-based control and automation software developed by Beckhoff Automation. It provides a

comprehensive platform for real-time control and automation applications, offering an integrated

environment for programming, configuring, and visualizing industrial control systems. This abstract

highlights the key features and advantages of TwinCAT 3, showcasing its suitability for a wide range of

industries and applications. Furthermore, the abstract highlights the versatility of TwinCAT 3 in

supporting various programming languages, including IEC 61131-3 and object oriented programming

languages like C++, and C#. This compatibility empowers developers to leverage their preferred

programming environment, enhancing productivity and facilitating seamless integration with existing

systems. Furthermore, the abstract highlights the advanced Ether-CAT technology supported by

TwinCAT 3. Ether-CAT is an Ethernet-based fieldbus system that offers fast communication and

precise synchronization for distributed control systems. TwinCAT 3 seamlessly integrates with Ether-

CAT, enabling efficient data exchange and real-time control across a wide range of industrial devices

and sensors.

4
CHAPTER-1 INTRODUCTION TO AUTOMATION

1.1 INTRODUCTION: Automation is the technology by which a process or procedure is performed

with minimal human assistance Automation or automatic control is the use of various control systems for

operating equipment such as machinery, processes in factories, boilers and heat treating ovens, switching on

telephone networks, steering and stabilization of ships, aircraft and other applications and vehicles with

minimal or reduced human intervention. Automation covers applications ranging from a household

thermostat controlling a boiler, to a large industrial control system with tens of thousands of input

measurements and output control signals. In control complexity, it can range from simple on-off control to

multi-variable high-level algorithms. Automation has been achieved by various means including mechanical,

hydraulic, pneumatic, electrical, electronic devices and computers, usually in combination. Complicated

systems, such as modern factories, airplanes and ships typically use all these combined techniques. The

benefit of automation includes labor savings, savings in electricity costs, savings in material costs, and

improvements to quality, accuracy, and precision.

1.2 ROLE OF ELECTRONICS IN AUTOMATION: A constant demand for better and more

efficient manufacturing and process machinery has led to the requirement of high quality and reliability in

control techniques. With availability of intelligent, compact solid state electronic devices, it has been

possible to provide control system that can reduce maintenance, down time and improve productivity to a

great extant. By installing efficient and user friendly industrial electronic system for manufacturing

machinery or process, one can obtain precise, reliable and prolific means for generation quality products.

Two of the latest techniques that offer flexible and efficient operation to user are “PLC” and “PC based

control”. The basic idea behind this was to provide means to eliminate high cost associated with inflexible,

conventional relay controlled system. Programmable Controllers and PC based control offer a system with

computer flexibility:

5
a. Suited to withstand the industrial environment.

b. Has simplicity of operation.

c. Maintenance by plant technicians.

d. Reduce machine down time and provide expandability for future.

1.3 ADVANTAGES OF AUTOMATION: The main advantages of automation are:

1. Increased throughput or productivity.

2. Improved quality or increased predictability of quality.

3. Improved robustness (consistency), of processes or product.

4. Increased consistency of output.

5. Reduced direct human labor costs and expenses.

6. Installation in operations reduces cycle time.

7. Can complete tasks where a high degree of accuracy is required.

8. Replaces human operators in tasks that involve hard physical or monotonous work (e.g., using one

forklift with a single driver instead of a team of multiple workers to lift a heavy object.)

9. Reduces some occupational injuries (e.g., fewer strained backs from lifting heavy objects.)

10. Replaces humans in tasks done in dangerous environments (i.e. fire, space, volcanoes, nuclear

facilities, underwater, etc.)

11. Performs tasks that are beyond human capabilities of size, weight, speed, endurance, etc.

12. Reduces operation time and work handling time significantly.

13. Frees up workers to take on other roles.

1.4 Types of Automation System: Automated production systems can be classified into three basic

types:

 Fixed automation,
6
 Programmable automation, and

 Flexible automation.

1.4.1. FIXED AUTOMATION: It is a system in which the sequence of processing (or assembly) operations

is fixed by the equipment configuration. The operations in the sequence are usually simple. It is the

integration and coordination of many such operations into one piece of equipment that makes the system

complex. The typical features of fixed automation are:

 High initial investment for custom–Engineered equipment.

 High production rates.

 Relatively inflexible in accommodating product changes.

The economic justification for fixed automation is found in products with very high demand rates and

volumes. The high initial cost of the equipment can be spread over a very large number of units, thus making

the unit cost attractive compared to alternative methods of production. Examples of fixed automation include

mechanized assembly and machining transfer lines.

1.4.2. PROGRAMMABLE AUTOMATION: In this the production equipment is designed with the

capability to change the sequence of operations to accommodate different product configurations. The

operation sequence is controlled by a program, which is a set of instructions coded so that the system can

read and interpret them. New programs can be prepared and entered into the equipment to produce new

products. Some of the features that characterize programmable automation are:

 High investment in general-purpose equipment.

 Low production rates relative to fixed automation.

 Flexibility to deal with changes in product configuration.

 Most suitable for batch production.


7
Automated production systems that are programmable are used in low and medium volume production. The

parts or products are typically made in batches. To produce each new batch of a different product, the system

must be reprogrammed with the set of machine instructions that correspond to the new conduct. The physical

setup of the machine must also be changed over: Tools must be loaded, fixtures must be attached to the

machine table also be changed machine settings must be entered. This changeover procedure takes time.

Consequently, the typical 10 cycle for given product includes a period during which the setup and

reprogramming takes place, followed by a period in which the batch is produced. Examples of programmed

automation include numerically controlled machine tools and industrial robots.

1.4.3. FLEXIBLE AUTOMATION: It is an extension of programmable automation. A flexible automated

system is one that is capable of producing a variety of products (or parts) with virtually no time lost for

changeovers from one product to the next. There is no production time lost while reprogramming the system

and altering the physical setup (tooling, fixtures, and machine setting). Consequently, the system can

produce various combinations and schedules of products instead of requiring that they be made in separate

batches.

The features of flexible automation can be summarized as follows:

 High investment for a custom-engineered system.

 Continuous production of variable mixtures of products.

 Medium production rates.

 Flexibility to deal with product design variations.

The essential features that distinguish flexible automation from programmable automation are:

 The capacity to change part programs with no lost production time


8
 The capability to changeover the physical setup, again with no lost production time.

These features allow the automated production system to continue production without the downtime between

batches that is characteristic of programmable automation. Changing the part programs is generally

accomplished by preparing the programs off-line on a computer system and electronically transmitting the

programs to the automated production system. Therefore, the time required to do the programming for the

next job does not interrupt production on the current job. Advances in computer systems technology are

largely responsible for this programming capability in flexible automation. Changing the physical setup

between parts is accomplished by making the changeover off-line and then moving it into place

simultaneously as the next part comes into position for processing. The use of pallet fixtures that hold the

parts and transfer into position at the workplace is one way of implementing this approach. For these

approaches to be successful; the variety of parts that can be made on a flexible automated production system

is usually more limited than a system controlled by programmable automation.

9
CHAPTER-2 TWINCAT 3

2.1. INTRODUCTION: TwinCAT stands for "The Windows Control and Automation Technology,"

which is a software platform developed by Beckhoff Automation. It is designed for real-time control and

automation applications, primarily in industrial environments. TwinCAT combines a real-time operating

system with engineering tools and runtime functionality. It enables the programming, configuration, and

execution of control applications on Windows-based PCs or embedded controllers.

TwinCAT 3 has two parts:

2.1.1. XAE (eXtended Automation Engineering): XAE refers to the eXtended Automation Engineering

environment of TwinCAT. It encompasses the engineering tools and development environment for creating,

configuring, and managing control applications. XAE provides a comprehensive Integrated Development

Environment (IDE) that includes programming editors, debugging tools, project management capabilities,

and visualization tools. It supports various programming languages such as Structured Text (ST), Function

Block Diagram (FBD), and Sequential Function Chart (SFC) based on the IEC 61131-3 standard. XAE is

used for efficient design and development of control applications.

2.1.2. XAR (eXtended Automation Runtime): XAR stands for the eXtended Automation Runtime

component of TwinCAT. It is responsible for the execution and real-time control of applications developed

using TwinCAT. XAR includes the real-time kernel, which provides deterministic and precise execution of

control programs. The runtime system manages tasks, handles interrupts, and ensures real-time

synchronization for high-performance control. It interacts with the underlying hardware, such as industrial

PCs or embedded controllers, to enable real-time control of automation processes. XAR also incorporates

communication protocols and interfaces for data exchange and connectivity with other devices and systems

within the industrial automation network.


10
Together, XAE and XAR form the TwinCAT system, offering a comprehensive platform for developing,

configuring, and executing control applications with real-time capabilities in industrial automation

environments.

2.2. ISOLATED CPU CORES IN TWINCAT: TwinCAT utilizes the isolated cores of the CPU

for compiling and executing code, which provides a significant advantage in terms of speed and performance

in industrial automation applications. By dedicating specific CPU cores for real-time tasks, TwinCAT can

ensure that the control processes run efficiently and with minimal delay. This also reduces the interferences

from other non-real-time processes running on the system. This reduces the possibility of unexpected delays

or interruptions caused by other applications or system operations, resulting in more reliable and predictable

automation.

2.3. INSTALLATION OF TWINCAT 3:

1. Install TwinCAT XAE from the official website of Beckhoff.

 Visit Beckhoff.com.

 Create an account.

 Go to Download Finder.

 Download “TwinCAT 3.1- eXtended Automation Engineering” zip file.

2. Extract the zip file downloaded.

 Shows a pop up asking for permission to install application.

11
 Click “Yes” and installation will start.

3. Accept the agreement to move forward with installation.

4. Select “complete” in the next pop up.

5. Integrate the Microsoft visual studio.

 Select the Microsoft visual studio version installed in computer.

 In case of no visual studio is installed in machine it will automatically install TwinCAT XAE

Shell.

6. Next Click “install” and drivers will be installed.

7. At last restart the computer.

2.4. CREATING THE PLC PROJECT IN TWINCAT:

1. In the File menu, select New > Project to create a new TwinCAT project file. A new project folder

with the TwinCAT project tree opens in the Solution Explorer.

12
Fig. 1.1. Creating project in TwinCAT

2. In the Solution Explorer select the PLC node and the command Add New Item, in order to add a PLC

project to the TwinCAT project. The dialog Add New Item – TwinCAT <project name> opens.

Fig. 1.2. Creating PLC in Project

13
3. In the category PLC Templates select the Standard PLC project template.

4. Enter a name and storage location for the project and click the Add button.

The selected template automatically creates a MAIN program, which is called by a task. "Structured Text

(ST)" is automatically selected as the programming language.

Fig. 1.3. Main Program In PLC

2.5. SWITCHING TO LANGUAGES OTHER THAN ST IN TWINCAT:

1. Since the automatically generated MAIN program block is created in the implementation language

"Structured Text (ST)" by default, you must first delete this function block and create a new MAIN

program in the implementation language (Twin-CAT supports IEC languages that is LD, FBD, IL,

CFC, SFC) using the context menu command Add > POU.

14
2. Then double-click on the MAIN program in the PLC project tree (subfolder POUs). The editor opens

with the MAIN tab.

2.6. DEPLYOMENT OF CODE TO PLC:

1. Build the project: Before deploying the code to the PLC, it is essential to build the project to ensure

that there are no compilation errors. In TwinCAT, select "Build" > "Build Solution" from the menu, or

press Ctrl + Shift + B.

2. Establish a connection to the PLC: Connect your development computer to the PLC via an Ethernet

cable. Ensure that the PLC is powered on and connected to the network. Verify that your computer's IP

address is on the same subnet as the PLC.

3. Set the target system: In TwinCAT, go to the "Project" tab, and under "Target System," select the

appropriate PLC device from the drop-down menu. If your PLC device is not listed, you may need to

configure it manually.

4. Configure the connection settings: In the "Target Browser" window, right-click on your PLC device

and select "Properties." Verify that the IP address and other communication settings match the actual

configuration of your PLC.

5. Download the program: Once the connection settings are configured correctly, right-click on your PLC

device in the "Target Browser" window and select "Download." This action transfers the compiled

program from your development computer to the PLC.

6. Start the PLC: After the download is complete, right-click on your PLC device and select "Start." This

initiates the program execution on the PLC. You can monitor the program's status and variables using

the "Online" mode in TwinCAT.

2.7. PC BASED CONTROL AND AUTOMATION WITH TWINCAT: TwinCAT utilizes

the CPU of a PC for PC-based control by leveraging the processing power of the PC's hardware and
15
executing control algorithms and automation tasks in real-time. TwinCAT operates on a real-time operating

system (RTOS) that is integrated into the Windows operating system. This RTOS allows TwinCAT to

prioritize and schedule control tasks with deterministic timing, ensuring real-time performance. TwinCAT

employs real-time communication protocols, such as EtherCAT or other fieldbus protocols, to exchange data

with field devices and sensors. The CPU processes incoming data from sensors and executes control

algorithms in real-time, enabling rapid and synchronized control actions.

2.8. COMMUNICATION PROTOCOLS FOR TWINCAT: TwinCAT supports various

communication protocols to enable seamless integration with field devices, other systems, and networks.

Some of the commonly used communication protocols in TwinCAT are:

2.8.1. EtherCAT: EtherCAT (Ethernet for Control Automation Technology) is a high-performance

industrial Ethernet protocol widely used in TwinCAT-based systems. TwinCAT fully supports EtherCAT,

allowing real-time communication with EtherCAT-enabled I/O modules, drives, and other devices.

EtherCAT offers fast data transmission, deterministic control, and excellent synchronization capabilities.

2.8.1.1. EtherCAT Master: The EtherCAT master is a device or software that controls the EtherCAT

network and coordinates communication with the EtherCAT slaves.

 In a PC-based control system, the EtherCAT master is typically implemented using specialized

hardware, such as an EtherCAT master card or an embedded EtherCAT master module integrated

into an industrial PC.

 The EtherCAT master is responsible for initiating and managing the data exchange with the

EtherCAT slaves.

 It generates and sends EtherCAT telegrams, which carry control commands, process data, and

synchronization information, to the EtherCAT slaves.

16
 The EtherCAT master processes incoming data from the slaves, performs calculations or control

algorithms, and generates output commands accordingly.

2.8.1.2. EtherCAT Slave: An EtherCAT slave is a device, such as an I/O module, drive, or sensor, that

interfaces with the automation system and communicates with the EtherCAT master.

 Each EtherCAT slave resides along the daisy-chain network and processes EtherCAT telegrams

as they pass through.

 EtherCAT slaves can read input data from sensors, process it locally, and provide output data to

actuators or other devices.

 The EtherCAT slave responds to the commands and requests received from the EtherCAT

master, ensuring synchronized and timely data exchange.

 EtherCAT slaves are configured with specific addresses, communication parameters, and data

mapping defined in the EtherCAT Slave Information (ESI) file.

Fig. 1.

17
Beckhoff offers a wide range of EtherCAT slave devices that can be used in various industrial automation

applications. Some of the common Beckhoff EtherCAT slave devices include:

1. EtherCAT I/O Modules: These modules provide digital and analog input/output channels for

connecting sensors, actuators, and other devices to the EtherCAT network. They come in different

configurations and channel counts to suit different application requirements.

Fig.

2. EtherCAT Drives: Beckhoff offers EtherCAT-compatible drives for controlling motors and other

motion control systems. These drives support various motor types, such as servo motors, stepper

motors, and frequency-controlled motors.

Fig.
18
3. EtherCAT Terminals: EtherCAT terminals are modular I/O systems that provide flexible and scalable

solutions for integrating different types of I/O signals into the EtherCAT network. They offer a wide

range of digital and analog I/O functions and can be easily extended or reconfigured as per the

application needs.

Fig.

4. EtherCAT Measurement Modules: Beckhoff provides EtherCAT slave modules specifically designed

for measurement and data acquisition purposes. These modules offer high-precision analog input

channels and can be used for tasks like temperature measurement, strain gauge measurement, voltage

measurement, etc.

Fig.

19
5. EtherCAT couplers: Couplers are distribution points in an EtherCAT network. They connect multiple

EtherCAT segments together. They enable efficient transmission of EtherCAT communication

packets. Beckhoff offers various couplers with features like diagnostics and network redundancy.

Fig.

2.8.2. ADS (Automation Device Specification): ADS is a proprietary communication protocol developed

by Beckhoff Automation for efficient and real-time communication between TwinCAT and Beckhoff

devices. ADS allows direct access to variables and functions in TwinCAT from external applications or

devices, enabling seamless integration and control.

Fig.

20
CHAPTER 3: WHEEL TRUING

3.1. INTRODUCTION: The bicycle wheel is a hoop, or rim, with a set of spokes that connect it to
a hub. Spokes pull the rim from both the right and left side. Wheel truing is the process of using a spoke
wrench to change the tension of spokes to improve the straightness and roundness, or trueness, of the wheel.

There are four basic aspects of wheel truing. The first two are covered in this article. A professional
mechanic is able to adjust spoke tension so that each aspect is optimal. With the right tools, and experience,
a thorough wheel truing will produce a durable and strong wheel.

3.1.1. LATERAL TRUENESS: Lateral truing is the correction of side-to-side wobbles, or lateral
deviations, as the wheel spins This aspect is the most critical for bicycles with rim brakes. When truing
wheels, generally begin first by correcting the lateral trueness.

Fig. Lateral Trueness (Side-To-Side Straightness)

3.1.2. RADIAL TRUENESS: The wheel’s roundness, or amount of up and down movement as it spins, is
its radial trueness. Radial truing is adjusting spoke tension to correct issues of roundness.

21
Fig, Radial Trueness (Up-And-Down Straightness/Roundness)

3.1.3. DISH/CENTERING: The two wheels of the bike should be centered in the frame as well as aligned
to one another.

Fig. Dish (Centering)

22
3.1.4. SPOKE TENSION: Much like any other fastener system, spokes have a range of acceptable
tightness, or tension. Wheels with extremely varied spoke tension will not stay true, or straight, for very
long. Additionally, wheels with spokes that are either too tight or too loose overall can cause problems.
Spoke tension is best measured using a spoke tension meter (tensiometer).

Fig, Tension (overal tightness)

3.2. TRUING (RADIAL/LATERAL): Truing is the process of aligning a bicycle wheel so that it

spins true in a lateral (side-to-side) direction. It involves adjusting the tension in the spokes to correct any

deviations or wobbles in the wheel rim.

The process of lateral truing typically involves the following steps:

1. Mounting the wheel: Place the bicycle wheel in a truing stand or, alternatively, you can use the

bicycle frame as a reference point.

2. Identifying deviations: Spin the wheel and observe the gap between the rim and a reference point

(such as the brake pads or truing stand). Look for any wobbles or lateral deviations in the rim as it

spins.
23
3. Locating the high spot: Determine the section of the rim where the deviation is most pronounced. This

is typically referred to as the high spot.

4. Adjusting the spokes: Using a spoke wrench, tighten or loosen the appropriate spokes to correct the

lateral deviation. To bring the rim closer to the center, tighten the spokes on the opposite side of the

high spot. To move the rim away from the center, loosen the spokes on the same side as the high spot.

Make small adjustments to avoid overcorrection.

5. Checking progress: After making adjustments, spin the wheel again and check for improvements.

Repeat steps 3 and 4 as needed until the rim spins true and the lateral deviations are minimized.

It's important to note that truing a wheel requires some practice and skill. If you're uncertain or unfamiliar

with the process, it may be best to seek assistance from a professional bicycle mechanic who can ensure the

wheel is properly trued and tensioned.

3.3. MAT: The Mach 1 MAT (Manual Automatic Truing) machine is a wheel truing machine that
uses a combination of manual and automatic controls to true wheels. The machine has a number

of features that make it a valuable tool for wheel truing, including:

 A high-speed, high-precision spindle that can true wheels quickly and accurately

 A variety of truing tools that can be used to address a wide range of wheel problems

 A built-in computer system that controls the machine and provides feedback to the operator

 A user-friendly interface that makes it easy to operate the machine

The Mach 1 MAT machine can be used to true both bicycle wheels and motorcycle wheels. The

machine is also capable of truing wheels with complex profiles, such as carbon fiber wheels.

The following are some of the ways in which the Mach 1 MAT machine can help in wheel truing:
24
 Accuracy: The Mach 1 MAT machine is capable of trueing wheels with a high degree of

accuracy. This is important because even a small amount of misalignment can cause

vibration and premature wear on the wheel bearings.

 Speed: The Mach 1 MAT machine can true wheels quickly. This is important for shops that

need to turn around wheels quickly.

 Versatility: The Mach 1 MAT machine can be used to true a wide range of wheels. This

makes it a valuable tool for shops that work on a variety of vehicles.

 Ease of use: The Mach 1 MAT machine is easy to use. This is important for shops that need

to train new employees on how to use the machine.

Overall, the Mach 1 MAT machine is a valuable tool for wheel truing. The machine is accurate,

fast, versatile, and easy to use. These features make the Mach 1 MAT machine a good choice for

shops that need to true wheels quickly and accurately.

Here are some additional tips for wheel truing:

 Always start by checking the wheel for any obvious damage. If the wheel is bent or cracked,

it should not be trued.

 Use the correct truing tools for the type of wheel you are working on.

 Be careful not to over-true the wheel. Over-truing can cause the wheel to become weak and

prone to breaking.

 Once the wheel is trued, check it for balance. If the wheel is not balanced, it will vibrate

when it is rotating.

25
Fig. MAT

3.4. CONTROL FLOWCHART OF MAT:

Fig. CONTROL FLOWCHART OF MAT

3.5. C# HMI: An HMI (Human-Machine Interface) application based on C# and XAML, utilizing the

ADS (Automation Device Specification) protocol, provides a robust and intuitive interface for controlling an

automatic wheel truing machine called "MAT" that interacts with TwinCAT, a popular automation software

platform developed by Beckhoff.

The HMI application, following the MVVM (Model-View-ViewModel) architecture, does offer a visually

appealing and user-friendly interface, ensuring a seamless user experience.

26
Using the ADS protocol, the HMI application establishes communication channels with the TwinCAT

system. It leverages ADS libraries and APIs to read and write data to various components of the MAT

machine, such as motor controllers, sensors, and actuators. This enables real-time data exchange and control

between the HMI and the machine, facilitating precise and efficient wheel truing operations.

The HMI application displays critical information to the operator, such as wheel status, truing parameters,

and diagnostic data. Through intuitive graphical elements and interactive controls, it allows operators to

input desired truing parameters, initiate the truing process, and monitor real-time feedback from sensors

embedded in the machine. Visual representations, such as charts or gauges, provide live updates on the

wheel's lateral and radial deviations, enabling operators to make informed adjustments.

Additionally, the HMI application incorporates features such as alarm systems, event logging, and historical

data analysis. It provides configurable alarms to alert operators about abnormal conditions or error situations

during the truing process. Detailed event logs help track machine performance and troubleshoot any issues.

Historical data analysis allows operators to assess long-term trends, optimize truing parameters, and make

informed decisions for maintenance and process improvements.

The HMI application's flexible and extensible architecture allows customization to meet specific

requirements of the MAT machine. It includes advanced features like recipe management, user management,

and remote access capabilities. Recipe management allows operators to save and recall specific truing

configurations for different wheel types. User management ensures appropriate access levels and security

measures are in place. Remote access capabilities enable remote monitoring and control of the MAT

machine, enabling maintenance personnel to diagnose and address issues from anywhere.

In summary, the C# and XAML-based HMI application, utilizing the ADS protocol to communicate with

TwinCAT, provides effective control and monitoring of the MAT automatic wheel truing machine. Its
27
intuitive interface, real-time data exchange, and advanced features contribute to efficient and precise truing

operations, enhancing productivity and quality in wheel manufacturing or maintenance processes.

3.5.1. Mire View Screen: In order to enhance user experience and ensure optimal view of all elements, the

Mire view screen has been redesigned to be responsive to different sizes and orientations of the screens /

windows. This means that the screen and its elements dynamically adjust their sizes and positions in

proportion to the window dimensions, accommodating various screen sizes and resolutions.

To achieve this responsiveness, a key strategy employed was the utilisation of a view box for each individual

element on the screen. A view box acts as a container that allows elements within it to scale and resize based

on the available space. By placing every element within its respective view box, we have enabled them to

adapt and adjust their sizes relative to the dimensions of the window.

The implementation of view boxes ensures that all elements on the Mire view screen remain visible and

properly proportioned regardless of the window size. When the window is resized, the view boxes and their

contained elements scale and reposition accordingly, maintaining a cohesive and visually pleasing layout.

By adopting this approach, I have significantly improved the usability of the Mire view screen, providing

users with a consistent and optimized experience across different devices and screen sizes. This responsive

design approach contributes to a more engaging and user-friendly interface, allowing users to efficiently

interact with the Mire view screen without encountering any visual or functional limitations caused by

window size constraints.

28
3.5.2. LoginView Screen: As part of the efforts undergone to enhance user experience and ensure a

seamless interface, the Loginview screen has undergone responsive design adjustments to adapt to the size

of the window. This responsiveness enables the screen and its components to dynamically resize and

reposition themselves based on the dimensions of the window, ensuring optimal visibility and usability

across various screen sizes.

To achieve this responsiveness, a comprehensive approach was adopted. Each element on the Login view

screen was carefully evaluated and modified to fit within a flexible layout. By utilizing responsive design

techniques, the screen components can adjust their sizes, positions, and proportions to accommodate

different screen resolutions and aspect ratios.

Additionally, the Loginview screen had previously encountered a critical issue that led to application crashes

when attempting to edit and save the user's name. This issue has been thoroughly addressed, and the

29
necessary fixes have been implemented to rectify the problem. As a result, users can now confidently add

their names without experiencing any application crashes or disruptions.

The debugging and resolution process involved identifying the root cause of the crash and implementing

appropriate changes in the code. By analyzing the application's behavior during the name editing and saving

process, any problematic sections were identified and revised accordingly. Through rigorous testing and

validation, the fixes were verified to ensure that the application remains stable and functional even during

name editing and saving operations.

By combining responsive design techniques with the resolution of the name-editing crash, the Loginview

screen now offers an improved and reliable user experience. Users can seamlessly interact with the

application, confidently add their names, and navigate the responsive layout without encountering any

crashes or inconsistencies. These enhancements contribute to an overall smoother and more user-friendly

login process, catering to users across a wide range of device types and window sizes.

To edit a user's information, please follow these steps:

1. Begin by navigating to the login screen of the application.

2. Locate the "Admin" option and click on it to access the admin login interface. It's important to note

that only users with administrative privileges have the authority to edit user data.

3. Enter your admin credentials, including the username and password, and ensure their accuracy to

successfully log in.

4. Once logged in as an admin, you will notice a pencil-like icon prominently displayed on the

navigation bar or toolbar beneath the login screen. This icon represents the editing functionality for

user data.

5. Click on the pencil icon, triggering the appearance of a text box specifically designed for entering the

desired changes to the user's name.

30
6. Within the application, you will typically encounter a list or grid displaying the names of the existing

users. Select the user whose information you intend to edit by clicking on their name.

7. A text box will appear, allowing you to input the updated name for the selected user.

8. Once you have entered the desired changes, click on the save icon to apply and save the

modifications to the user's name.

Following these steps enables an administrator to successfully edit a user's information, such as their name,

ensuring accurate and up-to-date records within the application.

31
3.5.3. UserSettingView Screen: Issues which were fixed in Usersettingview screen with the resolution are

given below:

1. Size of Elements:

Issue: The elements on the User setting view screen were not responsive to the size of the window,

resulting in improper scaling and alignment of the components. This caused inconvenience and

readability issues for users accessing the application on different screen sizes.

Resolution: I implemented adjustments in the XAML code to make the elements responsive to the

window size. Through the use of layout containers such as Grid or Stack Panel with appropriate

properties like Width, Height, and Horizontal Alignment, the elements were configured to adapt to

different window dimensions. This ensured that the elements scaled proportionally and maintained proper

alignment, offering a consistent user experience across various screen sizes.

32
2. Uneven Headings:

Issue: The headings on the User settingview screen were inconsistently sized, leading to a lack of visual

harmony and inconsistency within the interface.

Resolution: I reviewed the XAML markup for the headings and made modifications to achieve

uniformity. By specifying consistent font sizes and styles within the Text Block controls or adjusting the

properties of the parent containers, the headings were aligned properly, enhancing the visual appeal and

readability of the screen.

3. Misaligned Labels:

Issue: The labels on the User setting view screen were not aligned correctly, resulting in a disjointed

appearance and potential confusion for users.

Resolution: I made necessary adjustments within the XAML code to ensure the proper alignment of the

labels. By utilizing properties such as Margin, Padding, or Vertical Alignment, the labels were aligned

consistently with the desired layout. These adjustments enhanced the visual cohesion of the screen and

improved the overall user experience.

4. Textbox Overflow:

Issue: Textboxes within the data column of the User setting view screen were extending beyond the

boundaries of the grid, causing a visual discrepancy and hindering the user's ability to interact with the

content.

Resolution: I addressed this issue by modifying the XAML markup of the textboxes. By setting

appropriate properties such as MaxWidth or Width and utilizing text wrapping or trimming techniques,

the textboxes were constrained within the designated grid area, preventing overflow and ensuring a more

organized and user-friendly presentation of the data.

33
5. Button Color:

Issue: The color scheme of the buttons within the data column of the User setting view screen was

inconsistent or not visually aligned with the overall theme of the application.

Resolution: I made necessary modifications within the XAML code to update the button styling and

ensure consistency. By adjusting properties such as Background or Foreground to match the desired color

scheme or theme, the buttons within the data column now blend seamlessly with the overall interface,

providing a more cohesive visual experience.

With the above fixes implemented, the User setting view screen now offers an improved user experience,

addressing the issues that were hindering usability and visual consistency. These enhancements contribute

to a more efficient and engaging user interface, accommodating different screen sizes and aligning with

the design principles established within the XAML markup.

34
3.5.4. Directory View Screen: To resolve this problem and ensure the stability of the HMI, I addressed the

issue by modifying the code responsible for writing the value of the variable to TwinCAT. Instead of

directly sending the wheel name to TwinCAT, I removed the command that performed this operation

entirely.

By eliminating the code responsible for writing to TwinCAT, we have mitigated the risk of encountering

exceptions and subsequently crashing the HMI when TwinCAT is not accessible or functioning correctly.

This modification ensures that the HMI remains operational, providing uninterrupted user interaction in the

Directory view screen.

35

You might also like