X-Stream Operator’s Manual 
WM-OM-E Rev I  303 
Worksheets("Sheet1").Cells(Row, Column).Value = B 
Note that in VBS, after you have corrected an error and clicked on "Apply," the error message may 
go on flashing for a few seconds, or a few acquisitions, before being erased. Look for the "Script 
OK" message. Be patient before assuming that you still have a bug. 
If your calculation requires data to be used at some other horizontal positions than their original 
ones, make sure that your algorithm does not try to send data to non-existent array positions, that is, 
beyond the edges of the screen. You may have to truncate your output trace, as happens with the 
instrument's Enhanced Resolution and Boxcar functions. 
No output will emerge from a script until you press Apply. 
No output will emerge from a script until it has received an input. This includes the case where the 
input data are not used in calculating the output data. So you must have had at least one acquisition 
before you see anything. 
Because you can introduce undeclared variables at any point in a calculation, VBS does not check 
your spelling.  
You can make a portion of a trace disappear if you set the values to 32767 or -32768. 
You can highlight a section of a trace by making the points alternately too high and too low by a 
suitable amount. Providing the memory length is not too short, the compaction algorithm will give 
the effect of a thicker trace. 
The lengths of the output trace and the input trace need not be the same. You can even make the 
output trace longer than the input trace, but you will need to unzoom it to see it all. This feature can 
be used to avoid compaction problems with non-linear horizontal scales. It can also be used to 
show several versions of a function at the same time, without having to set up a separate script for 
each one. 
If your program structure is complicated, consider typing all the IFs, ELSEIFs, ENDIFs, FORs, 
NEXTs, etc and then clicking Apply. You wont get any output, but the system will tell you if the 
structure is acceptable. Then you can insert the actual program statements. 
Always try to make the script as independent as possible of variables such as V/Div, T/Div, and 
memory length, unless that would make it harder to understand. If so, give some values as 
examples, and explain how the script would have to change if the variables changed. 
Errors 
The instrument VBS tries hard to help you when errors occur. 
Errors may be of two main types:  
•  The script may not be usable because the interpreter cannot construct a logical structure 
from it. 
•  The script may be usable, but may fail while running because an incomputable function has 
been requested. 
Sometimes the line number given for an error is wrong. This can happen when the error is of this 
general type: