Skip to main content
PLOS One logoLink to PLOS One
. 2023 Oct 13;18(10):e0292814. doi: 10.1371/journal.pone.0292814

Implementing circularity measurements in industry 4.0-based manufacturing metrology using MQTT protocol and Open CV: A case study

Yazid Saif 1, Yusri Yusof 1, Anika Zafiah M Rus 1,*, Atef M Ghaleb 2,*, Sobhi Mejjaouli 2, Sami Al-Alimi 1,*, Djamal Hissein Didane 3, Kamran Latif 4, Aini Zuhra Abdul Kadir 5, Hamood Alshalabi 6, Safwan Sadeq 7
Editor: Nadeem Sarwar8
PMCID: PMC10575513  PMID: 37831665

Abstract

In the context of Industry 4.0, manufacturing metrology is crucial for inspecting and measuring machines. The Internet of Things (IoT) technology enables seamless communication between advanced industrial devices through local and cloud computing servers. This study investigates the use of the MQTT protocol to enhance the performance of circularity measurement data transmission between cloud servers and round-hole data sources through Open CV. Accurate inspection of circular characteristics, particularly roundness errors, is vital for lubricant distribution, assemblies, and rotational force innovation. Circularity measurement techniques employ algorithms like the minimal zone circle tolerance algorithm. Vision inspection systems, utilizing image processing techniques, can promptly and accurately detect quality concerns by analyzing the model’s surface through circular dimension analysis. This involves sending the model’s image to a computer, which employs techniques such as Hough Transform, Edge Detection, and Contour Analysis to identify circular features and extract relevant parameters. This method is utilized in the camera industry and component assembly. To assess the performance, a comparative experiment was conducted between the non-contact-based 3SMVI system and the contact-based CMM system widely used in various industries for roundness evaluation. The CMM technique is known for its high precision but is time-consuming. Experimental results indicated a variation of 5 to 9.6 micrometers between the two methods. It is suggested that using a high-resolution camera and appropriate lighting conditions can further enhance result precision.

Introduction

Recent advancements and automation in metrological systems have led to substantial improvements in measurement speed and accuracy. Metrology plays a crucial role in the manufacturing industry by ensuring quality control. It involves the measurement and inspection of machine parts, components, and assemblies to ensure they meet the required specifications. As manufacturing continues to evolve with automation, personalized production, and global expansion, its significance remains paramount. Vision inspection systems are extensively employed in industrial manufacturing environments to identify and address product defects. These systems examine product surface properties and identify potential defects using image processing methods. By using vision inspection systems, manufacturers can quickly and accurately detect defects, allowing them to take corrective action and prevent defective products from reaching consumers.

As manufacturing industries adopt advanced technologies and methods, they play a leading role in the implementation of 4.0 industry. This revolutionized the interconnection of various elements in the industry, allowing manufacturers to maintain competitive advantages in a world that is evolving rapidly and adapting quickly to customers’ needs. Manufacturing measurement is an important aspect of advanced manufacturing systems, which is rooted in Industry 4.0, as it covers the evaluation and evaluation of almost all machining components in specialized measurement systems. Thus, according to Berthold and Imkamp [1], Industry 4.0 provides metrology support in three key areas within the manufacturing sector: (a) smart supply chains with cyber-physical metrological traceability, (b) smart manufacturing incorporating cyber-physical metrology in manufacturing processes, and (c) smart products employing intelligent metrology.

As part of Industry 4.0, a smart metrology inspection planning system based on Coordinate Measuring Machines (CMM) has been developed. The system is structured around three artificial intelligence (AI) techniques, namely engineering ontology (EO), ant colony optimization (ACO), and general assembly simulation (GA) [2]. Metrological Technology Board (PTB) intend to focus on digital transformation, large-scale data analysis, and digitalization communication networks. Therefore, next stage of its Metrology for the Digitalization (MTD) project, innovative Metrology uses artificial intelligence (AI) technologies to create an updated metrological function for making critical decisions. Based on Lazzari [3]. A novel metrological model called the cyber-physical manufacturing metrology model (CP3M) was created specifically for the Industry 4.0 framework. Enhancements in inspection methodologies for measuring instruments rely on robust software assistance for various task categories, such as tolerances. The authors’ prior research focused on the development of an intelligent system for organizing PMP (Product and Manufacturing Process) inspections using a Coordinate Measuring Machine (CMM) [4, 5], a precise technique was created to determine an appropriate measuring path for a single. The implementation of consistent inspection for such devices is a unique challenge. The complexity of prismatic components, the inspection planner’s expertise and experience, and their perception all contribute to determining it. As stated by [6] key challenges encountered when defining the product and its measurements include the need to incorporate geometric dimensioning and tolerance (GD&T) data into CAD models, handling nonstandard GD&T information, and the lack of computer-readable (interpretive) and standardized definitions for measuring equipment capabilities, configurations, performances, and, etc.

According to the tentative review-based inspection of Closed-loop inspection manufacturing (CLIM) and computer-aided inspection planning (CAIP) has grown into a size approach that can examine industrial fashion in the industrial area [7]. However, CAIP is rushed in the device and will become a critical stage in the production system. As a result, a thorough literature review aims to evaluate current inspection studies and the use of CLIM in CNC machines. The review focuses on CAIP and CLIM, system-based technology, and the implementation of STEP/STEP-NC. In addition, the study provides a comprehensive taxonomy and defines advanced features of this emerging technology [7, 8]. Thus, the 3SMVI is a development of a smart system for machine vision inspection with STEP-NC environmental based on cyber-physical which capable of decision-making at a given moment [9]. The importance is placed on generating the ideal measurement sensor path as a whole section of prismatic parts inspection. It aims to eliminate intuition, presentation of knowledge, reuse and share of knowledge. Overall, computer vision technology has revolutionized the manufacturing industry by improving the quality control process, reducing costs, and increasing productivity.

This study aims to develop an IoT-based machine-vision system that can effectively and efficiently detect circular holes in surface characteristics during milling machine operations. The system implements the MZC problem solution technique to improve roundness measurement. A workpiece with circular features has been embedded in the IoT-enabled vision machine system. The vision machine includes a cloud server with a wireless router board and an intelligent camera sensor built into the Raspberry Pi 4. The primary objective of this study is to measure the surface characteristics of a DELRIN workpiece that has been milled using a non-contact inspection approach that employs an in-situ CMOS camera for circle hole inspection. The focus of the study is on the development of a smart system called 3SMVI (interpreted STEP-NC file for machine vision inspection) for offline measurement and real-time inspection using a coordinate measuring machine (CMM). This article is organized: Section 2 addressed the related research for machine vision systems; Section 3 defines Methodology, Setup and Procedure, The Method for Determining the Shape of a Circler Form, the proposed experimental setup and procedure, and the implementation of 3SMVI through MQTT Section 4 discusses an Image processing implementation Algorithms. Sections 5 and 6 represent the advancement of Vision System with Computer Algorithm and utilize the Coordinate measuring machine (CMM) method, along with the outcomes. Results and discussion are addressed in section 7. Finally, the authors’ conclusion and future trends are outlined in Section 8.

Previous studies in vision inspection system

The manufacturing industry has long sought to develop a system that could observe and describe whatever it observed. The key reasons a computer should not necessarily seek to duplicate the human visual system are speed, cheap cost, and significant dependability. This idea became known as machine vision in the industrial sector [10]. Computer vision that is employed in manufacturing or beyond practical uses is known as machine vision. It is utilized to execute a particular feature or performance based on the vision system on picture analysis. As a result, automated extraction of vital information from digital photographs to measure operations or examine produced manufactured. Computer vision has become increasingly important in regulated industrial applications over time, and it now offers innovative approaches for the sector of industrial automation. Computer vision applications have greatly assisted a number of industries, including the manufacturing of electronic components, including more effective manufacturing processes [11, 12], fabric defect and detection inspection [12], automated food sorting system or techniques [1315], flexible automated assembly systems [16], incorporating circuits inspection [17]. Machine vision systems are often classified into four categories [18]: automatic visual inspection systems, parts recognition, robotic supervision, and process control.

Machine vision-based defect detection

In recent years, there has been an increase in interest in implementing computer vision systems in industrial workplaces to detect product defects. These systems use various image processing techniques to analyze the features and surface of the model, providing valuable information to the experts. Advanced industrial systems necessarily involve ever-improving product performance and improved product quality during the production process [1921]. Defects, such as scratches, imperfections, or holes on the products surface, on the other hand, have an adverse influence mainly on the products aesthetics and user comfort, but also its performance [2225]. Therefore, Defect detection is an efficient strategy for minimising the environmental effects of product defects [2628]. Machine vision systems have the potential to assist in various tasks within industrial processes [2931].

An industrial vision inspection system typically comprises essential components such as optical illumination, image acquisition, image processing, and defect detection. These components work together to improve the inspection and detection of defects in industrial settings [32, 33]. This research aims to create an intelligent system that automatically interprets and measures surface characteristics according to Example 1 Part 21 of the ISO 14649 standard, utilizing machine vision inspection (3SMVI). The 3SMVI system will be developed using a camera and lighting system on a milling machine. The primary purpose of this system is to enable the non-contact inspection of circular holes, making it easier to measure surface features on milled workpieces [9, 34]. The 3SMVI system has become a commonly utilized tool for surface measurement and inspection. This article investigates the growing utilization of camera systems to verify the precision of surface features in both design and measurement processes. It also discusses the challenges of measuring roundness in circles using vision and validates the system based on IoT.

Materials and methods

The methodology used for developing the vision system of 3SMVI integrated with IoT, which contrasts current approaches. The fundamental concept and architecture of the 3SMVI system are outlined, and the advancement of the visual system based on the system structure is described. The objective of this research was to develop intelligent systems capable of conducting machine vision inspections in IoT environments by utilizing measurement data. These systems were implemented using an interpreted file derived from ISO 14649 Example 1 Part 21. The system developed facilitates the conventional 3-axis CNC milling machine with a complete vision system architecture.

Method for determining the shape of a circler

