Console is a text command based interface that can directly interact with Spectrometer and Devices.

Script is a sequence of Console commands that performs some task.

Scripts can be used to enhance GUI, program GUI elements and plugins and alter program environment at run-time.

Commands can be issued from the Log Window and Status Bar tabs.

Console is under development and not all functions are available and can be used. Here are some ideas which may work.

Syntax:

expression   - show result of the expression
expression;  - do not show expression result

Supported functions:

  • clear(var) - clear() clears all variables; clear('var') clears variable 'var'
  • help(function) - help on functions
  • iff(condition,expression) - conditional assignment, iff evaluate string _expression if _contion is true
  • sleep(delay_ms) - delay in ms
  • whos(var) - list variable(s) type and value, var - name of variable or nothing

Simple math:

a = 35;
b = 45;
c = 'hello';
d = ' world!';
a+b
c+d

Devices:

.spec.dev.list - list of devices

Properties:

.spec.System.prop.list - list properties
.spec.System.prop.Wait = 10 - set property (wait 10 sec)
s = .spec.AP.Sampling; - get property

Interfaces:

.spec.intf.list - list of interfaces
.spec.intf.TCPIP.list - list of sessions
.spec.intf.NIVISA.session0.help - help on commands
.spec.intf.delete='NIVISA'    - delete interface (if not used)
.spec.intf.NIVISA.session0.query='*IDN?' - send GPIB command and read

Pulse configuration:

.spec.puls.softsync=1; - software synchronization options
.spec.puls.rtpos=0;  - repetition time position (0 - no repetition time)
.puls.comm.mwpulse.phase.ch1.use=0;
-- experimental syntax --
.puls.awg.shape.MATLAB='px=1:100; p=[sin(px/100),cos(px/100)];'