Siemens TM NPU MicroPython Programming Manual

Siemens TM NPU MicroPython programming manual covering API2 changes, TM NPU-specific modules, shaves, hardware accelerators and supported MicroPython modules.


Siemens TM NPU MicroPython Programming Manual - cover page
Brand
Siemens
Category
Industrial Robot
Document type
User Manual
Language
English
Pages
38
File format
PDF
File size
577 KB
Published
05 December, 2026
Updated
05 December, 2026
MD5 checksum
106577BDA60667808A37166469A39F36

About this manual

This document is the TM NPU MicroPython Programming Manual from Siemens, dated 06/2025 and numbered A5E52728839-AB. It describes the additional modules added to the TM NPU port of MicroPython, including PLC_WITHOUT_PROTOCOL, NPUFS, CAMERA, VID_PIPELINE and NEURAL_NETWORK, and how they are used for classification or object detection applications.

The manual also covers the use of shaves and hardware accelerators, the MicroPython modules supported on the TM NPU, general notes and troubleshooting, and a changelog of log-relevant API changes from V2.0.1 to V2.0.2.

What's inside

  • Introduction
  • Release Notes: Changes in API2
  • TM NPU-specific MicroPython modules
  • PLC_WITHOUT_PROTOCOL: Communicating with a connected PLC
  • NPUFS: Accessing the NPU filesystem
  • CAMERA: Accessing connected cameras
  • VID_PIPELINE: Configuring the video pipeline
  • NEURAL_NETWORK: Initializing and executing neural networks
  • Use of shaves and hardware accelerators
  • Supported MicroPython modules on the TM NPU

Specifications

MicroPython version1.12
CPython version3.9.6
API releaseV2.0.2
Camera resolutionup to 2MP
Document numberA5E52728839-AB

Frequently asked questions

What does the PLC_WITHOUT_PROTOCOL module provide access to?

It gives access to the process image of the PLC. The first two bytes of the entire process image of inputs and outputs are reserved as status, error and control bytes and cannot be accessed through the MicroPython API; the remaining bytes are user-defined message bytes accessed with plc.read() and plc.write().

Which module is used to initialize and execute a neural network?

The neural_network module is used to initialize a neural network (blob file) from the SD Card or an FTP Server, provide it with a frame and execute it. The neural network makes use of the hardware accelerator automatically and returns results.

What changed in API2 with V2.0.2?

The camera module's supported resolutions for GigE vision and external image were extended up to 2MP and can be set freely within the defined range. The start_streaming(), read_raw() and read_processed() functions of the vid_pipeline module also gained a timeout parameter.

Is there a prepared protocol for message handling between the TM NPU and PLC?

No. There is no prepared protocol implemented for message handling between the TM NPU and PLC, for example indicating whether the module is in a ready, busy or done state or whether information was updated. If required, this would have to be realized by the application.

Download PDF (577 KB)

More Siemens Manuals


View all Siemens manuals →