Variable Retention in XGB PLCs: Cold Start vs Warm Start Explained!

Опубликовано: 09 Август 2026
на канале: ACC Automation: PLC & Industrial Control Learning
843
9

XGB PLC variables, memory and scope — how memory is mapped, which areas are retentive, how pointers work, and where in your program each variable is visible.

⚡ QUICK ANSWER
Variables are placeholders for the data your program works with — integers, floating-point numbers, strings and more — which you manipulate through maths, comparisons and other operations. On the LS Electric XGB you normally declare them before you start programming, though you can declare them at any point. Two things about them matter in practice. The first is memory mapping: the XGB divides its memory into areas with different purposes and addressing, and some of those areas are retentive — meaning their contents survive a power cycle — while others are cleared on startup. Knowing which is which is essential, because a production count or a machine state stored in non-retentive memory will silently reset every time the panel is powered down. The XGB also supports indirect addressing, or pointers, so an instruction's target location can change while the program runs. The second is scope: where in the program a variable can be accessed. A variable with global scope is visible everywhere, while a local one exists only within a specific block — which keeps programs organised and prevents one routine from unintentionally overwriting another's data. The full breakdown is in the guide below.

📖 FULL WRITTEN TUTORIAL + DOWNLOADS (memory map, retentive areas, scope)
https://accautomation.ca/ls-electric-...

⏱️ TIMESTAMPS
0:00 - Introduction: XGB Variables and Scope
1:24 - XGB Memory
1:42 - PLC Memory Mapping
2:41 - Retentive Memory Areas
4:22 - Indirect Addressing (Pointers) on the XGB
4:35 - Variable Scope in the XGB PLC

📚 WHAT YOU'LL LEARN
✅ What variables are and what data types they hold
✅ How the XGB's memory is mapped and addressed
✅ Which memory areas are retentive and survive a power cycle
✅ How indirect addressing (pointers) works on the XGB
✅ What variable scope means and why it keeps programs organised

❓ FREQUENTLY ASKED
Q: What is retentive memory in a PLC?
A: Memory whose contents survive a power cycle. Non-retentive areas clear on startup, so anything that must persist — a production count, a machine state, a recipe setting — has to live in a retentive area. The full memory map is in the guide.

Q: What is variable scope in PLC programming?
A: It's the area of the program where a variable can be accessed. Global variables are visible throughout the program; local ones exist only within a specific block, which keeps things organised and prevents routines from overwriting each other's data.

Q: What is indirect addressing on the XGB?
A: Pointer addressing — storing a memory address rather than hard-coding it, so an instruction's target location can change while the program runs. It's what makes handling large data sets practical.

👉 Full breakdown: https://accautomation.ca/ls-electric-...

🔗 MORE RESOURCES
🎮 Free ACC PLC Simulator (3D scenes, no install): https://accautomation.ca/simulator/
▶ LS Electric XGB PLC Series: https://accautomation.ca/series/ls-el...
▶ Indirect Addressing in Click, Do-More & Productivity:    • The Most Overlooked PLC Instruction That S...  
▶ Your First XGB Ladder Logic Program:    • XG5000 Ladder Logic: From Setup to Running!  
▶ XGB PLC FAQ: https://accautomation.ca/series/ls-el...
▶ PLC Beginners Guide: https://accautomation.ca/programming/...
▶ Free eBooks: https://accautomation.ca (subscribe for download)

🛒 RECOMMENDED HARDWARE
▶ Shop: https://www.automationdirect.com/
▶ Parts Guide: https://www.accautomation.ca/purchase...

💬 Questions? Drop a comment below.

🔔 New tutorials every Monday — Subscribe and hit the bell!

#PLC #LadderLogic #IndustrialAutomation #PLCProgramming #ACCAutomation #LSElectric #XGB #PLCMemory #Retentive #IEC61131

Regards,
Garry
ACC Automation
http://www.accautomation.ca