The surface of any engineering component provides insights into its structural characteristics, which primarily include three aspects: form errors, roughness, and waviness. Straightness, flatness, and circularity (roundness) are critical requirements that need to be satisfied during the assembly and mating of various parts. Out-of-round (OOR) refers to the difference between the actual radius of a circle and the measured radius at each location. Roundness measurement, as per the ANSI Y 14.5M (1994) standard, commonly involves four reference circles: The Maximum Inscribed Circle (MIC), the Minimum Circumscribed Circle (MCC), and the Minimum Zone for Circles (MZC). The recommended method for measuring roundness, according to established standards, is the Minimum Zone for Circles (MZC). This method generates more consistent results compared to other approaches and aligns with the standards set by ANSI and ISO. For roundness measurement, four reference circles are globally recognised in (ANSI Y 14.5M, 1994), according to [3537]. ASME Y14.5M-1994 and ISO 1001, roundness assessments based on MZC include identifying primary circles that include all profile points and ensuring the minimum radiation difference between these circles. Therefore, this section will focus on the roundness approach, which follows the minimum radius circle area (I) of Section 1.

Minimum zone circles

The roundness error calculation method involves comparing two circles. (Fig 1) illustrates the process, where an outer circle is drawn to encompass the entire circularity profile, and an inner circle is drawn within the roundness profile to match the shape. The minimum radial distance between these two concentric circles, known as the circumcised and inscribed circles, is measured. Subsequently, the center of the minimum zone circles, which corresponds to the center of the measured form, is determined. Because the radius of the minimal zone circles varies from one another, the profile is rounded [38]. Thus, the minimal radial separation is the roundness inaccuracy of the MZC approach.

Fig 1. Principle of algorithm for Minimum Zone for Radial Circle (MZC).

Fig 1

R1R2(xixc)2+(yiyc)2R1(xixc)2+(yiyc)2R2,i=1,2,3,nR1R20RLRRU;xLxcxU;yLycyU (1)

The roundness error, which represents the minimum radial separation, is determined by the difference between the radii of C1 (indicated as R1) and C2 (indicated as R2), which share the same center coordinates (x, y). It is mathematically formulated as

eMZC=RmaxRmin (2)

Experimental setup and procedure

The investigational configuration comprises of a combination of hardware and software that enables non-contact roundness measurement through a vision system. To ensure accurate measurements of the workpiece, LED lighting is utilized to eliminate shadowing that may result in the loss of pixels during capturing. Additionally, the measuring system involves a servomotor that rotates the test model or workpiece.

Case study

The vision system design was specifically adapted to the 3-axis ProLIGHT 1000 CNC milling machine and adheres to the guide lines contained in the ISO 14649 Part 21 file. The aim of choosing the model based STEP-NC due to the growing global manufacturing industry, ISO 10303 and ISO 14649standards, known as STEP and STEP-NC, have been developed to improve interoperability and streamline the planning and manufacturing of discrete components, especially in milling and turning machines centers, that could meet the dynamic demands of industrial production. Through extending the reference model that complies with STEP-NC File 21 and assigning priority to the identification of inspection holes and surface areas in the CAD model, it can improve the overall precision and quality assurance paradigm of CNC milling machines. Thus, the CAD model correctly designed by CATIA software using the surface shape of the model, particularly in the four holes that require specifically inspection the surface area. A certain circle is strategically used to cover a considerable portion of the surface of the model. This technique facilitates the accuracy of measurements of surface properties. However, the extended model enhanced the version of the ISO 14649 Part 21 File, which wisely includes four holes and additional pockets, as shown in (Fig 2). The following example expands deeply into the specifics of the DELRIN prismatic workpiece’s machining parameters and emphasizes the presence of round holes with diameters of 22mm. The operational parameters are set carefully: the spindle speed is calibrated at 2000 rpm, the feed rate is harmonized to 0.1 mm/rev, the cutting depth is firmly set at 20 mm, and the cutting speed is judiciously maintained at 250 m/s.

Fig 2. Part design of Delrin mild workpiece.

Fig 2

The guidelines for developing the STEP-NC code of standardization for milling CNC machines are exactly what is identified in this machine’s parameters. However, this data could be applied by a PROLIGHT 100 CNC milling machine to drill the four holes in the Delrin workpiece in accordance with the standards to obtain better surface features after the product’s manufacturing is achieved. Table 1 summarises the key aspects of the machining part, the supporting machining parameters, the characteristics of the cutting tool, and the measuring machine specifications.

Table 1. Characteristics of parameters and specifications for mild Delrin model.
Machine characteristics Parameter Specification
Machine part Workpiece Delrin
Size 125x100x50mm
Machining Feed rate 0.1mm
Spindle speed 2500rpm
Depth of cut 22mm
Four Circle diameter 22mm
Cutting speed 250m/s
Cutting tool Material type High-speed steel
Diameter 0.6mm
Number of flutes 2
Tool type New tool
CMM measurement Number of axes Three axis’s X, Y&Z
Machine type MITUTOYO QM- 353
Resolution 0.00002
Accuracy Highly
Flexibility Moderate

3SMVI system coordination and calibration

The 3SMVI interface program calculates pixel size in the x and y-axis based on the actual size of the extanded model based on STEP-NC Example 1 Part21 file. It calculates the maximum diameter of the outer edge of the circle, examines the inner contour’s edge pixels, calculates a calibration element in the x-direction (CFx), and generates a calibration element in the y-direction (CFy). The program multiplies all edge pixels’ x and y coordinates by these values. This method can be used to derive a fundamental roundness circle error. Therefore, the coordinate system, defined by a reference point origin and angle within an image, allows for a search area based on the object or model’s characteristics. Pattern matching locates surface features, creating an accurate coordinate system. A region of interest (RoI) is defined for analysis. Moreover, the camera system was calibrated using a linear model that ignores lens distortion, focusing on the relationship between the three-dimensional geometry of a point on the workpiece’s surface and its equivalent point in the image, with four coordinate systems for images and pixels.

In Industry 4.0 environments characterized by heterogeneity, the proposed MQTT solution plays a pivotal role in tackling interoperability challenges. MQTT’s flexibility and protocol-agnostic nature make it adept at handling various sensor types, data formats, and communication protocols. By decoupling producers and consumers through its publish-subscribe model, MQTT allows different sensors to communicate seamlessly, reducing the need for extensive protocol translation or adaptation. Section 3.3 elaborates on the hardware and software development, dedicating subsections 3.3.1 and 3.3.2 to hardware and software design, respectively. Furthermore, section 3.4 the MQTT Installation Python and section 3.5 outlines the communication aspect of 3SMVI using MQTT in IoT applications., and specifically discusses the combination process involving the Cloud server and the MQTT communication protocol.

Hardware and software of development system

3SMVI hardware development

The 3SMVI system is a hardware-based vision inspection system that incorporates various components, including a digital webcam, power supply, internet adapter, lighting system, step motor, personal computer, and driver. Experimental tests conducted at the Advanced Material and Manufacturing Center Lab (AMMC) in UTHM demonstrated the webcam’s capability to capture surface feature images of up to 5 megapixels with a resolution of 640x480. Based on the hardware deteiles adressed as the folowing:

  • A digital webcam utilized in this study with specification CMOS sensor, Global shutter Resolution: 640X480MJPEG 30fps (5 MP).

  • A power supply set in a 3SMVI system, also called a power distribution box, makes it easier to manage power for numerous cameras at one location. With some having manual or automatic input voltage selection, it converts AC to low-voltage DC power for computer components.

  • Network adapters enable computers and other devices to communicate with the Internet or other local area networks (LANs) in 3SMVI. Wireless network adapters for laptops and tablets convert computer signals into radio waves.

  • Implementing the lighting system for the 3SMVI platform was challenging due to the significant impact it has on the system’s performance and quality, necessitating standard steps to improve the contrast images captured.

  • The stepper motor has the ability to divide a single full rotation into a series of smaller (and essentially identical) rotational components. It could be utilized to instruct the stepper engine to rotate or move at a specific angle or degree for practical purposes.

  • The personal computer was an Intel(R) workstation with a Core (TM) i7 processor and 512 MB of storage that the 3SMVI used.

  • A driver has emerged as a component of software that facilitates communication between a device and the operating system. Consider a scenario where an application needs to read data from a device.

The system is designed to support IoT and integrates elements such as FileZilla, Raspberry Pi, camera interface, LED lighting, and Wi-Fi router. Proper configuration of lighting is essential to ensure high-quality image capture for inspection purposes. With its hardware and software components, the system enhances monitoring, enables measurement in specific areas of interest, and facilitates connectivity with cloud servers, making it well-suited for industrial 4.0 applications.

  • The FileZilla component, renowned for its adeptness in secure file transfer, assumes a pivotal role in this ecosystem. By enabling seamless and secure data exchange, it lays the foundation for effective communication within the IoT network.

  • Furthermore, the inclusion of the ’Raspberry Pi,’ a versatile microcomputer, serves as the backbone of computation and connectivity. Its compact yet robust architecture empowers the system with processing capabilities, rendering it adaptable to a plethora of tasks.

  • The ’camera interface’ element signifies the integration of visual perception into the system. Through this component, the system gains the ability to capture and interpret visual data, a crucial facet for applications such as surveillance, analysis, and real-time monitoring.

  • The LED lighting emerges as more than just illumination; it assumes a role in signaling, status indication, and even data transmission. Its controllable and programmable nature makes it a versatile tool in conveying information within the IoT framework.

  • The Wi-Fi router stands as the linchpin connecting all these elements cohesively. By providing wireless connectivity, it facilitates the seamless exchange of data between various components, fostering the harmonious functioning of the IoT ecosystem.

One application of the 3SMVI system involves measuring the roundness of holes in DELRIN workpieces created using a CNC milling machine. The system rotates the workpiece in the Z-direction using the spindle module to inspect the circularity of the holes. The research paper describes the rotational orientations of the hole’s rotation as observed from the +Z-direction. The top vision module, depicted in (Fig 3), consists of an Imaging Source DMK41BUC02 complementary metal-oxide-semiconductor (CMOS) camera and a vertically positioned LED light ring illuminator. These components are mounted on a gantry-type frame, with the camera axis aligned along the Z-direction of the 3SMVI system. Fine adjustments can be made to the position and focus of the top CMOS camera in the Y- and Z-directions. (Fig 3) illustrates the experimental setup of a cloud-based MQTT system for the 3SMVI prototype, developed based on Part 21 of the ISO 14649 standard and utilizing the INTELITEK PROLIGHT 3-axis milling machine. The 3SMVI system was specifically designed to enable accurate inspection of various models and workpiece components.

Fig 3. The implementation of 3SMVI system.

Fig 3

Software development for 3SMVI

The 3SMVI software is designed to enable the development of a smart system for machine vision inspection using the STEP-NC environment and an IoT application. It consists of various components that promote integration and interoperability among devices.

