When running the SCOPE command in a program, I think Motion Perfect doesn't like the SCOPE command being issued over and over when I run it. It seems more stable when I comment the SCOPE command out after it's ran once.
Although SCOPE command is part of the Trio BASIC language and you are free to use it in your programs you should NOT do that when using oscilloscope tool in Motion Perfect.
The problem is that oscilloscope tool itself executes SCOPE command as part of its initialization when you press Trigger button and when it does so it uses its own settings and pre-configured channels.
So what effectively happens is that you first start the scope tool which applies its configuration.
Then you run your program which applies different settings and misconfigures the capture on the controller.
Finally the program executes TRIGGER command which instructs the controller to start collecting data.
In your particular case the SCOPE command in your program instructs the controller to capture data in TABLE range from 1000 to 1500 which is 500 samples.
The scope itself by default is configured and expects to capture only 20 samples x 10 divisions = 200 samples at the end of the TABLE range so at given point in time it gets confused and tries to read values beyond the end of TABLE.
That is where you get the error message in Motion Perfect.
In short if you want the start of data capture to be driven by your program you should put there only TRIGGER command but not SCOPE command.