CIMTOPS uses sensors and Azure IoT Hub to monitor NC machine tools
CIMTOPS Corporation offers MC-Web CONTROLLER, an on-premises system using Windows Server that monitors numerically controlled (NC) machine tools in factories. MC-Web CONTROLLER gathers information on actual operational data and checks that data with operation orders from a production management system. The system allows users to see the progress of tasks and manage machine operations on the web.
CIMTOPS wants to develop the next version of MC-Web CONTROLLER by using Microsoft Azure IoT Suite to improve operational efficiency, reduce costs, and improve profitability. This solution’s value is that it needs zero downtime to set up devices and NC machine tools. Installing typical devices to monitor NC machine tools requires cutting wires to connect sensors, leaving the NC machines idle for about 3 days. However, this solution does not need to cut wires to set up sensors, eliminating downtime.
This report describes the technology choices made and the learnings from the hackfest.
Key technologies used
The following technologies are used in the solution:
- Azure IoT Hub
- Azure Stream Analytics
- Azure SQL Database
- Azure Virtual Machines
- Windows 10 and Windows 10 IoT Core
- CIMTOPS MCW-NX8-001, a hub device that connects up to 8 signal sensors; up to 4 of these devices can connect to Windows 10 or Windows 10 IoT Core via Ethernet or RS-232C
Architecture discussion and hackfest members
The roles that took part in the architecture discussion and hackfest were as follows:
- Director, CIMTOPS Cloud & Device App
- Naoki Sato@naokis – Technical Evangelist, Microsoft Japan
- Tatsuro Hisamori – Technical Evangelist, Microsoft Japan
CIMTOPS Corporation is an independent software company based in Japan that provides IT solutions for the manufacturing industry. They offer software packages that handle tasks such as production scheduling, process control, and collection of operation results of NC machine tools.
The current version of MC-Web CONTROLLER is an on-premises system using Windows Server that monitors NC machine tools at factories. To deliver this solution to customers, CIMTOPS needs to deploy devices and on-premises servers at customer locations. To improving business agility, they want to develop the next version of MC-Web CONTROLLER to run in the cloud. CIMTOPS and Microsoft started to discuss the possibility of solving this objective by working with Azure IoT solutions.
Solution and steps
We held an architecture meeting with the development team to discuss the project requirements. For the first step in connecting to the cloud, we decided to hold a hackfest to implement Azure IoT Hub.
We held a 2-day hackfest at the headquarters of CIMTOPS. During the hackfest, we created a solution using the key technologies that appeared in the architecture diagram on the whiteboard. To understand whether the use of the key technologies met the specifications, we kept hacking.
Our basic procedure was as follows:
- Lecture on how to use the service and SDK
- Provide a sample of implementation
- When a developer finds problem, discuss and decide how to solve it
- If necessary, provide new sample code or script
The final system architecure is shown in the following diagram:
Windows 10 or Windows 10 IoT Core serves as the device gateway, connecting up to 4 custom boards (CIMTOPS MCW-NX8-001) via Ethernet. This board acts as a sensor hub, connecting up to 8 signal sensors.
When the device gateway receives sensor data from an MCW-NX8-001 board, it checks the data and sends it to Azure IoT Hub. If an offline or low-bandwidth state exists between the device gateway and IoT Hub, the device gateway retries its connection to IoT Hub.
We created the device gateway app using C#. The Azure IoT Hub SDK and the Device Explorer tool helped make the app easy to develop.
Cloud gateway using Azure IoT Hub
Azure IoT Hub is a full managed service, providing device registration, secure data transfer, and connectivity for millions of IoT devices.
In this case, we registered each device gateway with a unique device ID. Provisioning each device with its own security key enables it to connect to IoT Hub. To check device security during the hackfest, we enabled and disabled each device in the “Connect device to IoT Hub” section in the Azure portal. We verified that IoT Hub cannot receive from a disabled device even if the device is registered.
Storing telemetry using Stream Analytics job
The following code was used to filter the results based on a condition.
SELECT NCLocation, NCResId, NCTimeStamp, NCEvent, NCNote1, NCNote2, NCNote3, NCNote4 INTO [toSQLDatabase] FROM [fromIotHub02] WHERE NOT ( LAG(NCTimeStamp, 1) OVER (LIMIT DURATION(minute, 1)) = NCTimeStamp AND LAG(NCResId, 1) OVER (LIMIT DURATION(minute, 1)) = NCResId AND LAG(NCLocation, 1) OVER (LIMIT DURATION(minute, 1)) = NCLocation )
Visualizing the data
Data visualization requires us to be conscious of the various preferences of users. We try to use Power BI, ASP.NET Core, and/or third-party chart services. In this hackfest, we created a visualization on ASP.NET Core to display the operating status in the calendar view.
We were able to build an IoT solution in a few days thanks to the scalability of IoT Hub and the ease of data processing by Stream Analytics. We chose SQL Database as the data store, which meant that CIMTOPS was able to use existing SQL Server skills, so learning costs did not occur.
Switching from on-premises to the cloud, CIMTOPS will be able to monitor NC machine tools at several factories at remote places.
Here is a quote from the customer:
“Architecture discussion and hackfest drives our products development. Running on Microsoft Azure services, MC-Web CONTROLLER can help customers improve operational efficiency, reduce costs, and improve profitability.”