Back to Browse

Code Your First PLC Program: Structured Text (ST) in B&R Automation Studio

427 views
Dec 1, 2025
20:44

In this video, we provide a step-by-step guide on how to create, test, and run a Structured Text (ST) program using B&R Automation Studio 4.12. This tutorial is perfect for beginners looking to understand the fundamentals of ST within the B&R ecosystem, utilizing a simulated environment to practice without physical hardware. What you will learn in this video: Project Setup: Creating a new project and configuring hardware for simulation mode. ARsim Configuration: Activating and verifying the Automation Runtime simulation. ST Program Creation: Adding an "All-in-One" Structured Text program containing Init, Cyclic, and Exit functions. Variable Management: Declaring and initializing Boolean variables. Coding Logic: Writing a simple toggle logic using IF-THEN-ELSE statements. Debugging & Troubleshooting: Identifying common syntax errors (like missing semicolons) and using the compiler output. Monitoring & Watching: Using Monitor Mode and Watch Windows to track variable states in real-time. Task Class Management: Adjusting the execution frequency of your program to optimize CPU resources. Key Timestamps: [00:21] – Opening Automation Studio and creating a new project. [01:59] – Activating the simulated environment (ARsim). [03:55] – Adding a Structured Text (ST) program to the Logical View. [05:29] – Renaming program components and declaring variables. [07:41] – Explaining the Init and Cyclic functions within the ST script. [09:40] – Writing the toggle logic code. [11:53] – Compiling the project and fixing syntax errors. [14:11] – Transferring the program to the simulated target. [15:19] – Using Monitor Mode to view live variable states. [16:27] – Using the Watch Window to force variable changes. [17:33] – Changing the Task Class to adjust execution frequency (e.g., from 100ms to 1s). Structured Text is a powerful, high-level language used widely in industrial automation. By following this tutorial, you'll gain the confidence to start building your own complex logic within the B&R platform. If you found this video helpful, please Like and Subscribe for more tutorials on B&R Automation and industrial technology! ☕ If you enjoyed this content and you want to support the Channel, you can buy me a coffee here ❤️ If you prefer PayPal: https://ko-fi.com/m_a_c If you prefer Google Pay / Apple Pay: https://buymeacoffee.com/m_a_c Thank you so much for your support! 🫶 #BandRAutomation #AutomationStudio #StructuredText #PLCProgramming #IndustrialAutomation #ARsim #PLCTutorial #STProgramming #SmartManufacturing

Download

1 formats

Video Formats

360pmp426.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Code Your First PLC Program: Structured Text (ST) in B&R Automation Studio | NatokHD