SBench Sequence Script
SBench 6 can be controlled by simple text based scripts. A script can be given as start parameter to SBench 6. This allows to control SBench 6 from a batch file by calling SBench 6 together with a script file.
SBench 6 Script files are plain text files with the extension sb6seq. Each line contains one command.
The script is loaded during runtime using a start paramater:
- SB6_LOAD_PROJECT [File]: a project file sb6prj is loaded.The [File] paramter describes an absolue path (for example C:/Users/Spectrum/SB6_ApplicationData/projects/fft average/fft average.sb6prj. Please note that the installed card(s) must match the cards that are stored in the project file
- SB6_LOAD_CONFIG [File]. A configuration file sb6cfg is loaded. The [File] paramter describes an absolue path. Please note that the configuration files have been replaced by project files that contain more information. LOAD_CONFIG should only be used for older configuration files
- SB6_START_SINGLE: a single acqusition is started once. This can be a singleshot or a FIFO acquisition depending on the project setup
- SB6_START_LOOP: an acquisition loop is started. SBench 6 will immediately start the next acqusition after the last acquisition has been terminated. This will run forever until a stop command is issued or the software is terminated
- SB6_WAIT_SEC [Seconds]: the script waits for a specified number of seconds until the next command is issued
- SB6_WAIT_JOBS_DONE: the script waits until all current calculations and export commands have finished their job. This command is needed if multiple nested calculations are running after an acquisition
- SB6_STOP: all current acquisitions and calculations are stopped. SBench 6 goes back into idle state.
- SB6_APP_QUIT: SBench 6 program is quit
- SB6_LOOP_START [Loops]: the next part until LOOP_END is repeated a defined number of times.
- SB6_LOOP_END: closing command of a loop
- SB6_EXPORT_DATA [ExportFormat] [FileName]. The current data is exported to file. Export format is set in the project file and can't be changed by the script. The [ExportFormat] defines one of the following export modes:
- SB6: standard SBench 6 file format *.sb6dat
- SB5: SBench 5 file format *.sb5
- BIN: Pure binary export *.bin
- WAV: export as wave file *.wav
- MATLAB: export as matlab file *.mat
- ASCII: ASCII export *.txt
- VCD: Value Change Dump export (digital files) *.vcd
- SB6_CALL_PROGRAM [Program] [Params]: an external program is called. The [Program] parameter describes an absolue path (for example C:/Users/Spectrum/SB6_ApplicationData/scripts/send acquisition file). The [Params] paramter describes a number of call parameters that are forwarded to the called program.
Single predefined acquisition. Data is stored according to project settings:
Do one acquisition per minute, store this as ASCII file and let an external program execute some further analysis on this. The whole process should run for 24 hours
SB6_EXPORT_DATA ASCII c:/testresults/testresult.txt
SB6_CALL_PROGRAM c:/testresults/analysis.exe -showresult