SCPI
Description
Executes one or more SCPI commands or queries on the selected instrument. When all commands/queries are executed Flow execution continues through seqout
output.
Properties
Specific
-
Instrument
EXPRESSION (object:Instrument)
-
Instrument object on which commands/queries are executed. This property is only present within the Dashboard project when the instrument is connected remotely, i.e. it is possible to have open connections to several instruments at the same time. If it is an EEZ-GUI project, then this property does not exist because we always use the device on which Flow is executed and we send SCPI commands to it.
-
Scpi
TEMPLATE LITERAL
-
List of SCPI commands/queries. Each command/query must be entered as a separate line. A Flow expression can also be inserted inside the command/query, which must be entered between two curly brackets. This is an example taken from the BB3 Dashboard example that uses a Flow expression within an SCPI command:
Also in the example above, a Flow
Catch Error
has been added to catch an error during the execution of the SCPI component.For an SCPI query, it must be specified where the result is sent, and there we have two options:
- Sending results to Flow output. It is necessary to add a new output using the “Flow – Outputs” section in the properties of this component, where it is necessary to write:
output_name=query?
. Here’s an example, taken from the BB3 Dashboard example:
-
Saving the result in a variable. The results are saved in a variable so that the query is written like this:
variable_name=query?
or{assignable_expression}=query?
.
This second form is used when it is stored, for example, in a structure member or an array. Here are examples for both forms, also taken from the BB3 Dashboard example:-
In this example, the result of the
SYSTem:CPU:FIRMware?
query is saved in thefw_ver
variable. As it is the first (simple) form, then the name of the variable should not be enclosed in curly brackets. -
In this example, four SCPI queries are executed. The results are saved in the slots variable of the type:
array:struct:Slot
, where slots is a structure that hasu_min
,u_max
,i_min
andi_max
members. The second form is used here and the assignable expression must be enclosed in curly brackets. Also here we have an example of using the expression{ch_idx}
within the query itself.
-
- Sending results to Flow output. It is necessary to add a new output using the “Flow – Outputs” section in the properties of this component, where it is necessary to write:
-
Timeout (ms)
EXPRESSION (integer)
-
The time in milliseconds to wait for the result of the query. If the result does not expire within that time, a Timeout error is generated, which can be handled through
@Error
output ifCatch error
is enabled. If set to `null’ then the timeout as specified in the Instrument Connect dialog is used. -
Delay (ms)
EXPRESSION (integer)
-
The minimum time specified in milliseconds that must elapse before a new SCPI command or query is sent. If set to `null’ then the delay as specified in the Instrument Connect dialog is used.
General
-
Description
String
-
This is the description of the Action component. Description is displayed below the component in the Project editor/viewer. In the main toolbar, it is possible to hide or display descriptions of all components with one click.
Flow
-
Inputs
Array
-
Additional component inputs that the user can add as desired in order to use them to receive additional data needed when evaluating expressions in properties. Each input is given a name and type. Name is used when referencing an input within an expression. A type is used to project Check to check whether a data line that transmits data of that type is connected to the input or not.
-
Outputs
Array
-
Additional component outputs that the user can add to send data through. Each output is assigned a name and type. An example of using this output is e.g. in the Loop component, where we can put the output name for the
Variable
property instead of e.g. variable name. In that case, the Loop component will not change the content of the variable in each step, but will send the current value through that output. -
Catch error
Boolean
-
If this checkbox is enabled then an
@Error
output will be added to the component and if an error occurs in this component during the execution of the Flow, the Flow will continue through that output. The data that will be passed through that output is the textual description of the error.
Position and size
-
Align and distribute
Any
-
Alignment icons and component distribution. Alignment icons appear when two or more components are selected, and distribution icons appear when three or more components are selected.
Inputs
-
seqin
SEQ | OPTIONAL
-
A standard sequence input.
Outputs
-
seqout
SEQ | OPTIONAL
-
A standard sequence output.
Examples
- BB3 Dashboard
- Plotly
- Rigol Waveform Data
- Screen Capture