The vision inspection system comprises four main parts: a data diffusion mechanism, operational modules, a data model, and a computational intelligence algorithm, as depicted in (Fig 3). OpenCV was utilized to develop four inspection modules, allowing for the detection and measurement of surface feature dimensions in the model. These modules were implemented within the STEP-NC environment, and a software-based IoT architecture was integrated to ensure comprehensive inspection functionality. The four modules include the measuring module, image processing module, image analysis module, and measured identification module. The machine vision component of the software utilizes the Open CV library, implemented in Python and compatible with the Raspberry Pi 4 microcontroller board. All modules are fully operational, providing visualization of the inspection process and delivering the required geometric dimensions.

MQTT Installation python

The MQTT protocol is a machine-to-machine (M2M) IoT connectivity protocol for sending data from IoT devices to cloud service providers like Microsoft Azure. It’s ideal for remote interactions with a small code footprint and higher network bandwidth. Python swiftly uses the MQTT route essence, with two computers as clients and one as a broker. One of our computers serves as a broker. Identify an IP as a module and publisher for sending information to the MQTT broker. However, a publisher was a computer. The MQTT python program would seem to be a light and robust process to install and run. When accessing MQTT in Python, it may employ the popular library "paho-mqtt." The paho-mqtt library is used to install and use MQTT in Python. The folowing steps addressed below:

  • Python Installasion: make sure that the downloading python to the system form official website.

  • Install the “paho-mqtt” using pip from package manager to install library of paho-mqtt and openthe termenal or command promot to run into the system as folowing command: “pip install paho-mqtt”.

  • Start to write the Python code and use the MQTT functionality to publish data and subscripe it.

  • By relpacing the proker address and port based on IP and port number of the MQTT broker.

  • Then, run the code and save it. It will connect to the MQTT broker, subscribe to the specified topic, publish a message, and print received messages.

Application for 3SMVI within MQTT-based communication with Internet of Things

IBM established the MQTT messaging protocol for consumer-oriented applications. Its utilization of it has grown significantly over time in a variety of industries, including office automation, home automation, and health services.

MQTT emerges as a favorable choice for facilitating machine-to-machine communication, presenting notable distinctions from other protocols such as OPC-UA, MT Connect, AMQP, and CoAP [8]. CoAP was constructed using UDP or HTTP as the primary transport protocol [39, 40], but MQTT depends on TCP or IP. MQTT boasts several distinct advantages, including its capacity for streamlined data transfer, minimized bandwidth usage, and adept handling of scenarios characterized by high latency or unstable network connections. Research conducted by Rocha et al. [41] has demonstrated the applicability of MQTT (Message Queuing Telemetry Transport) for low-power and low-latency applications, especially on wireless devices like smartphones. MQTT is known for its lightweight nature and cost-effectiveness, utilizing a central broker to facilitate communication between clients. Moreover, MQTT exhibits versatility by accommodating both wired and wireless connections, showcasing efficiency through its minimal memory requirements. For applications demanding heightened precision and reliability, MQTT offers a Quality of Service parameter. This protocol enjoys widespread support across prominent IoT platforms, counting among its proponents industry giants such as IBM, Microsoft, Amazon, and LabVIEW.

In the Python programming language, a Paho-MQTT client library has been developed, enabling the testing of client-to-MQTT functionalities on the Raspberry Pi 4. Clients can subscribe to specific topics and communicate through these topics without the need for any system configurations when connected to the broker’s IP address. In the context of this study, the Paho-MQTT library is employed to publish data from each camera sensor, while the Raspberry Pi acts as a wireless communication broker. Internet connectivity is established by connecting the Raspberry Pi to the internet via a Wi-Fi adapter, with a wireless router being utilized to provide internet access. The network system depicted in (Fig 4) allows devices such as the Raspberry Pi, laptop, computer, and smartphone to access the same IP address and communicate with each other. MQTT specification outlines control packets and codes; extended codes in Appendix A in S1 File.

Fig 4. A network graphic represents IP addresses.

Fig 4

The IoT-based inspection software develops three main layers: perception layer, networking layer and application layer. Therefore, the IoT architecture-based vision inspection device enables the CNC operation model to be sensed by the camera sensor, transmitted to the cloud-based MQTT server, and sent back to open CNC PCs through seamless Integration and communication.

The Perception Layer is the intelligent device layer or senses or activators [42]. It senses and gathers information around it and subsequently transfers it to the communication layer. In this study, there are three categories of device, like the following:

  • The camera sensor was the device for sensing and capturing the surface feature of the model produced by the CNC milling. In order to capture an accurate product, the LED illumination can reduce the shadow of the model.

  • Paho-MQTT class provides the Paho-MQTT to import Python code from the library, which must have the line of code "Import paho.mqtt.client as mqtt." This client must have a unique ID and the mqtt.Client() method can be used.

  • Raspberry Pi was a broker that enables the server to accept information from the Wireless Adapter and to transfer it to the Web browser from the RealVNC server.

The Network Layer ensures that data from the camera sensor to the application layer are sent and processed via optical sensors’ connectivity and network servers. In the current study, communication between the camera sensor, the software and the Raspberry Pi (network device) capable of connecting and verifying the MQTT test broker, and finally to the application layer, was performed as shown in (Fig 5). Three sections were involved in the MQTT information chain:

Fig 5. The MQTT test broker with Python program.

Fig 5

  • Publisher was where it would generate the capturing images and send information to the MQTT broker. The camera sensor gathers images of the model’s surface data as an information generator. The camera sensors were connected with a Raspberry Pi that serves as a gateway.

  • The MQTT Broker was the critical point of communication and was responsible for sending all messages between senders and eligible receivers. The cloud-based MQTT broker operates as a gateway.

  • Subscribing to topics requires a special method called a "callback" and using the function below "ourClient.subscribe(“AC_unit”)".

The Application Layer can provide the end-user or the end platform with relevant information about an intelligent device or camera sensor. The application layer was separated into two layers in the current study: the service and interface layers. Hence, the service layer offers the information as a visualization, while the interface layer is intended to interface the information. This study includes an Open CV in the service layer and a Real Virtual Network Computing (RealVNC) viewer in the interface layer. The interface layer acts as an interface to inspect the perspective, emphasizing roundness holes’ information transferred in real-time from the open cv platform to the cloud server using an Open CV platform-operated CNC milling PC.

Image processing implementation and algorithms

Pre-processing has the primary objective of enhancing specific texture features and eliminating unexpected distortions to improve image data. The objective of this stage is to prepare the image data for subsequent development phases. The visual sensor image may contain various imperfections such as noise, glare, or blurriness. (Fig 6) illustrates a sample image obtained from the vision system. To ensure smooth progression through the operational modules, the inspection system utilizes algorithms for image processing, image analysis, computational intelligence, and measurement identification. For example, when dealing with a grayscale fingerprint image, it needs to be converted to pure black and white without any background interference for further processing. Additionally, image calibration is performed by adjusting the RGB settings in the camera’s software to align the colored measurements with the corresponding reference image using a color tester image. Hence, the extended codes are accordingly found in Appendix B in S1 File for image processing.

Fig 6. Implementation of image processing technique.

Fig 6

Automated data acquisition from 3SMVI vision

This roundness measurement technique enables automated data acquisition by utilizing a machine vision system. The workpiece is rotated at specific intervals, and a high-end Webcam camera, positioned directly in front of the object at a 90-degree angle, captures images. During each measurement cycle, 330 images are taken of the target area. The workpiece rotation is achieved using a 2-phase stepper motor controlled by an Arduino board, which offers enhanced resolution due to its smaller step angle and sufficient torque. The application establishes connections with MQTT clients through internet connectivity, using the client’s IP address as (IP:192.168.0.119), and port number as (21) to transffer the data through visual network computing (VNC). The VNC module serves as the primary interface for the machine vision platform, displaying image files. (Table 2) presents the surface feature of a hole pocket, including four circle hole diameter values (22 mm each), generated at various angles ranging from 0 degrees to 360 degrees within the 3SMVI vision system. The standard circular error in micrometers for each hole was also calculated.

Table 2. Diameter values from vision system for mild Delrin workpiece.

Image. No Angle in degree Hole 1 Dia. 22 mm Hole 2 Dia. 22 mm Hole 3 Dia. 22 mm Hole 4 Dia. 22mm
1 22.2693 22.1297 21.9897 21.9432
2 31° 22.2473 22.1209 21.9797 21.9392
3 62° 22.2695 22.1211 21.9808 21.9421
4 93° 22.2581 22.1231 21.9801 21.9399
5 124° 22.1902 22.1223 21.9808 21.9447
6 155° 22.2491 22.1219 21.9891 21.9452
7 186° 22.2506 22.1191 21.9756 21.9391
8 217° 22.2479 22.1276 21.9822 21.9389
9 248° 22.2459 22.1216 21.9814 21.9385
10 279° 22.2397 22.1203 21.9823 21.9432
11 310° 22.2689 22.1201 21.9799 21.9422
12 360° 22.2676 22.1209 21.9816 21.9498

Cyber-physical systems in an IoT environment, for 3SMVI system

After establishing the connection, the VNC module is responsible for displaying the image file, while Module 1 acts as the primary interface of the 3SMVI system. In (Fig 6), it can be observed that Module 1 showcases a comprehensive description of the machine vision platform and the corresponding image file. The design of the system prioritizes the organization and transmission of logical data sets to various clients, encompassing smart devices such as tablets, smartphones, and workstation PCs. This is achieved through the utilization of both the visual network and MQTT broker. By adopting this structure, the system can effectively capture and articulate the cyber-physical characteristics involved in machine vision inspection, thereby facilitating a detailed analysis of the inspection process.

Module 2, coded in the Python programming language, is in charge of identifying and studying circular shapes present on the model’s surface attributes. Module 3 introduces the machine vision inspection interface, which exhibits the precise positioning of the model along the X and Y axes. It also defines ’resolution’ as ’pixels per inch’ to ensure optical clarity. Module 4 highlights the auto-mode frame configuration within the 3SMVI system. This mode empowers the system to autonomously execute and scrutinize image data associated with a particular surface attribute. It accomplishes this through a modified script reliant on OpenCV. The measurements acquired through this analysis are presented in millimeters (mm), with a minimum threshold established at 0.2. The threshold parameter regulates the image’s level of clarity, as demonstrated in Fig 7. This frame pattern underscores the system’s adaptability, granting users the capability to rotate the model or halt the analysis by pressing the ’Q’ key.

Fig 7. The 3SMVI system’s interface for obtaining measurements.

Fig 7

