Locking a master from code
a_riot42
AMX Wizard
I didn't think it was possible, but I have some code that can lock a master (status light stops flashing). All that it took was an array index error in a timeline. Timelines must get some special priviledge to memory or something?!?
I didn't think you could lock a master from user code but it happens everytime I run this timeline.
Anyone done this before without using a loop or some other repetitive task that keeps the CPU busy? This is a timeline that runs only once and it usually works fine as intended unless the array index is too big and then its locks the master up.
Paul
I didn't think you could lock a master from user code but it happens everytime I run this timeline.
Anyone done this before without using a loop or some other repetitive task that keeps the CPU busy? This is a timeline that runs only once and it usually works fine as intended unless the array index is too big and then its locks the master up.
Paul
Comments
-
Oh there are lots of ways to lock a master with code, and I think I have done them all
. Overloading the message queue, running out of non-volatile memory, and endless loops are the most common.
NetLinx is an interpreted language (like Visual Basic), and as such traps most of the kinds of errors that can lock a master; this is what makes it feel like you can't do such a thing most of the time. The thing is though, when stuff does get past the interpreter, the failures tend to be more spectacular. Probably in your case, you found an error the interpreter isn't catching rather than timelines being more privileged or something of that nature. -
DHawthorne wrote:Overloading the message queue, running out of non-volatile memory, and endless loops are the most common.
I know about those types, while loops, recursive button events, bad code in program section and the like but I have never had one line of code that either locks up or reboots the master. I am going to do an experiment and post the line and see if others get the same behavior. Could come in handy sometime
Paul -
Just out of curiosity, how do you get them unlocked? I have accidentally locked one up due to putting some bad code in mainline. I took it to the local AMX University and one of the instructors did something with the dip switches, rebooted it, was able to connect via serial, and did CLEAN_DISK or something like that. Luckily he was able to get me out of my jam, but I am not sure what he did.
-
staticattic wrote: »Just out of curiosity, how do you get them unlocked? I have accidentally locked one up due to putting some bad code in mainline. I took it to the local AMX University and one of the instructors did something with the dip switches, rebooted it, was able to connect via serial, and did CLEAN_DISK or something like that. Luckily he was able to get me out of my jam, but I am not sure what he did.
yes,
setting the 1st dip switch to 'on' on the NI master disables the program currently loaded in the memory. So, what you basically have is an Netlinx master booted up with no program in it. ONce you get to that point, you can go in and erase the old program or reload a new one. After you're done doing that, you reset the dip switch and the loaded program will begin running after reboot.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums