SlideShare a Scribd company logo
Machinekit
CurrentStatusofMachinetalk
Alexander Rössler
2
Overview
● Machinetalk Quick Intro
● Use in Machinekit
● Machinetalk GSL
● Machinetalk Generic
● Pymachinetalk
3
Whatis Machinetalk?
4
Machinetalk
● Middleware
● Component Component↔
● RT Userland↔
● Local Remote↔
Application Application
Middleware
API
Platform
Technology
API
Communication
Middleware
API
...
...
5
UseCase 1–Multi UI
Single-Board
Computer
User Interface 1
User Interface 2
Machine Tool
6
UseCase 2–MultiControl
Single-Board
Computer
Machine Tool
Workstation
Single-board
Computer
Machine Tool
7
UseCase 3–InternalandExternal
Single-Board
Computer
Workstation
Smart Device
Remote
Pendant
GCode
Interpreter
Task
Controller
Motion
Controller
HAL
Web UI
Web
Bridge
Machine Tool
8
Parts
Machinetalk
ZeroMQ
Protobuf
DNS-SDovermDNS
OS, Platform Technology
Protocol
Components
Transport / Messaging
Serialization
Service Discovery
Services
9
Howis Machinetalk
used inmachinekit?
10
Scope
Remote UI
API
HALHaltalk
Local UI
API
Motion
Controller
API
Trajectory
Planner
Client 1
Real-Time Environment
Real-Time Host 1
Task
Executor
GCode
Interpreter
Webtalk
Bridge
Client 2
MTMT
MTMTMTMT
ZeroMQ
Protobuf
Ring Buffers
Real-Time Host 2
Real-Time Environment
API
HAL
Userspace
Application
Fieldbus
Client 3
Web App
RB
RB
RB
RB
Websockets
JSON/Protobuf
WTWT
Protobuf
11
Services & Components
Component Services
Haltalk halrcmd, halrcomp, (halgroup)
msgd log
mklauncher launcher, launchercmd
configserver config
mkwrapper status, command, error, file
previewmodule preview, previewcmd
12
Close Up
Application
HAL Remote
Component
Client
Remote
Component
HAL Instance
Real-Time Environment
Real-Time Host
Haltalk
HAL Remote
Component
halrcmd
halrcomp
ZeroMQ
Protobuf
API
13
WhataboutNML?
● Replace with Machinetalk
→ not completed
● Major refactoring of the CNC Stack
14
What’s the dealwith
Machinetalk GSL?
15
Reasons
● Not only Protobuf + ZMQ + DNS-SD/mDNS
● Knowledge embedded in code
● Repetitive across languages
● Protocols better formalized
● Protobuf Messages↔
16
Imatix/GSL
● Model Oriented Programing
● Control Model + Generator
XML Model
.xml
GSL
Interpreter
Generated
Code
.cpp, .py, ...
GSL Template
.gsl
17
Example
18
HalremoteinFSMs
down
trying
Start
[Start]
/ Start Socket
/ Reset Heartbeat Liveness
/ Send Ping
/ Start Heartbeat Timer
Stop
[Stop]
/ Stop Heartbeat Timer
/ Stop Socket
up
Any Msg Received
[* Msg Received]
/ Reset Heartbeat Liveness
/ Reset Heartbeat Timer
Stop
[Stop]
/ Stop Heartbeat Timer
/ Stop Socket
Heartbeat Timeout
[Heartbeat Timeout]
/ Stop Socket
/ Start Socket
/ Reset Heartbeat Liveness
/ Send Ping
Heartbeat Timeout
[Heartbeat Timeout]
/ Stop Socket
/ Start Socket
/ Reset Heartbeat Liveness
/ Send Ping
Heartbeat Tick
[Heartbeat Tick]
/ Send Ping
Any Msg Sent
[* Msg Sent]
/ Reset Heartbeat Timer
Heartbeat Tick
[Heartbeat Tick]
/ Send Ping
Any Msg Received
[* Msg Received]
/ Reset Heartbeat Liveness
Any Msg Sent
[* Msg Sent]
/ Reset Heartbeat Timer
down
entry / Set Disconnected
exit / Set Connecting
trying
Connect
[Start]
/ Add Pins
/ Start Halrcmd Channel
Disconnect
[Stop]
/ Stop Halrcmd Channel
/ Stop Halrcomp Channel
/ Remove Pins
bind
Halrcmd Up
[Halrcmd State Up]
/ Bind Component
binding
Halrcomp Bind Msg Sent
[Halrcomp Bind Msg Sent]
syncing
No Bind
[No Bind]
/ Start Halrcomp Channel
Disconnect
[Stop]
/ Stop Halrcmd Channel
/ Stop Halrcomp Channel
/ Remove Pins
Halrcmd Trying
[Halrcmd State Trying] Bind Confirmed
[Halrcomp Bind Confirm Msg Received]
/ Start Halrcomp Channel
error
entry / Set Error
Bind Rejected
[Halrcomp Bind Reject Msg Received]
/ Stop Halrcmd Channel
Disconnect
[Stop]
/ Stop Halrcmd Channel
/ Stop Halrcomp Channel
/ Remove Pins
Halrcmd Trying
[Halrcmd State Trying]
/ Stop Halrcomp Channel
Sync Failed
[Halrcomp Error Msg Received]
/ Stop Halrcomp Channel
/ Stop Halrcmd Channel
synced
entry / Set Connected
Halrcomp Up
[Halrcomp State Up]
Disconnect
[Stop]
/ Stop Halrcmd Channel
/ Stop Halrcomp Channel
/ Remove Pins
Disconnect
[Stop]
/ Stop Halrcmd Channel
/ Stop Halrcomp Channel
/ Remove Pins
Halrcmd Trying
[Halrcmd State Trying]
/ Stop Halrcomp Channel
/ Unsync Pins
/ Set Timeout
Halrcomp Trying
[Halrcomp State Trying]
/ Unsync Pins
/ Set Timeout
Set Rejected
[Halrcomp Set Reject Msg Received]
/ Stop Halrcomp Channel
/ Stop Halrcmd Channel
Halrcomp Set Msg Sent
[Halrcomp Set Msg Sent]
down
trying
Start
[Start]
/ Start Socket
Stop
[Stop]
/ Stop Heartbeat Timer
/ Stop Socket
up
Full Update Received
[Full Update Msg Received]
/ Reset Heartbeat Liveness
/ Start Heartbeat Timer
Stop
[Stop]
/ Stop Heartbeat Timer
/ Stop Socket
Heartbeat Timeout
[Heartbeat Timeout]
/ Stop Heartbeat Timer
/ Stop Socket
/ Start Socket
Heartbeat Tick
[Heartbeat Tick]
/ Reset Heartbeat Timer
Any Msg Received
[* Msg Received]
/ Reset Heartbeat Liveness
/ Reset Heartbeat Timer
19
Layering
Channel Layer
Implementation Layer
Subscriber RpcClient
«abstract»
RemoteComponentBase
RemoteComponent
Composition Layer
Model
20
CodeGeneration
ProtosProtos
Protocol
Model
Component
Model
Code
Generator
ProtoBuf
Compiler
uses
Base
Class
Message
Classes
Message
GSL
Template
Protos
Component
Class
21
Addinga newLanguageBinding
● Find libs
● Write MVP
● Build a code generator
● Implement details
Find
Requirements
Proof of
Concept
Generalize
1. 2. 3.
Specialize
4.
22
GSLConclusion
● Perfect for protocols
● Less repetitive
● Focus on good models
● Consistency across languages
23
Applications
● QtQuickVcp
● pymachinetalk
● WebVCP (webtalk-ng)
● node-machinetalk (not in production)
24
More
● Formal Verification - UPPAAL
● SCXML support
25
Canweuse
Machinetalkforother
applications?
26
Machinetalk Generic
● Generalizes
– machinetalk-protobuf
– machinetalk-gsl
● multiple “Machinetalks” can live side-by-side
● Adds project namespace/package
● Generate client and server base
27
Howtouse
● Fork machinetalk-protobuf
● Fork machinetalk-gsl
● Change/add project name alias
● Implement your protocols
● Define your message structure
● Generate
● Implement
28
Whatisthe current
status of
pymachinetalk?
29
Update
● Continued work
● Implemented mt-gsl
● Replaced avahi with zeroconf
● Easier to use serivce discovery
● Available via PyPI
30
Example
import time
from pymachinetalk.dns_sd import ServiceDiscovery
import pymachinetalk.halremote as halremote
sd = ServiceDiscovery()
rcomp = halremote.RemoteComponent('anddemo', debug=False)
rcomp.newpin('button0', halremote.HAL_BIT, halremote.HAL_OUT)
rcomp.newpin('button1', halremote.HAL_BIT, halremote.HAL_OUT)
led_pin = rcomp.newpin('led', halremote.HAL_BIT, halremote.HAL_IN)
sd.register(rcomp)
sd.start()
try:
while True:
if rcomp.connected:
print('LED status %s' %s str(led_pin.value)
time.sleep(0.5)
except KeyboardInterrupt:
pass
sd.stop()
31
Questions?

More Related Content

PDF
FreeBSD VPN Server
KEY
Why I <3 Laravel 4
PDF
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
PDF
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
PPT
PDF
Prezentacja zimowisko 2014
PDF
Nmap scripting engine
PDF
Zeromq anatomy & jeromq
FreeBSD VPN Server
Why I <3 Laravel 4
Beginner's Guide to the nmap Scripting Engine - Redspin Engineer, David Shaw
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Prezentacja zimowisko 2014
Nmap scripting engine
Zeromq anatomy & jeromq

What's hot (20)

DOC
Cisco be6000 solution
PDF
How to Leverage Go for Your Networking Needs
PDF
Pound & Varnish - Cache e Balanceamento de Carga
PDF
Improving monitoring systems Interoperability with OpenMetrics
PDF
Ostinato FOSS.IN 2010
KEY
Distributed app development with nodejs and zeromq
PPT
Lecture8
PDF
Proactive monitoring with Monit
PPTX
Understanding iptables
PPTX
Per tenant QoS enhancements in Openvswitch
PPTX
04 18-2018--nmap port-80_blue_after_netcat
PPT
Nmap(network mapping)
PPTX
DHCP SERVER ( RHCE Linux)
KEY
Movable Type 5.2 Overview at MTDDC 2012
PDF
HTTP/2 and SSL/TLS state of art in ASF servers
PDF
nullcon 2010 - Software Fuzzing with Wireplay
PPTX
Write a redis client of your own
PPT
Александр Зайцев - Port Knocking, short notes
PDF
Nmap tutorial
ODP
libpcap
Cisco be6000 solution
How to Leverage Go for Your Networking Needs
Pound & Varnish - Cache e Balanceamento de Carga
Improving monitoring systems Interoperability with OpenMetrics
Ostinato FOSS.IN 2010
Distributed app development with nodejs and zeromq
Lecture8
Proactive monitoring with Monit
Understanding iptables
Per tenant QoS enhancements in Openvswitch
04 18-2018--nmap port-80_blue_after_netcat
Nmap(network mapping)
DHCP SERVER ( RHCE Linux)
Movable Type 5.2 Overview at MTDDC 2012
HTTP/2 and SSL/TLS state of art in ASF servers
nullcon 2010 - Software Fuzzing with Wireplay
Write a redis client of your own
Александр Зайцев - Port Knocking, short notes
Nmap tutorial
libpcap
Ad

Similar to Machinekit - Current Status of Machinetalk (20)

PDF
LinuxCNC 入門簡介
PDF
Ping to Pong
PDF
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
PDF
Defcon 2011 - Penetration Testing Over Powerlines
PPTX
Ppt on six month training on embedded system & IOT
PPTX
Linux cnc overview
PDF
Adventures in Femtoland: 350 Yuan for Invaluable Fun
PPTX
5-Tut3_Networking_with_Python.pptx good intro
PDF
Plan 9カーネルにおけるTCP/IP実装(未完)
PPTX
MQTT enabling the smallest things
PDF
Intra Institutional Communication System
PPTX
Rsockets ofa12
PDF
DefCon 2012 - Sub-1 GHz Radio Frequency Security
PPTX
Server-side WebRTC Infrastructure
PDF
An In-Depth Look Into Microcontrollers
 
PDF
Kordik fundamental guidtoindustrialnetworking -v_imp
PPTX
Null mumbai-iot-workshop
PDF
Intercoms presentation OSSIR - IoT Hacking
PDF
Inter Process Communication
PPTX
MicroProcessors and MicroControllersUnit3
LinuxCNC 入門簡介
Ping to Pong
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Defcon 2011 - Penetration Testing Over Powerlines
Ppt on six month training on embedded system & IOT
Linux cnc overview
Adventures in Femtoland: 350 Yuan for Invaluable Fun
5-Tut3_Networking_with_Python.pptx good intro
Plan 9カーネルにおけるTCP/IP実装(未完)
MQTT enabling the smallest things
Intra Institutional Communication System
Rsockets ofa12
DefCon 2012 - Sub-1 GHz Radio Frequency Security
Server-side WebRTC Infrastructure
An In-Depth Look Into Microcontrollers
 
Kordik fundamental guidtoindustrialnetworking -v_imp
Null mumbai-iot-workshop
Intercoms presentation OSSIR - IoT Hacking
Inter Process Communication
MicroProcessors and MicroControllersUnit3
Ad

More from Alexander Rössler (6)

PDF
Machinekit - Machinekit Basics Workshop
PDF
Machinekit - Machine Control Ready for the Internet of Things
PDF
Machinekit - In 5 Minutes
PDF
Machinekit - Build Real Time Systems with Python
PDF
QtQuickVcp - Remote User Interfaces for Machine Tools
PDF
Machinekit - The Python Machinetalk Bindings
Machinekit - Machinekit Basics Workshop
Machinekit - Machine Control Ready for the Internet of Things
Machinekit - In 5 Minutes
Machinekit - Build Real Time Systems with Python
QtQuickVcp - Remote User Interfaces for Machine Tools
Machinekit - The Python Machinetalk Bindings

Recently uploaded (20)

PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
history of c programming in notes for students .pptx
PPTX
assetexplorer- product-overview - presentation
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
medical staffing services at VALiNTRY
17 Powerful Integrations Your Next-Gen MLM Software Needs
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms II-SECS-1021-03
AutoCAD Professional Crack 2025 With License Key
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Odoo Companies in India – Driving Business Transformation.pdf
Download FL Studio Crack Latest version 2025 ?
Complete Guide to Website Development in Malaysia for SMEs
Patient Appointment Booking in Odoo with online payment
Oracle Fusion HCM Cloud Demo for Beginners
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
history of c programming in notes for students .pptx
assetexplorer- product-overview - presentation
Salesforce Agentforce AI Implementation.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Digital Systems & Binary Numbers (comprehensive )
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
medical staffing services at VALiNTRY

Machinekit - Current Status of Machinetalk