The 3SMVI integration

This research endeavor aimed to create an innovative solution by developing an intelligent system that utilizes interpreted STEP-NC files for conducting machine vision inspections within an Internet of Things (IoT) framework. The primary focus of this endeavor was to seamlessly merge the processes of machining and inspecting the roundness of milled workpieces. This integration was achieved by implementing the system on a PC-based CNC machine, which was connected to a cloud platform. The entire operation was facilitated through the utilization of Open CV technology, leveraging the novel approach of IoT.

In this setup, each individual device and machine vision module was interconnected through a shared IP address as (IP:192.168.0.119), enabling wireless communication via the internet. This architecture capitalizes on the IoT paradigm, facilitating the integration of inspection procedures and enabling effective communication through a central server broker. Particularly, the IoT approach presented a unique opportunity to establish a cohesive link between the various components involved. A fundamental aspect of this approach involved the utilization of interpreted STEP-NC files derived from the CNC machine. These files contain valuable information related to machining processes. In this context, the camera device played a crucial role in capturing relevant data from these interpreted files. Subsequently, this information was relayed back to the server cloud, which served as the foundation for the IoT-based application rooted in the principles of STEP-NC. In essence, this study’s achievement was the successful development of a smart system that harnessed the power of IoT to integrate machine vision inspections within the realm of CNC machining.

Developing computer vision algorithms

The SMVI system’s proficiency in accurately measuring holes within the workpiece’s surface feature hinges upon the selection of appropriate algorithms. These algorithms, tailored to detect and characterize the unique attributes of holes, form the backbone of the measurement process. For instance, edge detection algorithms can meticulously outline the hole’s contours, enabling precise quantification. The Canny algorithm was the best, most successful, and most commonly used for detecting edges since it has various parameters that can influence the algorithm’s speed and efficacy in edge detection. This model employs the Hough transform algorithm to detect round circles. It isolates features of specific shapes within images, using extended Hough transforms when simple analytic representations are impossible. Basic Hough transforms are most commonly used for regular shapes, lines, and circles. Therefore, innovative methods that combine multiple algorithms, such as edge detection, can improve the accuracy and robustness of hole measurement. This ensures that algorithms align with SMVI system objectives for high-quality results by balancing algorithmic capabilities, computational resources, and workpiece surface complexities.

The following stages may be used to summarise the image processing methods that were employed in this study: Definition of an algorithm for processing images. Require: acquired by the machine vision system are RGB images. Verify The size of the workpiece’s circle and the reference point’s auxiliary lengths.

Algorthums structure

  1. Transform the RGB images into grayscale format.

  2. Apply image undistortion using the specified model parameters.

  3. Utilize to detect and extract edges in the images with Canny operator.

  4. Locate and detect the five pattern circles within the Derlin workpiece using the Circular Hough Transform method.

  5. Define the main round holes based on the object model.

  6. Rectify and adjust the position of all the detected circles.

  7. Compute the segmented areas of the dimensions roundness within round holes.

  8. Convert the data of measured circle obtained from the camera into virtualized points compatible with the IoT environment.

  9. Present the obtained results on the Visual Network Computing interface for display and analysis.

Once the RGB image is obtained, a threshold value is applied to differentiate the target region from its background in color photographs. The resulting output pixel value is determined based on the corresponding input pixel value. Such operators can be utilized in tasks such as edge detection, color manipulation, and adjustments of brightness and contrast. Image quality plays a significant role in both human and machine vision, making it an important aspect of image processing. As part of the study, a comprehensive database of workpiece samples was created, consisting of approximately 330 images that showcase various surface characteristics. This dataset includes the enhanced Part 21 file ISO14649, which incorporates five roundness holes for analysis and evaluation.

Coorinate measureming machine (CMM)

The machine tool and measurement system integration has improved. Measurement methods have improved in efficiency and accuracy due to the benefit of more sophisticated processing capabilities [43]. The Mitutoyo QM-Measure 353 and the QM-353 manual CMM device were used to test identical specimens or workpieces. The roundness of the holes in the DELRIN workpiece was measured using the CMM measurement procedure. The results obtained from the MITUTOYO QM-Measure 353 are presented in (Fig 8). According to K. Swanson et al. [44], the MITUTOYO QM-Measure 353 is a highly precise tool for measuring roundness holes. Its specifications include a measuring range of 20" in the X-axis, 12" in the Y-axis, and an operating envelope of 20" x 12" x 12". The resolution of the device is 0.00002", with a maximum work height of 16.14" and a maximum work weight of 66 lbs. The overall dimensions of the device are L = 33", W = 35", and H = 88".

Fig 8. Flow chart of MITUTOYO device for contact measurements of CMM.

Fig 8

The positions in each circle are designated in (Table 3) as A, B, and C for holes with diameters of 22, 22, 22, and 22 mm, respectively. The MITUTOYO QM-Measure Coordinate Measuring Machine (CMM) uses a contact probe to detect measurements of the surface characteristic of each hole’s roundness.

Table 3. Measurement value of case study in 4 holes diameter from CMM for mild Delrin specimen.

Image No. Points Hole 1 Dia. 22 mm Hole 2 Dia. 22 mm Hole 3 Dia. 22 mm Hole 4 Dia. 22 mm
1 A, B, C 22.0685 22.0087 22.0349 22.0068
2 A, C, B 22.0673 22.0095 22.0374 22.0072
3 B, A, C 22.0665 22.0092 22.0391 22.0079
4 B, C, A 22.0684 22.0052 22.0346 22.0062
5 C, A, B 22.0652 22.0061 22.0378 22.0075
6 C, B, A 22.0681 22.0039 22.0385 22.0085
7 a, b, c 22.0657 22.0047 22.0364 22.0082
8 a, c, b 22.0674 22.0071 22.0358 22.0077
9 b, a, c 22.0651 22.0064 22.0366 22.0061
10 b, c, a 22.0679 22.0063 22.0356 22.0089
11 c, a, b 22.0668 22.0041 22.0351 22.0081
12 c, b, a 22.0682 22.0054 22.0367 22.0092

Results and discussion

(Table 4) explains the surface feature diameter of case study envisioned with the four roundness circles of the absolute model of Example 1 Part21 file based ISO14649, developed using the 3SMVI vision system. Likewise, (Table 5) shows the points identified by probing the measurements gained of the surface feature of four roundness holes of the workpiece developed by MITUTOYO QM-Measure CMM.

Table 4. Diameter values based on MZC for mild Delrin specimen in vision system.

Image No. Angle in Degree Mild Delrin Hole 1 Dia. Mild Delrin Hole 2 Dia. Mild Delrin Hole 3 Dia. Mild Delrin Hole 4 Dia.
22mm 22 mm 22 mm 22 mm
1 22.2693 22.1297 21.9897 21.9432
2 31° 22.2473 22.1209 21.9797 21.9392
3 62° 22.2695 22.1211 21.9808 21.9421
4 93° 22.2581 22.1231 21.9801 21.9399
5 124° 22.1902 22.1223 21.9808 21.9447
6 155° 22.2491 22.1219 21.9891 21.9452
7 186° 22.2506 22.1191 21.9756 21.9391
8 217° 22.2479 22.1276 21.9822 21.9389
9 248° 22.2459 22.1216 21.9814 21.9385
10 279° 22.2397 22.1203 21.9823 21.9432
11 310° 22.2689 22.1201 21.9799 21.9422
12 360° 22.2992 22.1199 21.9805 21.9498
Rcmax 22.2992 22.1297 21.9897 21.9498
Rcmin 22.1902 22.1191 21.9756 21.9385
Roundness Circle Hole Error in mm = Rmax—Rmin 10.9μm 10.6μm 14.1μm 11.3μm

Table 5. Diameter values based on MZC for mild Delrin model from contact approach (CMM).

No. of Point. Points measuring Mild Delrin Hole 1 Dia. Mild Delrin Hole 2 Dia. Mild Delrin Hole 3 Dia. Mild Delrin Hole 4 Dia.
22 mm 22 mm 22 mm 22 mm
3 A,B,C 22.0685 22.0087 22.0349 22.0068
3 A,C,B 22.0673 22.0095 22.0374 22.0072
3 B,A,C 22.0665 22.0092 22.0391 22.0079
3 B,C,A 22.0684 22.0052 22.0346 22.0062
3 C,A,B 22.0652 22.0061 22.0378 22.0075
3 C,B,A 22.0681 22.0039 22.0385 22.0085
3 a, b, c 22.0657 22.0047 22.0364 22.0082
3 a, c, b 22.0674 22.0071 22.0358 22.0077
3 b, a, c 22.0651 22.0064 22.0366 22.0061
3 b, c, a 22.0679 22.0063 22.0356 22.0089
3 c, a, b 22.0668 22.0041 22.0351 22.0081
3 c, b, a 22.0682 22.0054 22.0367 22.0092
Rcmax 22.0685 22.0095 22.0391 22.0092
Rcmin 22.0651 22.0039 22.0346 22.0061
Circle Hole Error in mm = Rcmax—Rcmin 3.4μm 5.6μm 4.5μm 3.1μm

As a result, (Fig 9) represents the data diameters in each point consistent and anticipated with the varied angles ranging from 0° degrees to 360 degrees of angularity. In addition, it has shown the data in red color decrease as the minimum value in three measurements. As a result, (Fig 10) demonstrated the data diameters in each point consistent and predictable with the varied points such as (A, B and C), (a, b and c). In addition, it showed the data in red color as the minimum value measurements intended to be the best value than vision system. However, the contact approach, while capable of producing precise results, the data acquired is more time-consuming than the 3SMVI system. Thus, the critical issue with contact type is wear and tear between the workpiece and the measuring probe.

Fig 9. Non-contact measurement data in 3SMVI for mild Delrin.

Fig 9

Fig 10. Contact measurement data in CMM for mild Delrin.

Fig 10

Inspection measurement comparison and discussion for a case study using the 3SMVI system and a CMM

(Fig 11) describes the accurate measurement data of four roundness circles in Case Study, comparing the outcome between contact and non-contact approaches. Hence, the dimension of the roundness circles shows the data from the contact approach has precise value in holes 1 and 2. Moreover, the data obtained from non-contact show highly precise that contact in roundness circles of hole 3 and hole 4. However, the data of roundness circles have as illustrated separately based on each hole, as shown in (Fig 12).

Fig 11. Comparing the data on the diameter of the contact and non-contact circles.

Fig 11

Fig 12. A comparison between non-contact and contact measurement values for each hole in a mild Delrin workpiece in a specific case study.

