
Operator's Manual
268
ISSUED: October 2003
WR6K-OM-E Rev A
Variable Types
VBS supports the following variable types:
Integer
signed 16 bit value in the range -32768 to 32767
Long
signed 32 bit value in the range -2
31
to +2
31
- 1
Single
real number or floating point number
Double
real number or floating point number
Boolean
Boolean or logical value
String
string of characters
When making comparisons using real numbers, beware of testing for equality, because of
rounding errors. It may be better to apply a tolerance band. For Boolean, integers and strings,
equality is valid.
You can use variables in VBS without declaring the type. The context may force an implicit type
assignment. For example, if the result of a calculation is of a different type from the defined type,
the type may be changed. Always set out calculations in such a way that type changes will not
affect the final result in an undesirable or unpredictable way. If you want to change the type of a
variable or a result, use a conversion function that will show others what you intend to happen.
The conversion functions are CDbl, CInt, CLng, CSng, CStr.
Variable Names
Upper and lower case have no significance in VBS, either in variable names or in keywords (the
names reserved by the system), but it is a good idea to be consistent about the spelling of a
variable name to avoid confusion. At least 36 characters may be used in a variable name. These
can include any combination of alphabetic and numeric characters, and the underscore character.
No other punctuation character may be used in a variable name.
Do not use
any of the following characters in a variable name:
! @ & $ # ? , * . { } ( ) [ ] = + - ^ % / ~ < > : ;
Just use alphanumerics and underscore, for example: Example_Name
If you have to introduce constants, give them sensible names, just like variables. For example, do
not write:
_If RMS < 23169 Then OutputY = Y
Its meaning may not be obvious to someone else.
It is better to write something like this:
FullScale = 32767
RootTwo = Sqr (2.0)
Содержание 6000 SERIES
Страница 59: ...WR6K OM E Rev A ISSUED October 2003 57 4 Select a language 5 Click Next when the Wizard appears ...
Страница 60: ...Operator s Manual 58 ISSUED October 2003 WR6K OM E Rev A 6 Select Complete setup 7 Click Install ...
Страница 65: ...WR6K OM E Rev A ISSUED October 2003 63 Proper Orientation of Drive ...
Страница 131: ...WR6K OM E Rev A ISSUED October 2003 129 Example ...
Страница 141: ...WR6K OM E Rev A ISSUED October 2003 139 ...
Страница 236: ...Operator s Manual 234 ISSUED October 2003 WR6K OM E Rev A Example 6 ...
Страница 247: ...WR6K OM E Rev A ISSUED October 2003 245 In this figure the panel has been pasted onto the Excel sheet for comparison ...
Страница 261: ...WR6K OM E Rev A ISSUED October 2003 259 ...
Страница 286: ...Operator s Manual 284 ISSUED October 2003 WR6K OM E Rev A ...
Страница 304: ...Operator s Manual 302 ISSUED October 2003 WR6K OM E Rev A ...
Страница 307: ...WR6K OM E Rev A ISSUED October 2003 305 Convolve two signals ...
Страница 327: ...WR6K OM E Rev A ISSUED October 2003 325 How JitterTrack s Interval Error works when Clock Mode is selected ...
Страница 348: ...Operator s Manual 346 ISSUED October 2003 WR6K OM E Rev A ...
Страница 398: ...Operator s Manual 396 ISSUED October 2003 WR6K OM E Rev A Setting Up the Line Voltage and Current Signals ...
Страница 402: ...Operator s Manual 400 ISSUED October 2003 WR6K OM E Rev A ...