Back to Browse

One Function, Multiple Data Types? Use VARIANT! (Bool, Int, Real Guide) | Live 23

429 views
Streamed live on Feb 21, 2026
24:26

Learn how to use the powerful VARIANT data type in TIA Portal to build one function that accepts multiple data types โ€” BOOL, INT, and REAL โ€” in SIMATIC S7-1200 and SIMATIC S7-1500 PLCs. In this step-by-step tutorial, youโ€™ll discover how to create generic Function Blocks (FBs) in SCL and use VARIANT, VariantGet, VariantPut, TypeOf, and safe assignment (?=) to dynamically detect and process different data types in one reusable block. This tutorial is suitable for PLC programmers who want cleaner code, and advanced TIA Portal programming techniques. ๐Ÿ’›๐Ÿ’› Want to Learn PLC Programming? ๐Ÿ’›๐Ÿ’› Discover my comprehensive PLC programming courses on ๐Ÿ’š๐Ÿ’š Udemy! ๐Ÿ’š๐Ÿ’š Whether you're a beginner or aiming to elevate your skills, these courses cover everything from foundational concepts to advanced techniques. 1-Programming S7-1200 PLC with Siemens TIA Portal & Factory IO https://bit.ly/3XbQL2h 2-Programming Siemens Simatic S7-300/400 https://bit.ly/3XuwIxy 3-Allen Bradley training - RSLogix 500/5000 Series https://bit.ly/3B3GKwA 4-Complete Delta PLC programming Course with ISPSoft & Factory IO https://bit.ly/4gaPp0t 5- CODESYS PLC programming tutorial for beginners https://bit.ly/3XxebRh 6- Camtasia Mastery & training and tutorial course https://bit.ly/3ZcYrnz 7- Excellent PLC projects for engineering students - Part 1 https://bit.ly/4gLlzzf 8- Excellent PLC projects for engineering students - Part 2 https://bit.ly/40dBZK7 ๐Ÿ’›๐Ÿ’›๐Ÿ’›๐Ÿ’›๐Ÿ’›๐Ÿ’›๐Ÿ’›๐Ÿ’› If you still have more questions, participate in our weekly live program! Weekly Live Program โ€“ Every Saturday: 10:00 PM India (IST) 11:30 AM Eastern Time (US, EST) 4:30 PM UTC

Download

1 formats

Video Formats

360pmp437.0 MB

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

One Function, Multiple Data Types? Use VARIANT! (Bool, Int, Real Guide) | Live 23 | NatokHD