This dialog allows to set up a new Function Generator. It is automatically invoked when starting a new Function generator calculation either from the channel dialog or from the menu. You may see more details on calculations and a detailed explanation of all supported calculation jobs here. A lot of example waveforms can be found here. |
|
Source Signals | The list shows the selected channels for the calculation. You can select up to four channels but you can also create a function without a source signal. Please select the channels by double clicking on the channel name. |
Destination Channel | Defines a name under which the resulting signal should be accessed and shown inside SBench 6. |
Destination File | Store to cache tries to use the internal cache to speed up write process. If there is not enough free space in the cache the data is stored to a temporary file.
Store always to file stores data automatically under this file name on each calculation run. If Autostore is checked the result of the calculation is stored to a new file each time the calculation runs. |
Function | Contains the function to calculate. All values are calculated in Volts. The result of the example function will be an inverted sine wave of 16 kS length with 16 periods, 500 mV amplitude and an offset of 500 mV. The function may contain whitespaces and line breaks. Steady functions:
Some examples: To create a copy of Signal 0 with half the original amplitude, use 0.5*sig0(x) To create a signal with every even sample of Signal 0, use sig0(2*x). Here you have to make sure that Length is set to the appropriate value. Parentheses can be used to define precedence. You can define custom constants with the following syntax: const SpeedOfLight=299792458; Valid characters for the constant's name: characters (A-Z, a-z), numbers (0-9) and underscore (_). There are also some pre-defined constants:
rand() generates a random value in the interval [-1, 1]. This can be used to add noise to generated signals. Results of single-value calculations (those that appear in the Info Dialog, e.g. Maximum) can be used for calculations. It uses the same syntax as the Report Generator. To access a result prepend the Report Template Name of a calculation result with "Calculation.", e.g. Calculation.AnalogCh#0.Maximum#0 will be replaced with the result of the first Maximum calculation on the first analog channel. Non-steady functions:
Bitwise operations:
You can add comments by enclosing the text in /* */: /*This is a comment*/. You can also add functions by using the context menu for the function input field. If you click the dashed area on top of the "Add function" submenu you will get a floating menu. It works the same as the normal menu but saves you from opening the context menu over and over again. |
Load function | Using this button you can load a formula from a text file.
SBench6 provides some example functions that show some common waveforms. |
Store function | Using this button you can store the current formula to a text file. It can be loaded again using the "Load function" button. |
Samplerate | Defines the samplerate of the generated signal and thus the resolution in time. This setting is only available if manual setup is enabled, otherwise the value of the first source channel will be used. |
Length | Defines the number of samples to generate. This setting is only available if manual setup is enabled, otherwise the value of the first source channel will be used. |
Resolution | Defines the resolution of the generated signal. This setting is only available if manual setup is enabled, otherwise the value of the first source channel will be used. |
Amplitude | Defines the amplitude of the generated signal. This setting is only available if manual setup is enabled, otherwise the value of the first source channel will be used. |
Keep in loop | If this option is checked the calculation is automatically updated if the source signal has changed. If it is not checked the result is calculated once and stays fixed afterwards. |
Add to displays | If this option is checked the newly generated signal is automatically added to a matching analog display. If no analog display is yet available a newly generated display is automatically added showing this plot. |
When you edit an existing channel the setup window will look slightly different: at the top of the dialog a section appears that allows you to edit the name, color and custom unit (if available) for the calculated channel. Below the calculation settings can be edited as described above. |
![]() |
Copyright © Spectrum Instrumentation GmbH | Back to top |
SBench 6 Documentation
|