Introduction to Python Programming
How to Join the Discord Support Forum01:42
What is Python and Example Applications in Industry09:39
Python Installation02:28
Installing the Visual Studio Code Editor01:16
Setting Up VSCode for Python Coding01:31
First Program 'Hello World in Python'02:38
Exercise: print('Introduce Yourself in the ControlByte Community')02:07
How to Download and Open Python Files for the Course?01:40
Displaying Data in Python - Introduction01:09
Basics of Displaying in CMD Console print("AC Voltage")02:17
Displaying Text and Numbers print("Current", 20.5, "A)02:11
Readable Message Formatting print("-" * 42)02:50
Python Interpreter and Newline Character print("\n")04:07
Changing the Separator print("PLC, HMI, sep=" -- ")01:43
Line End Parameter print("Sensor: OK, end="...")02:46
Task: Industrial Machine Startup Message05:40
Comments in Python According to PEP8
Python Comments - Introduction01:59
How to Download Python Programs for the Comments Module?
Single-line Comments and Docstrings05:33
Python PEP8 PDF Guide
Task: Machine Review - Add Comments01:42
Solution: Added Comments to Machine Review
Data Types and Variables in Python
Download Python Programs for Variables
Basic Types: int, float, str, bool06:03
How to Name Variables According to PEP8 Standard03:18
Calculations with Variables power = voltage * current03:50
Assigning Multiple Variables current, voltage, power = 10, 20, 3002:47
Task: Production Line Monitoring04:17
F-STRINGS - Professional Text Formatting in Python
Download Programs for F-STRING Module
Number Formatting f"Current: {current:.2f} A"02:40
F-string Calculations f"Efficiency: {produced / time_hours:.2f}02:12
F-string Alignment and Message Width04:05
Task: CNC Machine Diagnostic Message01:47
Solution: CNC Machine Diagnostic Message03:04
Input
Download Programs for input()
The input() Function - Entering Data from Keyboard03:34
Type Conversion int and float03:55
Type Conversion bool and str03:10
Task: Entering Machine Parameters02:16
Solution: Task - Entering Machine Parameters01:10
Arithmetic, Logical, and Comparison Operators
Download Programs for Operators
Arithmetic Operators: Addition, Subtraction, Multiplication06:23
Integer Division Operator // and Modulo %06:24
Exponentiation Operator power_loss = (motor_current ** 2) * cable_resistance04:53
Operator Precedence02:27
Logical Operators07:45
Comparison Operators09:46
Task: Conveyor Belt Work Analysis10:12
Solution: Conveyor Belt Work Analysis01:54
Conditional Statements IF, ELIF, ELSE
Download Programs for IF ELIF ELSE
IF Statement02:29
IF ELSE Statement01:20
IF ELIF ELSE Statement03:44
Liquid Tank - Level Checking03:00
Machine Operation Modes IF ELIF ELSE Condition03:51
Comparison Operators02:15
Nested Conditions04:40
Interactive Diagnostics02:42
Task: System Login02:59
Solution: System Login01:38
Loops and Iterations
Download Programs for Loops
While Loop03:35
While Temperature Monitoring02:35
While Infinite Loop03:14
For Loop with range()05:40
Iterating with Step in For Loop02:48
Pressure Measurements and Average Calculation02:21
Break - Stopping a For Loop03:15
Continue - Skipping the Rest of For Loop Iteration03:20
Pass - Placeholder for Future Code Development03:40
Nested For Loops03:49
Production Line Monitoring / PLC Variable Analysis10:04
Lists
Download Python Program Templates for LISTS
Creating a List - list = [1, 2, 3]03:42
Getting Elements from a List - list[0], list[-1]02:44
Checking How Many Elements a List Has - len(list)03:54
Changing Values in a List - list[2] = "new"02:43
List with Different Data Types - ["text", 3.14, True]02:34
Adding Elements to a List - append() and insert()02:55
Removing Elements from a List - remove(), pop(), del02:43
Sorting and Reversing a List - sort() and reverse()02:48
Counting and Searching - count(), index(), clear()02:07
Iterating Through a List - for x in list04:34
Index and Value in a Loop - for i, x in enumerate(list)03:40
Filtering a List with a Condition - if x > 10 in a Loop04:57
Checking if an Element is in a List - if x in list02:27
Slicing a List Fragment - list[1:4]03:26
Slicing Every nth Element - list[::2], list[::-1]02:47
Slicing Shortcuts - list[:3], list[-2:], list[:]03:36
Task: Production Trends Analysis02:25
Tuples
Download Programs for TUPLES
Creating Tuples and Basic Operations03:22
Accessing Tuple Elements - Indexing01:12
Immutable Tuples - Why They Cannot Change03:32
Tuple Unpacking - x, y, z = tuple02:33
Task: Modbus Registers Stored as Tuples06:13
Dictionaries
Download Programs for DICTIONARIES Module
Creating a Dictionary03:56
Accessing Values - dict[key], get()04:55
Checking if a Key Exists - key in dict02:32
Adding and Changing Values02:11
Removing Elements - pop(), del02:18
Merging Dictionaries - update()02:48
Methods keys(), values(), items()02:25
Iterating Through a Dictionary03:02
Searching by Value02:32
Filtering a Dictionary with a Condition02:50
Size and Clearing - len(), clear()05:44
Converting a Dictionary to a List03:49
List of Dictionaries - Sensor Table04:32
Building a List of Dictionaries - Event Log04:06
Parameter Table - Limits, Formatting, Validation05:58
Shift Report Built from a Dictionary09:07
Project: Processing Machine Alarm Priorities
Download Lessons for ANSI Project
Project - PLC/HMI Alarm List07:51
Solution - PLC/HMI Alarm List06:54
Functions
Download Program Templates for FUNCTIONS
First Function - def, Call, startup_report()03:36
Multiple Parameters - check_range()04:07
Functions in Practice - Sensor Report08:07
Returning Values - return, calc_average()07:01
Default Parameter Values06:14
Positional vs Named Arguments05:41
Returning Multiple Values05:40
Return in Practice - Production Calculator06:24
Local Variables and Scope05:31
Global Variables04:50
The global Keyword05:59
Scope in Practice - Configuration Constants08:34
Lambda - Short Anonymous Function04:36
Lambda with sorted(), min(), max()05:47
Lambda in Practice - filter(), map()08:37
Project: Electric Motor Diagnostics
Download Task Templates for FUNCTIONS
Hall Monitoring - check_range(), diagnose_machine()10:45
Task: Motor Diagnostics07:11
Solution: Motor Diagnostics10:18
Files and Modules
Download Program Templates for FILES and MODULES
Reading Files - open(), read(), readlines()10:40
Safe Reading - with open() as file04:14
Writing to a File - write(), modes w/a04:39
Shift Report - Generating a File06:33
Error Handling - try/except, ValueError06:21
Exception Types - ValueError, KeyError, IndexError07:34
else and finally Blocks07:25
Reading Measurement Data - load_measurements()11:20
math Module - sqrt(), ceil(), floor()07:23
random Module - randint(), choice()08:07
datetime Module - now(), strftime()06:48
Custom Module - import process_tools04:31
Project: Logging and Measurement Analysis
Download Program Templates for Logging Project
Measurement Logging System14:30
Log Analysis Task08:17
Log Analysis Solution11:51
SQLite Databases
Download Program Templates for SQL
Creating an SQLite Database - connect(), cursor(), commit()13:07
Table Schema - CREATE TABLE, Data Types, Primary Key02:29
SQL Basics - SELECT, INSERT, DELETE16:25
Queries - WHERE, ORDER BY, GROUP BY09:32
Task: Storing Measurements in a Database03:29
Production Reports - Exporting to TXT and CSV09:36
Task: Shift Reports from the Database02:51
MySQL / MariaDB
Connecting to MySQL / MariaDB09:05
MySQL GUI - Managing the Database Visually02:13
os / sys / main
Download Program Templates for os / sys / main
os Module - Paths and Directories11:59
File Operations with the os Module11:30
sys Module - Command-Line Arguments (argv)10:48
Streams and Paths - stdin, stdout, sys.path12:50
The main() Function - Program Entry Point03:33
Complete Program with main()03:19
Project: PLC Data Analyzer - Logging, Data Processing, User Interface, CSV/HTML Report
Download Program Templates for PLC Data Logger
PLC Data Analyzer - Project Architecture05:52
Project Configuration08:27
Terminal User Interface with ANSI Colors13:41
User Login System06:05
SQLite OEE Logger09:42
CSV Reports05:58
HTML Reports - Browser Dashboard07:15
Live Terminal Dashboard12:36
Sample Data Generation08:07
Simulating PLC Data08:12
Modbus TCP - Reading Data from a PLC11:22
Main Program Loop11:58
Application Tests08:04
Database Viewer03:25
Final Task: Extend the Analyzer02:34
Bonus: Downloading and Processing Data from Siemens PLC
Downloading and Processing Data from Siemens PLC - snap7 library21:56
Shorthand Operators