Fig 12

(Table 6) illustrates the comparison of the best data of roundness measurement within three points based on the method of MZC for contact and non-contact approaches. Therefore, the minimum measure of roundness circles is addressed in green colour.

Table 6. Comparison of diameters measured by contact and non-contact MZC method for Delrin workpiece.

22mm 22mm 22mm 22mm
Contact Non-Contact Contact Non-Contact Contact Non-Contact Contact Non-Contact
22.0651 22.1902 22.0039 22.1191 22.0346 21.9756 22.0061 21.9385
22.0652 22.2397 22.0041 22.1199 22.0349 21.9797 22.0071 21.9389
22.0657 22.2459 22.0047 22.1201 22.0351 21.9799 22.0072 21.9391

Consequently, (Table 7) described the total errors between 3SMVI and CMM measurements based on the minimum circle zone of Case Study. However, the maximum non-contact errors were 14.1-micron meters in hole 3, while the maximum contact errors were 5.6-micron meters in hole 2. On the other hand, the smallest error measurement for the contact approach is 3.1 microns, but the minimum value of non-contact errors is 10.6-micron meters in hole 2. Thus, these approaches specify that the value contact approach was precise and accurate due to their small error to the actual value.

Table 7. The average circle hole errors for each hole in a mild Delrin workpiece, comparing the values obtained through contact and non-contact measurements.

Diameter in mm Hole circle error in μm from non-contact approach Hole circle error in μm from contact approach Difference in μm
22 10.9μm 3.4μm 7.5
22 10.6μm 5.6μm 5
22 14.1μm 4.5μm 9.6
22 11.3μm 3.1μm 8.2

(Fig 13) shows the average circle hole error of both contact and non-contact measurements for mild DELRIN workpiece in the case study for four roundness circles. That acquired from the value of roundness circle dimensions the measure from each section and observed that the highest error value and the lowest error value measured in microns. Nevertheless, (Fig 14) provides a detailed analysis of the differential errors observed in a mild DELRIN workpiece when comparing the non-contact measurements from the 3SMVI system and the contact measurements obtained from a Coordinate Measuring Machine (CMM). The graph shows discrepancies in the data ranging from 5μm to 10μm.

Fig 13. The comparison graph of the average circle errors obtained through both contact and non-contact approaches using the (MZC) method.

Fig 13

Fig 14. The difference errors between 3SMVI and CMM in micron meter.

Fig 14

Conclusions and future work

Metrology plays a crucial role in the manufacturing industry based on Industrial 4.0. In this era of advanced manufacturing, which emphasizes automation, customization, and globalization, precise and accurate measurement is vital for quality control and process optimization. Metrology holds significant importance in the modern manufacturing industry, and its significance is expected to grow as the industry evolves and adopts new technologies and processes.

Thus, this article highlights the need for modern industrial devices to communicate through local (edge) and cloud computing servers. To enhance data transmission performance to and from cloud servers, the Industrial IoT protocol aims to leverage the MQTT server. Therefore, MQTT’s flexibility and protocol-agnostic nature make it adept at handling various sensor types, data formats, and communication protocols. By decoupling producers and consumers through its publish-subscribe model, MQTT allows different sensors to communicate seamlessly, reducing the need for extensive protocol translation or adaptation. MQTT aligns with the principles of Industry 4.0 and offers substantial advantages for the manufacturing industry, ranging from process improvements to cost savings. This research contributes significantly to the advancement of the 3SMVI system, which utilizes IoT architecture to measure the roundness of holes in Delrin workpieces. Additionally, the MQTT protocol facilitates machine-to-machine communication, enables identification and examination of hole diameters on a cloud platform, and allows interoperable data collection of surface properties of workpieces. These innovation platforms provide an advanced approach for achieving seamless coordination between machining, inspection, and cloud-based applications by successfully integrating the IoT’s potential with interpreted STEP-NC files.

The study introduces an improved non-contact method that is non-invasive and specifically designed to verify the roundness of circular holes. The minimal zone algorithm, employed to calculate roundness error, proves efficient in locating discrete data points on a uniform circle, making it suitable for continuous quality inspection. The Minimum Zone Circle (MZC) method is employed to adhere to ISO and ANSI standards, providing more precise values for prismatic milling parts compared to other methods. The inspection results obtained from the 3SMVI system are compared to those obtained from traditional measuring machines like the CMM. Moreover, the study examines the difference in error between non-contact and contact measurements. By utilizing machine vision inspection and an intelligent system-based STEP-NC file interpretation, the inspection accuracy ranges from ± 9μm to ± 14 μm.

In future work, the study plans to improve image quality, update algorithms, and use cloud computing protocols for data transmission. It will integrate deep learning into CNNs for surface feature detection, and use Tensor Flow-assisted real-time image categorization for accurate feature detection. Additionally, to delve deeper into latency analysis through MQTT and its implications for circularity measurements. Thus, a more detailed investigation into this area could provide valuable insights into the protocol’s performance in real-time scenarios. This study has the potential to benefit many industries, including product quality, inspection, time capturing data, and dimensional analysis.

Supporting information

S1 File

(DOCX)

Acknowledgments

The authors are thankful to the Department of Industrial Engineering, College of Engineering at Alfaisal University, in Saudi Arabia, and the faculty of Mechanical and Manufacturing Engineering at the University Tun Hussien ONN Malaysia (UTHM) for their kind assistance in our studies.. Additionally, the authors wish to extend their sincere appreciation to the Institute for Integrated Engineering, and the facilities of the Sustainable Polymer Engineering, Advanced Manufacturing, and Material Centre (SPEN-AMMC).

Abbreviations

3D

Three-dimension model

3SMVI

Smart System based on interpreted STEP-NC for Machine Vision Inspection

ACO

Colony Optimization

ANSI

American National Standards Institute

C

Center of this circle

CAIP

Computer-Aided Inspection Planning

CLIM

Closed-loop inspection manufacturing

CMM

Coordinate Measuring Machine

CMOS

Complementary metal-oxide semiconductor

CNC

Computer numerical control

e MZC

Error based Minimum Zone radial circles

EO

Engineering Ontology

FTP

File Transfer Protocol

GA

General Assembly Simulation

GD&T

Geometric Dimensioning and Tolerance

I 4.0

The fourth Industry Revolution

IoT

Internet of Things

ISO

International Standard Organization

LED

Light-Emitting Diodes

MQTT

Message Queuing Telemetry Transport

MTD

Metrology for the Digitalization

MZC

Minimum Zone for Radial Circles

OLP

Off-Line Programming System

OOR

Out-Of-the-Round

Open CV

Open Computer Vision

QM

Quality MITUTOYO Measure

RealVNC

Real Visual network center

RGB

Three Channel of color Red, Green and Blue

Ri

Radius inner

RL

Lower radius

RU

Upper radius

STEP-NC

The standard for the Exchange of Product Model Data for Numerical Control

Data Availability

All relevant data are within the manuscript and its Supporting information files. -Full access to the code for measuring data is available in Appendices A and B, included as Supporting information in a supplementary file. I want to emphasize that all data, without exception, is comprehensively documented and presented within the manuscript itself.

Funding Statement

This research was supported by the Ministry of Higher Education (MOHE) through the Fundamental Research Grant Scheme (FRGS/1/2020/STG01/UTHM/02/2).

