Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
English (US)
US English (US)
DE German
CN Chinese
MX Spanish (Mexico)
Chinese (Simplified)
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Programming (AMX)
  • Programming

AMX Persistent Variable FAQ

Written by Gary Brindley

Updated at December 29th, 2025

Table of Contents

1. How do persistent variables keep their value? 2. Why can't I use CLEAN DISK to reset the value of persistent variables? 3. What are some ways to reset the value of persistent variables? 4. Why don't persistent variables work in modules?

1.  How do persistent variables keep their value?

When you reboot after downloading a new program, the master loads the new program into memory before erasing the old one.  The master searches through the two programs for matching persistent variables; i.e., a variable with the same variable name, source location (filename), and variable type.  It then updates the new program with the persistent values from the old, and when it's finished, it deletes the old program from memory.

2.  Why can't I use CLEAN DISK to reset the value of persistent variables?

CLEAN DISK does not clear the RAM memory.  That's where the values are stored (with the rest of the running program).

3.  What are some ways to reset the value of persistent variables?

  • To clear all the values - change the name of the program, download, and reboot.
  • To clear all the values - download a different program, reboot.
  • To clear one value - change it's name; e.g., rename "nFlag" to "Flag".
  • To clear one value - change it's type; e.g., instead of declaring "Flag" as INTEGER, declare it as LONG or CHAR.
  • To set variables to a specific value only on the first download, use the code below:

DEFINE_VARIABLE

PERSISTENT INTEGER nVARS_SET

PERSISTENT INTEGER nSOME_VAR_1

PERSISTENT INTEGER nSOME_VAR_2

PERSISTENT INTEGER nSOME_VAR_3

PERSISTENT INTEGER nSOME_VAR_4

DEFINE_START

IF (!nVARS_SET)

{

ON[nVARS_SET]

nSOME_VAR_1 = 1

nSOME_VAR_2 = 2

nSOME_VAR_3 = 3

nSOME_VAR_4 = 4

}

 

If you want to reset the variables back to their defaults, use debug to set "nVARS_SET" to 0, then reboot.

4.  Why don't persistent variables work in modules?

With modules there is the potential for a number of variables with the same name but located in different instances of a particular module.  Since these duplicate variables all have the same name, source location (filename), and type - a fourth attribute would have to be determined.  This has not yet been done.

Related Videos

persistent storage amx variables

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

1. How do persistent variables keep their value? 2. Why can't I use CLEAN DISK to reset the value of persistent variables? 3. What are some ways to reset the value of persistent variables? 4. Why don't persistent variables work in modules?

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand