What can you do with scripting in SIGVIEW? 

By using scripting functionality, you can extend SIGVIEW with small script programs to implement new functions you need, for example support for new file types, new analysis or processing methods or interface with other systems.

SIGVIEW uses Julia language for writing scripts. You can find more information about the language itself  here.

Is it something only for software developers?

You need only a very basic know-how in software development. There is no need to write big complex programs. Generally, the program frame is already provided as a template and you just need to write the actual processing part. By using Julia language constructs and available packages, your programs will very often be no longer than 10 lines of code. If you have some experience with MATLAB, Python or R, you will need only a few minutes to start working with Julia.

Script window types 

There are two main use cases, i.e. window types, for using scripts in SIGVIEW:

1. Signal window

These scripts can process input from one or more signal or instrument windows and produce the content of a new signal windows as result.

Also, you would use this type of script window if you would only like to process the inputs without generating new result signal, for example to analyse inputs and generate external alert.

For further details about creating and using signal source scripts, see this chapter.

2. Signal source window

These script windows are used for inserting new signals into SIGVIEW, for example by loading from files or acquiring from DAQ devices. These windows do not have parent(source) windows.

For further details about creating and using signal source scripts, see this chapter.

Creating new script windows

Script windows can be created by using corresponding options in main menu, Scripts menu. Signal source script windows can be created anytime, and signal script windows only if another window is currently active. That window will be a parent (source) window for the new created signal script window.

Signal script windows with multiple parent (source) windows can be created from Control Window. See this chapter for details. 

After creating new script window, a source code editor will be opened immediately for the user to write the script. As soon as script source code file is saved from the editor, SIGVIEW will read it, execute it and the result will be displayed in SIGVIEW. You can keep working on the code by editing it and saving again. SIGVIEW will be monitoring the source code file and as soon as any change is detected, the script will be executed again so you will see the results immediately.

In case of an error in the script, a corresponding error message will be displayed in the SIGVIEW's window as a plain text.

Editing scripts

To change the script source code of an existing window, you can use the option Edit script... from the window's context menu or main menu, Scripts/Edit script... option. Just as with creating a new window, SIGVIEW will monitor the changes in a file and each time after the file was changed and saved, it will be executed again.

Code editor

For editing source code, SIGVIEW uses an embedded instance of the Notepad++ editor. You can change the default editor from application settings dialog.

Opening Julia console

You can open Julia console window anytime by using main menu option Scripts/Julia console. You will mostly use the console to install new packages, but you can also use it to test some Julia expressions interactively.