References

  • 1.Berthold J, Imkamp D. Looking at the future of manufacturing metrology: Roadmap document of the German VDI/VDE Society for Measurement and Automatic Control. J Sensors Sens Syst. 2013;2(1):1–7. [Google Scholar]
  • 2.Stojadinovic SM, Majstorovic VD, Durakbasa NM, Gaska A, Sładek J. Development of a coordinate measuring machine—based inspection planning system for industry 4.0. Appl Sci. 2021;11(18). [Google Scholar]
  • 3.Lazzari A, Pou JM, Dubois C, Leblond L. Smart metrology: The importance of metrology of decisions in the big data era. IEEE Instrum Meas Mag. 2017;20(6):22–9. [Google Scholar]
  • 4.Stojadinovic SM, Majstorovic VD, Durakbasa NM, Sibalija TV. Towards an intelligent approach for CMM inspection planning of prismatic parts. Meas J Int Meas Confed [Internet]. 2016;92:326–39. Available from: doi: http%3A//dx.doi.org/10.1016/j.measurement.2016.06.037 [Google Scholar]
  • 5.Kasprzak B, Pękala J, Stępień AF, Świerczyński Z. Metrology and measurement systems. Architecture. 2010;XVII(4):537–47. [Google Scholar]
  • 6.Zhao Y, Xu X, Kramer T, Proctor F, Horst J. Dimensional metrology interoperability and standardization in manufacturing systems. Comput Stand Interfaces [Internet]. 2011;33(6):541–55. Available from: doi: http%3A//dx.doi.org/10.1016/j.csi.2011.02.009 [Google Scholar]
  • 7.Saif Y, Yusof Y, Latif K, Kadir AZA, lliyas Ahmed M. Systematic review of STEP-NC-based inspection. Vol. 108, International Journal of Advanced Manufacturing Technology. Springer; 2020. p. 3619–44.
  • 8.Iliyas Ahmad M, Yusof Y, Daud ME, Latiff K, Abdul Kadir AZ, Saif Y. Machine monitoring system: a decade in review. Int J Adv Manuf Technol [Internet]. 2020;108(11–12):3645–59. Available from: doi: 10.1007/s00170-020-05620-3 [DOI] [Google Scholar]
  • 9.Saif Y, Yusof Y, Latif K, Abdul Kadir AZ, Ahmad M binti I, Adam A, et al. Development of a smart system based on STEP-NC for machine vision inspection with IoT environmental. Int J Adv Manuf Technol. 2021;1–18. [Google Scholar]
  • 10.Batchelor BG. Machine vision handbook. Machine Vision Handbook. 2012. 1355–1560 p.
  • 11.Sanz JLC, PetkoviĆ D. Machine Vision Algorithms for Automated Inspection of Thin-Film Disk Heads. IEEE Trans Pattern Anal Mach Intell [Internet]. 1988;10(6):830–48. Available from: https://ieeexplore.ieee.org/document/9106 [Google Scholar]
  • 12.You BJ, Oh YS, Bien Z. A Vision System for an Automatic Assembly Machine of Electronic Components. IEEE Trans Ind Electron [Internet]. 1990;37(5):349–57. Available from: https://ieeexplore.ieee.org/document/103429 [Google Scholar]
  • 13.Elmasry G, Cubero S, Moltó E, Blasco J. In-line sorting of irregular potatoes by using automated computer-based machine vision system. J Food Eng [Internet]. 2012;112(1–2):60–8. Available from: doi: http%3A//dx.doi.org/10.1016/j.jfoodeng.2012.03.027 [Google Scholar]
  • 14.Sofu MM, Er O, Kayacan MC, Cetişli B. Design of an automatic apple sorting system using machine vision. Comput Electron Agric. 2016;127:395–405. [Google Scholar]
  • 15.Davies ER. Computer vision for automatic sorting in the food industry. In: Computer Vision Technology in the Food and Beverage Industries [Internet]. University of London, UK: Woodhead Publishing Limited; 2012. p. 150–80. 10.1533/9780857095770.2.150 [DOI] [Google Scholar]
  • 16.Nerakae P, Uangpairoj P, Chamniprasart K. Using Machine Vision for Flexible Automatic Assembly System. Procedia Comput Sci [Internet]. 2016;96(September):428–35. Available from: doi: http%3A//dx.doi.org/10.1016/j.procs.2016.08.090 [Google Scholar]
  • 17.Wu Wen-Yen, Mao-Jim J. Wang C-ML. Automated inspection of printed circuit boards. Intell Syst Technol Appl Six Vol Set [Internet]. 1996;28:103–11. Available from: https://www.sciencedirect.com/science/article/abs/pii/0166361595000631 [Google Scholar]
  • 18.Golnabi H, Asadpour A. Design and application of industrial machine vision systems. Robot Comput Integr Manuf [Internet]. 2007;23(6):630–7. Available from: https://www.sciencedirect.com/science/article/abs/pii/S0736584507000233 [Google Scholar]
  • 19.Wang T, Chen Y, Qiao M, Snoussi H. A fast and robust convolutional neural network-based defect detection model in product quality control. Int J Adv Manuf Technol. 2018;94(9–12):3465–71. [Google Scholar]
  • 20.Liao Z, Abdelhafeez A, Li H, Yang Y, Diaz OG, Axinte D. State-of-the-art of surface integrity in machining of metal matrix composites. Int J Mach Tools Manuf. 2019;143:63–91. [Google Scholar]
  • 21.Kim DH, Kim TJ, Wang X, Kim M, Quan YJ, Oh JW, et al. Smart Machining Process Using Machine Learning: A Review and Perspective on Machining Industry. Int J Precis Eng Manuf—Green Technol. 2018;5(4):555–68. [Google Scholar]
  • 22.Bulnes FG, Usamentiaga R, Garcia DF, Molleda J. An efficient method for defect detection during the manufacturing of web materials. J Intell Manuf [Internet]. 2016;27(2):431–45. Available from: doi: http%3A//dx.doi.org/10.1007/s10845-014-0876-9 [Google Scholar]
  • 23.Song K, Yan Y. A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects. Appl Surf Sci [Internet]. 2013;285:858–64. Available from: doi: http%3A//dx.doi.org/10.1016/j.apsusc.2013.09.002 [Google Scholar]
  • 24.Zhang Huang, Shen Xingquan, Bo Arixin, Li Yaoming, Zhan Haifei, & Gu Y. Amultiscale evaluation of the surface integrity in boring trepanning association deep hole drilling. Int J Mach Tools Manuf. 2017;123:48–56. [Google Scholar]
  • 25.Rao X, Zhang F, Lu Y, Luo X, Chen F. Surface and subsurface damage of reaction-bonded silicon carbide induced by electrical discharge diamond grinding. Int J Mach Tools Manuf. 2020;154. [Google Scholar]
  • 26.Huang SH, Pan YC. Automated visual inspection in the semiconductor industry: A survey. Comput Ind [Internet]. 2015;66:1–10. Available from: doi: http%3A//dx.doi.org/10.1016/j.compind.2014.10.006 [Google Scholar]
  • 27.Ravimal D, Kim H, Koh D, Hong JH, Lee SK. Image-Based Inspection Technique of a Machined Metal Surface for an Unmanned Lapping Process. Int J Precis Eng Manuf—Green Technol [Internet]. 2020;7(3):547–57. Available from: doi: 10.1007/s40684-019-00181-7 [DOI] [Google Scholar]
  • 28.Ren Z, Fang F, Yan N, Wu Y. State of the Art in Defect Detection Based on Machine Vision. Int J Precis Eng Manuf—Green Technol [Internet]. 2021; doi: 10.1007/s40684-021-00343-6 [DOI] [Google Scholar]
  • 29.Penumuru DP, Muthuswamy S, Karumbu P. Identification and classification of materials using machine vision and machine learning in the context of industry 4.0. J Intell Manuf [Internet]. 2020;31(5):1229–41. Available from: doi: 10.1007/s10845-019-01508-6 [DOI] [Google Scholar]
  • 30.Ali MAH, Lun AK. A cascading fuzzy logic with image processing algorithm–based defect detection for automatic visual inspection of industrial cylindrical object’s surface. Int J Adv Manuf Technol. 2019;102(1–4):81–94. [Google Scholar]
  • 31.Badmos O, Kopp A, Bernthaler T, Schneider G. Image-based defect detection in lithium-ion battery electrode using convolutional neural networks. J Intell Manuf [Internet]. 2020;31(4):885–97. Available from: doi: 10.1007/s10845-019-01484-x [DOI] [Google Scholar]
  • 32.Di Leo G, Liguori C, Pietrosanto A, Sommella P. A vision system for the online quality monitoring of industrial manufacturing. Opt Lasers Eng [Internet]. 2016;89:162–8. Available from: doi: http%3A//dx.doi.org/10.1016/j.optlaseng.2016.05.007 [Google Scholar]
  • 33.Malamas Elias N., Euripides G.M. Petrakis MZ. A survey on industrial vision systems, applications and tools. Image Vis Comput. 2003;2(2):171–88. [Google Scholar]
  • 34.Saif Y, Yusof Y, Latif K, Kadir AZA, Ahmed M binti lliyas, Adam A, et al. Roundness Holes’ Measurement for milled workpiece using machine vision inspection system based on IoT structure: A case study. Meas J Int Meas Confed [Internet]. 2022;195(March):111072. Available from: doi: 10.1016/j.measurement.2022.111072 [DOI] [Google Scholar]
  • 35.Gosavi A, Cudney E. Form errors in precision metrology: A survey of measurement techniques. Qual Eng. 2012;24(3):369–80. [Google Scholar]
  • 36.Guu SM, Tsai DM. Measurement of roundness: A nonlinear approach. Proc Natl Sci Counc Repub China, Part A Phys Sci Eng. 1999;23(3):348–52. [Google Scholar]
  • 37.Kshaurad K, Kiran MB, Shanmuganatan SP. Minimum zone tolerance algorithm to detect roundness error for machined rods using vision system. Mater Today Proc [Internet]. 2021;(xxxx). Available from: doi: 10.1016/j.matpr.2020.12.788 [DOI] [Google Scholar]
  • 38.Du CL, Luo CX, Han ZT, Zhu YS. Applying particle swarm optimization algorithm to roundness error evaluation based on minimum zone circle. Meas J Int Meas Confed [Internet]. 2014;52(1):12–21. Available from: doi: http%3A//dx.doi.org/10.1016/j.measurement.2014.02.028 [Google Scholar]
  • 39.Larmo A, Ratilainen A, Saarinen J. Impact of coAP and MQTT on NB-IoT system performance. Sensors (Switzerland). 2019;19(1). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Thangavel D, Ma X, Valera A, Tan HX, Tan CKY. Performance evaluation of MQTT and CoAP via a common middleware. IEEE ISSNIP 2014–2014 IEEE 9th Int Conf Intell Sensors, Sens Networks Inf Process Conf Proc. 2014;(April):21–4. [Google Scholar]
  • 41.Rocha MS, Sestito GS, Dias AL, Turcato AC, Brandão D, Ferrari P. On the performance of OPC UA and MQTT for data exchange between industrial plants and cloud servers. Acta IMEKO. 2019;8(2):80–7. [Google Scholar]
  • 42.Ahmad MI, Saif Y, Yusof Y, Daud ME, Latif K, Kadir AZA. A Case Study-Monitoring and Inspection Based on IoT for STEP-NC Data Model. Int J Adv Manuf Technol [Internet]. 2021;1–22. Available from: https://www.researchsquare.com/article/rs-263347/latest.pdf [Google Scholar]
  • 43.Mears L, Roth JT, Djurdjanovic D, Yang X, Kurfess T. Quality and Inspection of Machining Operations: CMM Integration to the Machine Tool. J Manuf Sci Eng [Internet]. 2009;131(5):051006. Available from: http://manufacturingscience.asmedigitalcollection.asme.org/article.aspx?articleid=1468952 [Google Scholar]
  • 44.Kurt Swanson D.T. Lee VLW. An optimal algorithm for roundness determination 1995.pdf. Comput Geom [Internet]. 1995;5(4):225–35. Available from: https://www.sciencedirect.com/science/article/pii/0925772195000046 [Google Scholar]

Decision Letter 0

Nadeem Sarwar

21 Aug 2023

PONE-D-23-19982MQTT Protocol for Circularity Measurements in Industry 4.0-Based Manufacturing Metrology: A Case StudyPLOS ONE

Dear Dr. Saif,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.

Please submit your revised manuscript by Oct 05 2023 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols.

We look forward to receiving your revised manuscript.

Kind regards,

Nadeem Sarwar

Academic Editor

PLOS ONE

Journal Requirements:

When submitting your revision, we need you to address these additional requirements.

1. https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and 

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

2. Please note that PLOS ONE has specific guidelines on code sharing for submissions in which author-generated code underpins the findings in the manuscript. In these cases, all author-generated code must be made available without restrictions upon publication of the work. Please review our guidelines at https://journals.plos.org/plosone/s/materials-and-software-sharing#loc-sharing-code and ensure that your code is shared in a way that follows best practice and facilitates reproducibility and reuse.

3. Please note that funding information should not appear in any section or other areas of your manuscript. We will only publish funding information present in the Funding Statement section of the online submission form. Please remove any funding-related text from the manuscript.

4. Thank you for stating the following financial disclosure: 

   "The authors would like to express their deepest appreciation to the Ministry of Higher Education (MOHE) through the fundamental Grant Scheme (FRGS/1/2020/STG01/UTHM/02/2, Malaysia and Alfaisal University, Saudi Arabia for funding this project. Additional support in terms of facilities was also provided by Sustainable Polymer Engineering, Advanced Manufacturing and Material Centre (SPEN-AMMC)."

