Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Load Generator Setup
You can activate this at any time to change the setup to one you have previously saved. The default file name is '*.GEN', so if you click on this button you will see all the setups you can choose from in the default folder.
Once a setup is loaded, you can right-click on the Generator title (the long control just above the main display area) to get specific Help for that setup. That applies to all setups included with Daqarta. For setups you create by modifying these, the Help topic will be the original; there is no way to include your changes.
A setup includes the names of any Arb and/or Play files it uses, and when you load the setup, those files are loaded as well. But if those files are no longer present or have errors, the load process will report this and prompt you for confirmation. You can't abort the load at this point, since things would be left with an unstable partial setup. You just have to hit a key to confirm the error, and when the setup is done loading, any problem files will be missing. If any had been selected to be active on any stream of the setup, that stream will have Sine selected instead.
Since the setup file only saves signal settings, and not the main sample rate, it is possible to load a setup that was saved while running with a different sample rate than is currently in use. In this case, all Generator frequencies are adjusted automatically to give the same values with the current sample rate. However, there is no automatic adjustment for durations, such as Burst or Sweep, which are stored in the setup as numbers of samples. You may need to adjust those manually, depending upon the desired result.
Note: Loading a new .GEN setup automatically toggles Input off. See below for how to create macros that restore the original Input state after loading.
The LoadGEN macro has no effect if any File Open or Save As dialog is already active.
LoadGEN= without a name will open the File Open dialog showing all .GEN files, but with no default name.
LoadGEN="MyFile" will open the File Open dialog with the default name set to MyFile. (Note that quotes are needed around all filenames in macros.) If you accept this by hitting Enter or the Open button in that dialog, Daqarta will assume you want to open a file named MyFile.GEN and will fail if that file is not found.
After either of the above commands that invokes a File Open dialog, you may use IF.Posn?f=0 to see if the user has hit Cancel to exit without choosing a file name. This allows your macro to exit gracefully or take other action.
A.LoadGEN="MyFile" will open MyFile.GEN directly, without any File Open dialog. Note that this will load the specified setup without saving changes to the existing setup, if any.
Similarly, if the Macro Variable Var0 holds a value of 12, then LoadGEN="Test"+Var0 will set a default file name of Test12. If you expect to use a large series of files, you can use LoadGEN="Test"+Var0(3) (for example) to set the decimal format to 3 integer places to get Test012. This will allow proper sorting by file name.
Note: Loading a new .GEN setup automatically toggles Input off. To create macros that preserve the input state, save the state to a macro variable, load the setup, then set the input state from the variable. This is the technique used in the THD_Meter and IMD_Meter macro Mini-Apps:
UI=Input A.LoadGEN="THDmeter" Input=UI
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2021 by Interstellar Research
All rights reserved