Uploaded May 2026 | Updated September 2026, 3 weeks ago
In this video, I show you how to use Python Function Blocks in OpenPLC v4 one of the most powerful and underused features of the platform.
We build two examples from scratch:
✅ Example 1 — Hello World
Read a simulated PLC variable directly in Python and print it to the PLC Logs. No hardware needed. Runs entirely in the OpenPLC simulator.
✅ Example 2 — Live Cloud Telemetry
Send that same value to ThingsBoard Cloud via HTTP — using only Python's
standard library. No MQTT. No pip install. No third-party packages.
Watch the sine wave graph update live on the dashboard.
─────────────────────────────────────
🔗 LINKS & RESOURCES
─────────────────────────────────────
📖 Wiki Documentation:
wiki.codeandcompile.com/product-reviews/smart-platforms/virtual-plcs/autonomy-edge-openplc-redefined/openplc-with-python-fb
🛠️ Autonomy Edge IDE (OpenPLC Editor):
edge.autonomylogic.com
📊 ThingsBoard Cloud (Free):
https://thingsboard.cloud
─────────────────────────────────────
⏱️ TIMESTAMPS
─────────────────────────────────────
00:00 - Introduction
00:53 — What is a Python Function Block?
01:40 — Shared memory architecture
02:40 — Python Functions
03:18 — Python Libraries
03:31 — Example 1: Console Print (Simulated Temp.)
11:20 — Example 2: ThingsBoard Cloud Telemetry
21:30 — Key Gotchas & Lessons Learned
22:26 — Outro
─────────────────────────────────────
🎓 OPENPLC SERIES — FULL PLAYLIST
─────────────────────────────────────
▶ Video 1 — OpenPLC Setup & Introduction
▶ Video 2 — IO-Link Sensors via Modbus TCP/IP
▶ Video 3 — Python Function Blocks (this video)
─────────────────────────────────────
🔔 If this helped you, like and subscribe — it keeps this content free!
─────────────────────────────────────
#OpenPLC #Python #IIoT #IndustrialAutomation #ThingsBoard #SCADA #PLC #EdgeComputing #Automation #FreeAutomation
For daily/weekly updates, follow us:
🧑💻 E-learning platform: learn.codeandcompile.com
💻 Website: codeandcompile.com
📕 Wiki: wiki.codeandcompile.com
📸 Instagram: instagram.com/rajvir.codencompile
In this video, I show you how to use Python Function Blocks in OpenPLC v4 one of the most powerful and underused features of the platform.
We build two examples from scratch:
✅ Example 1 — Hello World
Read a simulated PLC variable directly in Python and print it to the PLC Logs. No hardware needed. Runs entirely in the OpenPLC simulator.
✅ Example 2 — Live Cloud Telemetry
Send that same value to ThingsBoard Cloud via HTTP — using only Python's
standard library. No MQTT. No pip install. No third-party packages.
Watch the sine wave graph update live on the dashboard.
─────────────────────────────────────
🔗 LINKS & RESOURCES
─────────────────────────────────────
📖 Wiki Documentation:
wiki.codeandcompile.com/product-reviews/smart-platforms/virtual-plcs/autonomy-edge-openplc-redefined/openplc-with-python-fb
🛠️ Autonomy Edge IDE (OpenPLC Editor):
edge.autonomylogic.com
📊 ThingsBoard Cloud (Free):
https://thingsboard.cloud
─────────────────────────────────────
⏱️ TIMESTAMPS
─────────────────────────────────────
00:00 - Introduction
00:53 — What is a Python Function Block?
01:40 — Shared memory architecture
02:40 — Python Functions
03:18 — Python Libraries
03:31 — Example 1: Console Print (Simulated Temp.)
11:20 — Example 2: ThingsBoard Cloud Telemetry
21:30 — Key Gotchas & Lessons Learned
22:26 — Outro
─────────────────────────────────────
🎓 OPENPLC SERIES — FULL PLAYLIST
─────────────────────────────────────
▶ Video 1 — OpenPLC Setup & Introduction
▶ Video 2 — IO-Link Sensors via Modbus TCP/IP
▶ Video 3 — Python Function Blocks (this video)
─────────────────────────────────────
🔔 If this helped you, like and subscribe — it keeps this content free!
─────────────────────────────────────
#OpenPLC #Python #IIoT #IndustrialAutomation #ThingsBoard #SCADA #PLC #EdgeComputing #Automation #FreeAutomation
For daily/weekly updates, follow us:
🧑💻 E-learning platform: learn.codeandcompile.com
💻 Website: codeandcompile.com
📕 Wiki: wiki.codeandcompile.com
📸 Instagram: instagram.com/rajvir.codencompile