Please state what role the funders took in the study.  If the funders had no role, please state: "The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript." 

If this statement is not correct you must amend it as needed. 

Please include this amended Role of Funder statement in your cover letter; we will change the online submission form on your behalf.

5. In your Data Availability statement, you have not specified where the minimal data set underlying the results described in your manuscript can be found. PLOS defines a study's minimal data set as the underlying data used to reach the conclusions drawn in the manuscript and any additional data required to replicate the reported study findings in their entirety. All PLOS journals require that the minimal data set be made fully available. For more information about our data policy, please see http://journals.plos.org/plosone/s/data-availability.

"Upon re-submitting your revised manuscript, please upload your study’s minimal underlying data set as either Supporting Information files or to a stable, public repository and include the relevant URLs, DOIs, or accession numbers within your revised cover letter. For a list of acceptable repositories, please see http://journals.plos.org/plosone/s/data-availability#loc-recommended-repositories. Any potentially identifying patient information must be fully anonymized.

Important: If there are ethical or legal restrictions to sharing your data publicly, please explain these restrictions in detail. Please see our guidelines for more information on what we consider unacceptable restrictions to publicly sharing data: http://journals.plos.org/plosone/s/data-availability#loc-unacceptable-data-access-restrictions. Note that it is not acceptable for the authors to be the sole named individuals responsible for ensuring data access.

We will update your Data Availability statement to reflect the information you provide in your cover letter.

6. We note that you have stated that you will provide repository information for your data at acceptance. Should your manuscript be accepted for publication, we will hold it until you provide the relevant accession numbers or DOIs necessary to access your data. If you wish to make changes to your Data Availability statement, please describe these changes in your cover letter and we will update your Data Availability statement to reflect the information you provide.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

Reviewer #4: Yes

Reviewer #5: Yes

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: N/A

Reviewer #3: Yes

Reviewer #4: Yes

Reviewer #5: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

Reviewer #4: Yes

Reviewer #5: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

Reviewer #4: Yes

Reviewer #5: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The case study focuses on circularity measurement using MQTT protocol in Industry 4.0 based on Manufacturing Meterology

1. Kindly correct the heading (Subdivision - 6) Coordinate Measuring Machine (CMM)

2. 5.1 heading correction (Structure)

Reviewer #2: 1. Appendices are missing

2. It is mentioned in section 3.2.1. that the CAD model identifies surface areas and emphasizes holes for inspection. However, it doesn't detail how the CAD model selection and inspection strategy were determined. Providing insights into the reasoning behind the chosen areas and features for inspection would enhance the credibility of the design.

3. he provided machining parameters are valuable for understanding the setup, but there's no discussion about the rationale behind selecting these specific parameters. Explaining why the spindle speed, feed rate, depth of cut, and cutting speed were chosen could enhance the reader's understanding of the machining process.

4. Various hardware components of the 3SMVI system, including a webcam, power supply, internet adapter, lighting system, step motor, personal computer, and driver are mentioned. However, specific details about the selection criteria for these components and how they integrate cohesively to create the vision inspection system could be valuable.

5. Mentioning the webcam's capability to capture surface feature images up to 5 megapixels and its resolution is helpful. However, further context on why this particular webcam was chosen, considering the inspection requirements and performance expectations, would provide a clearer understanding of the hardware decision-making process.

6. The mention of IoT integration through elements like FileZilla, Raspberry Pi, LED lighting, and Wi-Fi router is intriguing. Elaborating on how these components work together and contribute to the system's IoT capabilities would enhance comprehension.

7. Mentioning the use of OpenCV to develop inspection modules for detection and measurement is important. Providing examples of the types of measurements and analyses performed by these modules would give readers a clearer picture of the system's capabilities.

8. It's important to discuss how the chosen algorithms and pre-processing steps affect the overall quality of the results. How do these steps contribute to improving the accuracy of measurements or enhancing the system's capabilities? This connection should be explicitly highlighted.

9. Consider discussing the performance of different algorithms if applicable. Are there specific algorithms that outperformed others in certain scenarios? Exploring these comparative aspects can provide insights into the decision-making process behind algorithm selection.

Reviewer #3: The present article entitled "MQTT Protocol for Circularity Measurements in Industry 4.0-Based Manufacturing Metrology: A Case Study" investigates the use of the MQTT protocol to enhance the performance of circularity measurement data transmission between cloud servers and round-hole data sources through Open CV. The system implements the MZC problem solution technique to improve roundness measurement. A workpiece with circular features has been embedded in the IoT- enabled vision machine system. Overall article is written well and have merit for publication.

Reviewer #4: The title focuses on the MQTT protocol while the work and the novelty emphasises on the image processing techniques proposed for the measurements. Either the title should be revised to reflect the work better or the details of the MQTT protocol used should be added to the manuscript.

Reviewer #5: The paper presents an interesting case study on using the MQTT protocol for circularity measurements in Industry 4.0-based manufacturing metrology. However, the methodology section lacks details on the specific instruments and devices used for the circularity measurements. Providing information on the measurement equipment, accuracy, and calibration procedures would enhance the robustness of the study.

It's important to clarify the sample size and variability in the experiments. Elaborate on how the data were collected, including the frequency of measurements and the conditions under which they were conducted.

While the paper introduces the use of MQTT for data communication, it falls short in explaining the technical aspects of implementing MQTT in the manufacturing environment. More details on how MQTT was integrated with the existing systems, including the configuration of topics, quality of service levels, and message retention policies, would greatly benefit readers looking to replicate the study.

The paper mentions the efficiency of MQTT in handling real-time data transmission. However, a deeper analysis of the latency introduced by the protocol and its impact on the timeliness of circularity measurements should be included.

To provide a well-rounded perspective, it's recommended to compare the proposed MQTT protocol with other communication protocols commonly used in Industry 4.0 scenarios, such as CoAP or AMQP. Discuss the pros and cons of each protocol in terms of data throughput, reliability, and suitability for different manufacturing scenarios.

MQTT's security features, such as authentication and encryption, play a critical role in industrial applications. The paper should address the security measures implemented to protect the transmitted circularity data, including user authentication, message encryption, and secure communication channels.

Industry 4.0 environments often involve heterogeneous devices and systems. Discuss how the proposed MQTT solution addresses interoperability challenges, especially when dealing with various sensor types, data formats, and communication protocols.

Consider expanding on the scalability of the MQTT solution. How does it handle an increasing number of sensors and devices in a large manufacturing setup? Are there any limitations or potential bottlenecks?

The paper concludes with a promising case study, but it lacks a discussion on the practical implications for the manufacturing industry. Consider elaborating on the potential benefits of adopting the proposed MQTT protocol for circularity measurements, including improved process control, reduced downtime, and enhanced data-driven decision-making.

Suggest avenues for future research, such as exploring how the protocol could be extended to address challenges related to different types of metrology measurements or integration with higher-level manufacturing systems.

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: Yes: Arvind C

Reviewer #2: No

Reviewer #3: No

Reviewer #4: Yes: Rizwan Aslam BUTT

Reviewer #5: Yes: Muhammad Aamir

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

PLoS One. 2023 Oct 13;18(10):e0292814. doi: 10.1371/journal.pone.0292814.r002

Author response to Decision Letter 0


21 Sep 2023

Response to Reviewer 1

Questions Comments Line No.630, 607

The case study focuses on circularity measurement using MQTT protocol in Industry 4.0 based on Manufacturing Metrology

1. Kindly correct the heading (Subdivision - 6) Coordinate Measuring Machine (CMM)

2. 5.1 heading correction (Structure) Thank you for the acknowledgment and the comment. We really appreciate your comment.

We had edited and changed the heading from “Coordinate measureming Machine by MITUTOYO Device” to “Coorinate Measureming Machine (CMM) (highlighted in red color).

We have changes the word from “stracture” to structure were (highlighted in red color).

630, 607

---------------------------------------------------------------------

Response to Reviewer 2

Questions Comments Line No.

1. Appendices are missing

2. It is mentioned in section 3.2.1. that the CAD model identifies surface areas and emphasizes holes for inspection. However, it doesn't detail how the CAD model selection and inspection strategy were determined. Providing insights into the reasoning behind the chosen areas and features for inspection would enhance the credibility of the design.

3. he provided machining parameters are valuable for understanding the setup, but there's no discussion about the rationale behind selecting these specific parameters. Explaining why the spindle speed, feed rate, depth of cut, and cutting speed were chosen could enhance the reader's understanding of the machining process.

4. Various hardware components of the 3SMVI system, including a webcam, power supply, internet adapter, lighting system, step motor, personal computer, and driver are mentioned. However, specific details about the selection criteria for these components and how they integrate cohesively to create the vision inspection system could be valuable.

5. Mentioning the webcam's capability to capture surface feature images up to 5 megapixels and its resolution is helpful. However, further context on why this particular webcam was chosen, considering the inspection requirements and performance expectations, would provide a clearer understanding of the hardware decision-making process.

6. The mention of IoT integration through elements like FileZilla, Raspberry Pi, LED lighting, and Wi-Fi router is intriguing. Elaborating on how these components work together and contribute to the system's IoT capabilities would enhance comprehension.

7. Mentioning the use of OpenCV to develop inspection modules for detection and measurement is important. Providing examples of the types of measurements and analyses performed by these modules would give readers a clearer picture of the system's capabilities.

8. It's important to discuss how the chosen algorithms and pre-processing steps affect the overall quality of the results. How do these steps contribute to improving the accuracy of measurements or enhancing the system's capabilities? This connection should be explicitly highlighted.

9. Consider discussing the performance of different algorithms if applicable. Are there specific algorithms that outperformed others in certain scenarios? Exploring these comparative aspects can provide insights into the decision-making process behind algorithm selection.

We appreciate your fruitful comments. We have added the missing Appendices for A and B in pdf file as supplementary.

Thanks for your comment. We had added some sentences. “This study utilizes a STEP-NC File 21 compliant reference model to prioritize inspection holes and surface area identification in a CAD model. This transparent documentation strengthens the design's validity and aligns with STEP-NC principles, enhancing accuracy and quality assurance in the CNC milling machine model.”

we appreciate your comments. We added these sentences to the manuscript. “The guidelines for developing the STEP-NC code of standardization for milling CNC machines are exactly what is identified in this machine's parameters. However, this data could be applied by a PROLIGHT 100 CNC milling machine to drill the four holes in the Delrin workpiece in accordance with the standards to obtain better surface features after the product's manufacturing is succeeded.” (highlighted in red color)

