
SR1 Operation
223
© 2014 Stanford Research Systems
"Tone" column, the specified tone will be played when the event occurs. If "Logging" is checked, the
occurrence of the event will be recorded with a time stamp in a log file. The logfile can be set and viewed
on the "Config" tab of the events panel. An example logfile is shown below for the case where "Sweep
Start" and "Sweep Finished" are the events being logged.
Events and Scripting
If a script file is configured in the script column, that script will be executed when the event occurs. To
associate a script with an event press the ellipsis button (...) in the script column and use the file dialog
to navigate to the appropriate script (.vbs) file. To clear a script from an event double-click on the name of
the script file. For example, we can write the simple script below, which simply displays a message box
with the text "Sweep Done" when it is run.
When this script is associated with the "Sweep Finished" event the panel looks like:
Now, each time a sweep is finished, the swp2.vbs script will run and the message "Sweep Done" will be
displayed on the SR1 screen.
A Windows COM event may be fired in response to the event. COM events allow local or remote
programs to respond to the event, including programs written in Visual Basic, MS Office, or SR1's own
local scripting environment. Some events are associated with their own COM Event— for example the
Sweep Finished event can fire its own COM Event called, unsurprisingly, "Sweep Finished." Other
events can fire one of 5 "generic" COM Events labeled Event1 through Event5. To set up a subroutine in
a SR1's scripting environment which traps a COM Event navigate the tree in the right-hand panel in the
scripting window to the "Events" node and double click the event to be trapped. A subroutine declaration
is started in the script window which marks the routine that will be called when the COM event is fired.
For instance in the script below:
Содержание SR1
Страница 5: ...Part I Getting Started Audio...
Страница 7: ...Getting Started 7 2014 Stanford Research Systems...
Страница 12: ...SR1 Operation Manual 12 2014 Stanford Research Systems...
Страница 27: ...Part II SR1 Operation Audio...
Страница 156: ...SR1 Operation Manual 156 2014 Stanford Research Systems Passband Group Delay of Elliptical Filter...
Страница 258: ...SR1 Operation Manual 258 2014 Stanford Research Systems...
Страница 272: ...SR1 Operation Manual 272 2014 Stanford Research Systems on the amplitude sweep...
Страница 289: ...SR1 Operation 289 2014 Stanford Research Systems...
Страница 290: ...Part III SR1 Reference Audio...