Vortrag from the Building IoT 2020 (https://www.buildingiot.de/lecture.php?id=10644&source=). Short presentation of the framework CRUNCH (https://github.com/pragmaticminds/crunch) and its upcoming integration in the PLC4X project (plc4x.apache.org).
2. Wer sind wir?
PRAGMATIC
INDUSTRIES
GMBH
Dr. Julian Feinauer
@jfeinauer2
- Gegründet 2016
- Gründer und Geschäftsführer
- Sitz in Kirchheim unter Teck
- Standort in Magdeburg
- Maschinendatenanalyse
- Digitalisierung
- Industrie 4.0
- Aktuell 18 Mitarbeiter
- Gestartet in 2015
- Seit 2018 Open Source
- Seit 2019 Teilprojekt von
PLC4X
- Integration läuft gerade
6. The Industrial Internet of Things
PLCs
Sensors
Actors
Hundreds of internal variables
• 10-100 Sensors
• Scaling
• Data types
• 10-100 Actors
• Different technologies
• Metadata is important
7. The Industrial Internet of Things
PLCs
Sensors
Actors
• No discrete Events
• Timeseries!
• Events have to be extracted
based on
• ... absolute values (thresholds)
• ... (bit-)triggers / value changes
• ... derivatives
• ...
• è Stream Processing at
the Edge!
9. (Classic-)Definition
“A data stream can be seen as a
continuous and potentially infinite
stochastic process in which events occur
independently from another”
12. Digital Cockpit
è Mit dem Digital Cockpit von pragmatic industries lassen sich einfach
und schnell Daten aus Steuerungen auslesen, aufbereiten und
visualisieren. Die Kommunikation basiert komplett auf Apache PLC4X.
14. A simple Excercise
• Monitor Productivity, i.e., Parts produced
– Read out the counter every x seconds
– If value changed, store the new value in the DB
– Update UI
• Boundary Conditions
– Has to work
– Really has to Work
– Tough Conditions
• What could possibly go wrong?
– Is there a Counter?
– Custom Code for checking if value changed
– Unexpected shutdowns
– Connection losses
15. Is there a Counter? Lets assume yes!
Connection Building takes too much time!
17. Sadly, we have no counter...
• BUT... we have a bit indicating that a cycle is running
• So we can detect positive flanks of the bit!
18. We are not satisfied, still...
We still have issues here...
• What if disconnects occur?
• How do we handle parallel
access from other app
parts?
• Connection Pooling?
• Rate Limiting?
• Circuit Breaker?
19. Does that feel right to you?
Where is the framework for the heavy lifting?
20. CRUNCH to the rescue, together with PLC4X
„The aim of CRUNCH is to make it easy and declarative
to perform analytics on timeseries datasets with a focus to
data from machines and industrial applications.“
Currently: https://github.com/pragmaticminds/crunch
Soon: Part of PLC4X (plc4x.apache.org)
22. What is an Evaluation Function in CRUNCH?
• A CRUNCH Context provides a Pipeline with shared input and output
• EvaluationFunction is a simple mapping of one input to zero or more
Events
• Late Binding of Types (“Shemaless“)
• Channel Arithmetics possible
• Many extensions of EvaluationFunction exist
– LambdaEvaluationFunction
– TriggeredEvaluationFunction
– WindowedEvaluationFunction
– MultiStepEvaluationFunction
34. Short summary
• CRUNCH solves all problems you have (and you didnt know that they exist!)
• Declarative approach makes „signal processing“ easier
• CRUNCH can also handle PLC4X connections for you with refined strategies
– Connection pooling
– Automatic reconecction
– Rate Limiting
– Circuit Breaking
• So you only need to focus on WHAT your machine does and WHAT
customer wants or needs
• I dont even need to sell it to you as ist already FREE
• We are happy for everybody joining our little community