Thanks for your fruitful comment. We added some sentences in detail. The integration of the 3SMVI system has been added in the new section 4.3, that explains the process of 3SMVI integration. (highlighted in red color)

Thanks for your comment. The chosen camera was due to the availability inside Advanced Material and Manufacturing Centre Lab (AMMC) in UTHM, as detailed with specification camera 640x480 resolutions up to 5 Megapixels.

We appreciate your comment. We had elaborated some sentences that addressed the on how the FileZilla, Raspberry pi, LED and Wi-Fi works together cloudily to relies on IoT environment. (highlighted in red color).

Thanks for your great comment. We had previously provided, as shown in figure 7. measuring the surface feature of four holes of Delrin's workpiece based on the OpenCV platform as an adequate example in this study and analyzing the data through multi-algorithms implemented to capture the size of the hole. (highlighted in red color)

Thanks for the fruitful comment. We had implement minimum circle zone algorithm that utilized to identify the errors roundness images for twelve points. Furthermore, the canny edges was utilized and Hough transform was utilized. (highlighted in red color)

Thanks for your comments. We added a sentences to clarify the best algorithms that had implemented in 3SMVI system. (highlighted in red color)

223-243

250-259

564-586

305-328

335-353

552-559

588-601

588-598, 608-612

---------------------------------------------------------------------------------------------------------

Response to Reviewer 3

Questions Comments

The present article entitled "MQTT Protocol for Circularity Measurements in Industry 4.0-Based Manufacturing Metrology: A Case Study" investigates the use of the MQTT protocol to enhance the performance of circularity measurement data transmission between cloud servers and round-hole data sources through Open CV. The system implements the MZC problem solution technique to improve roundness measurement. A workpiece with circular features has been embedded in the IoT- enabled vision machine system. Overall article is written well and have merit for publication. Thanks for your fruitful comments. We appreciate your valuables comment. As a way of improving roundness measurement, the system uses the MZC problem-solving approach. The IoT-enabled vision machine system has a workpiece with circular features embedded in it. These innovation platforms provide a fresh method for achieving seamless coordination between machining, inspection, and cloud-based applications by effectively combining interpreted STEP-NC files with IoT potential.

----------------------------------------------------------------------------------------------------

Response to Reviewer 4

Questions Comments Line No.

The title focuses on the MQTT protocol while the work and the novelty emphasises on the image processing techniques proposed for the measurements. Either the title should be revised to reflect the work better or the details of the MQTT protocol used should be added to the manuscript.

Thanks for your fruitful comment. We have revised and changed the title from “MQTT Protocol for Circularity Measurements in Industry 4.0-Based Manufacturing Metrology: A Case Study” to “Implementing Circularity Measurements in Industry 4.0-Based Manufacturing Metrology Using MQTT Protocol and Open CV: A Case Study”. Furthermore, we had added intensive details regarding the MQTT protocols on how the data transmitted through the cloud using some important steps with Real virtual network computing.

1-2

423-438,

453-492

---------------------------------------------------------------------------------------------------------

Response to Reviewer 5

Questions Comments Line No.

The paper presents an interesting case study on using the MQTT protocol for circularity measurements in Industry 4.0-based manufacturing metrology. However, the methodology section lacks details on the specific instruments and devices used for the circularity measurements. Providing information on the measurement equipment, accuracy, and calibration procedures would enhance the robustness of the study.It's important to clarify the sample size and variability in the experiments. Elaborate on how the data were collected, including the frequency of measurements and the conditions under which they were conducted.

Thanks for your interesting comments. We appreciate your point regarding the MQTT luck in methodology’s. However, the 3SMVI interface platform is designed to determine the pixel size in both the x and y axes by taking into account several crucial parameters. These parameters include the actual size of the expanded model, which is derived from the STEP-NC Example 1 Part 21 file. Furthermore, it's important to note that the program considers the camera system calibration. This calibration is instrumental in establishing the relationship between the camera's imaging properties and the real-world dimensions it captures. In particular, it addresses the region of interest (ROI), which defines the portion of the image that is relevant for analysis. By incorporating camera calibration and knowledge of the ROI, the program ensures accurate and precise pixel-to-real-world unit conversion, which is vital for various applications in image analysis and measurement. (Highlighted in red color)

272-292

While the paper introduces the use of MQTT for data communication, it falls short in explaining the technical aspects of implementing MQTT in the manufacturing environment. More details on how MQTT was integrated with the existing systems, including the configuration of topics, quality of service levels, and message retention policies, would greatly benefit readers looking to replicate the study.

We appreciate your comments. We had added paragraphs in section 3.4 based on the steps of how to install MQTT inside python through Open CV.

We addressed the sequence of implementing the MQTT in to 3SMVIsystem through Open CV platform.

393-415,

453-492

The paper mentions the efficiency of MQTT in handling real-time data transmission. However, a deeper analysis of the latency introduced by the protocol and its impact on the timeliness of circularity measurements should be included. Thank you for your kindness comment. Regarding the latency analysis of MQTT in the context of circularity measurements. In this paper, our primary focus was to highlight the measurements of the holes through Open CV based on the cloud server within MQTT protocols that can transmissions the data in real-time within the context of Industry 4.0-based manufacturing metrology.

These statement shows the efficiency of the CMM as contact measuring related to improved non-contact method that is non-invasive and specifically designed to verify the roundness of circular holes. The minimal zone algorithm, employed to calculate roundness error, proves efficient in locating discrete data points on a uniform circle, making it suitable for continuous quality inspection. -----

118,

453-457,

791-801

To provide a well-rounded perspective, it's recommended to compare the proposed MQTT protocol with other communication protocols commonly used in Industry 4.0 scenarios, such as CoAP or AMQP. Discuss the pros and cons of each protocol in terms of data throughput, reliability, and suitability for different manufacturing scenarios. Thanks for your great comment. We had added a sentences with references [39-41] supporting the MQTT protocol was the best for this study due to the limit of wireless. In comparison to CoAP, MQTT supports both wired and wireless connections, has a smaller memory footprint than AMQP, and offers a greater variety of Quality of Service (QoS) parameter options that guarantee message delivery for critical applications or transmission only when necessary to reduce network bandwidth and energy consumption. 423-438

MQTT's security features, such as authentication and encryption, play a critical role in industrial applications. The paper should address the security measures implemented to protect the transmitted circularity data, including user authentication, message encryption, and secure communication channels. We appreciate your comment. We had addressed the security of our communication protocol based on IP address with portable internet. By controlling the transmission data within the area of our lab which used within TP-Link router, Laptop, Smart Phone, and PC. (Highlighted in red color)

453-492

524-525,

Industry 4.0 environments often involve heterogeneous devices and systems. Discuss how the proposed MQTT solution addresses interoperability challenges, especially when dealing with various sensor types, data formats, and communication protocols. Consider expanding on the scalability of the MQTT solution. How does it handle an increasing number of sensors and devices in a large manufacturing setup? Are there any limitations or potential bottlenecks? Thank you for your insightful comments and questions regarding the MQTT solution's capabilities in addressing interoperability challenges.

• The proposed MQTT solution is crucial in Industry 4.0 environments due to its flexibility and protocol-agnostic nature. It allows seamless communication between sensors and reduces protocol translation. MQTT's lightweight, asynchronous messaging model is ideal for large-scale deployments. However, potential bottlenecks like hardware resources and network bandwidth need careful planning and resource allocation.

• The scalability of an MQTT implementation depends on factors like the choice of MQTT broker and the network architecture. 287-292,

The paper concludes with a promising case study, but it lacks a discussion on the practical implications for the manufacturing industry. Consider elaborating on the potential benefits of adopting the proposed MQTT protocol for circularity measurements, including improved process control, reduced downtime, and enhanced data-driven decision-making. Thank you for your valuable comment. regarding the practical implications of our research. We acknowledge the importance of discussing how the adoption of the MQTT protocol for circularity measurements can benefit the manufacturing industry. 777-783

788-790

Suggest avenues for future research, such as exploring how the protocol could be extended to address challenges related to different types of metrology measurements or integration with higher-level manufacturing systems. Thanks for you fruitful suggested. We agree that latency analysis is a critical aspect, especially in timeliness-sensitive applications. While it wasn't the primary scope of this paper, we recognize its importance. In future research, we plan to delve deeper into latency analysis and its implications on circularity measurements. We believe that a more detailed investigation into this area could provide valuable insights into the protocol's performance in real-time scenarios. 802-809

Attachment

Submitted filename: Responses to Reviewers.docx

Decision Letter 1

Nadeem Sarwar

29 Sep 2023

Implementing Circularity Measurements in Industry 4.0-Based Manufacturing Metrology Using MQTT Protocol and Open CV: A Case Study

PONE-D-23-19982R1

Dear Dr. Saif,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at http://www.editorialmanager.com/pone/, click the 'Update My Information' link at the top of the page, and double check that your user information is up-to-date. If you have any billing related questions, please contact our Author Billing department directly at authorbilling@plos.org.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Kind regards,

Nadeem Sarwar

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #2: All comments have been addressed

Reviewer #5: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #2: Yes

Reviewer #5: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #2: N/A

Reviewer #5: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #2: Yes

Reviewer #5: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #2: Yes

Reviewer #5: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #2: The authors have successfully incorporated all the reviewer comments. Now the quality of manuscript is improved significantly. It can be accepted in its present form.

Reviewer #5: Accepted after the clearly evaluation the grammatical errors because the paper is interesting to read.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #2: No

Reviewer #5: No

**********

Acceptance letter

Nadeem Sarwar

5 Oct 2023

PONE-D-23-19982R1

Implementing Circularity Measurements in Industry 4.0-Based Manufacturing Metrology Using MQTT Protocol and Open CV: A Case Study

Dear Dr. Saif:

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now with our production department.

If your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information please contact onepress@plos.org.

If we can help with anything else, please email us at plosone@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. Nadeem Sarwar

Academic Editor

PLOS ONE

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 File

    (DOCX)

    Attachment

    Submitted filename: Responses to Reviewers.docx

    Data Availability Statement

    All relevant data are within the manuscript and its Supporting information files. -Full access to the code for measuring data is available in Appendices A and B, included as Supporting information in a supplementary file. I want to emphasize that all data, without exception, is comprehensively documented and presented within the manuscript itself.


    Articles from PLOS ONE are provided here courtesy of PLOS

    RESOURCES