CNC Machine Control Mobile App Development

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
CNC Machine Control Mobile App Development
Complex
~1-2 weeks
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Developing a Mobile App for CNC Machine Control

A CNC machine is neither a 3D printer nor an IoT sensor. Control systems like Fanuc, Siemens Sinumerik, Heidenhain TNC, LinuxCNC are industrial equipment with strict reliability, safety, and precision control requirements. A mobile app in this context doesn't replace the control panel—it complements it: program monitoring, NC file upload, spindle and axis telemetry, emergency stop alerts.

Industrial CNC Interfaces

Each CNC manufacturer provides its own API. Openness varies:

System Protocol/API Transport
Siemens Sinumerik OPC UA (S7 protocol optional) Ethernet
Fanuc FOCAS FOCAS2 DLL (Windows) or REST via MTConnect TCP
Mitsubishi CNC CNC Open API REST Ethernet
LinuxCNC XML-RPC, HAL remote TCP
Heidenhain TNC DNC interface, LSV2 protocol RS-232/Ethernet
Haas MTConnect / Haas API Ethernet

MTConnect—an open standard (ANSI/MTC1.4) for reading machine state. MTConnect Agent adapts proprietary data to an XML stream. Most major CNC manufacturers support MTConnect as an optional interface.

MTConnect: Reading Machine Data

MTConnect Agent provides HTTP API. Streaming via current (snapshot) and sample (history with buffer):

class MTConnectClient(private val agentUrl: String) {

    suspend fun getCurrent(): MTConnectDocument {
        val response = httpClient.get("$agentUrl/current") {
            accept(ContentType.Application.Xml)
        }
        return parseMTConnectXml(response.bodyAsText())
    }

    // Long-polling stream of changes from sequence number
    fun streamSamples(from: Long? = null): Flow<MTConnectEvent> = flow {
        var nextSequence = from
        while (true) {
            val url = if (nextSequence != null)
                "$agentUrl/sample?from=$nextSequence&count=100"
            else
                "$agentUrl/sample?count=100"

            val response = httpClient.get(url)
            val doc = parseMTConnectXml(response.bodyAsText())

            doc.streams.forEach { stream ->
                stream.events.forEach { event -> emit(event) }
            }

            nextSequence = doc.header.nextSequence
            if (doc.streams.isEmpty()) delay(500)
        }
    }
}

Typical DataItems from MTConnect stream: execution (ACTIVE/STOPPED/INTERRUPTED), program (current program name), line (G-code line number), Xact/Yact/Zact (actual axis positions), Sspeed (spindle RPM), load (spindle load %).

OPC UA: Siemens Sinumerik

For Sinumerik 840D sl—OPC UA Server is built into NCU. Siemens namespace (urn:Siemens:SINUMERIK:NC) contains nodes for all CNC parameters: /NC/Channel/State/actSystemTime, /NC/Spindle/actSpeed, /NC/Axis/actPos.

Connection via Eclipse Milo (Java/Kotlin):

class SinumerikOpcUaClient(private val endpoint: String) {
    private lateinit var client: OpcUaClient

    suspend fun connect() {
        val endpoints = DiscoveryClient.getEndpoints(endpoint).await()
        val ep = endpoints.first { it.securityPolicyUri == SecurityPolicy.None.uri }

        client = OpcUaClient.create(ep.endpointUrl,
            endpointFilter = { it == ep },
            configurer = { config ->
                config.setIdentityProvider(UsernameProvider("OpcUaClient", "password"))
            })
        client.connect().await()
    }

    suspend fun readSpindleSpeed(): Double {
        val nodeId = NodeId.parse("ns=2;s=/NC/Spindle[u1,1]/actSpeed")
        val value = client.readValue(0.0, TimestampsToReturn.Both, nodeId).await()
        return (value.value.value as Number).toDouble()
    }

    fun subscribeToAxisPositions(callback: (AxisPositions) -> Unit) {
        val subscription = client.subscriptionManager.createSubscription(500.0).await()
        val nodes = listOf("Xact", "Yact", "Zact").map { axis ->
            NodeId.parse("ns=2;s=/NC/Channel[u1,1]/MachineAxis[$axis]/actPos")
        }
        // MonitoredItem for each axis with 100 ms interval
        subscription.createMonitoredItems(
            TimestampsToReturn.Both,
            nodes.map { MonitoredItemCreateRequest(ReadValueId(it, AttributeId.Value.uid(), null, null),
                MonitoringMode.Reporting, MonitoringParameters(0.0, 100.0, null, 10, true)) },
        ) { item, _ ->
            item.setValueConsumer { _, value ->
                // update axis position
            }
        }
    }
}

Safety of Control Commands

Writing commands to CNC (program change, cycle start) is a potentially dangerous operation. Requirements:

  1. Authentication and authorization: only authorized operators send commands. JWT with short TTL, MFA for critical operations.
  2. Network zone: CNC in isolated production network, API gateway is the single entry point with command logging.
  3. Locks: program start is blocked if machine door is open (data from safety PLC). Mobile app doesn't bypass physical interlocks.
  4. Audit: every command logged with timestamp, user ID, source IP.
suspend fun startProgram(programName: String) {
    // Pre-check state
    val state = getMachineState()
    require(state.doorsClosed) { "Machine door is open" }
    require(state.execution == Execution.STOPPED) { "Machine is not stopped" }
    require(state.emergencyStop == EmergencyStop.ARMED) { "E-Stop not armed" }

    auditLogger.log(Action.START_PROGRAM, programName, currentUser)
    mtConnectAdapter.sendCommand(StartProgramCommand(programName))
}

Uploading NC Programs

G-code programs (.nc, .mpf for Siemens, .cnc for Fanuc) are uploaded via FTP (LinuxCNC, most industrial CNCs support FTP server) or proprietary DNC interface. In Flutter:

Future<void> uploadNcProgram(File program, String remotePath) async {
  final ftp = FtpConnect(
    host: machineIp,
    user: ftpUser,
    pass: ftpPassword,
    timeout: 30,
  );

  try {
    await ftp.connect();
    await ftp.changeDirectory(remotePath);
    final uploaded = await ftp.uploadFile(program);
    if (!uploaded) throw Exception('FTP upload failed');
  } finally {
    await ftp.disconnect();
  }
}

Developing a mobile app for CNC monitoring and control via MTConnect or OPC UA: 10–16 weeks. Complexity determined by CNC type and scope of control functions. Cost individually quoted after interface audit of specific equipment.