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
Dictionaries
Download Programs for DICTIONARIES Module
Project: Processing Machine Alarm Priorities
Functions
Download Program Templates for FUNCTIONS
Project: Electric Motor Diagnostics
Download Task Templates for FUNCTIONS
Files and Modules
Download Program Templates for FILES and MODULES
Project: Logging and Measurement Analysis
Download Program Templates for FILES and MODULES
Project: PLC Data Analyzer – Logging, Data Processing, User Interface, CSV/HTML Report
Download Program Templates for PLC Data Logger
Bonus: Downloading and Processing Data from Siemens PLC
Downloading and Processing Data from Siemens PLC – snap7 library21:56
Size and Clearing – len(sensor), temp_data.clear()