Actually, it appears that I do have some sort of strange loop happening in this script that is causing the crash. But it is complicated by the ER301, because if it crashes and the ER301 is attached I have to detach to get it restarted.
If it crashes when the 301 is NOT attached (which it is doing), a simple restart brings it back.
EDIT: Actually, it wasn’t a loop. I had a line saying If G.BTN.V 3: T PN.NEXT 0
Followed by Else: T PN.PREV 0
It was as if the PN.NEXT command was stuck and returning crazy voltages. I deleted the line and just used a straight PN.NEXT, and it worked fine. I rewrote the line as I originally had it and now it works. Weird eh? I’ve had it running for a few minutes now without a crash. Strange.
FURTHER UPDATE: So I was calling PN.I 0, watching it in real-time, and it was returning the raw data…like 13,473 or -4398, not the single digit index numbers like I was getting from the other Patterns. I don’t know what I did, but I tried accessing the value another way, and suddenly PN.I 0 started giving me the expected values, 1-7 or what have you. Could this be the glitch that was causing PN.NEXT to be so confused?