Scpi parameter types, Error codes, Programming examples – Quantum Composers 9730 Series User Manual

Page 34: Example 1, Scpi parameter types -34, Error codes -34, Rogramming, Xamples, Example 1: -34

Advertising
background image

10-34

SCPI Parameter Types

The following parameter types are used:

<numeric value>

o

Accepts all commonly used decimal representation of numbers including
optional signs, decimal points and scientific notation: 123, 123e2, -123, -
1.23e2, .123, 1.23e-2, 1.2300E-01.

<Boolean value>

o

Represents a single binary condition that is either true or false. True is
represented by a 1 or ON; false is represented by a 0 or OFF. Queries
return 1 or 0.

<identifier>

o Selects from a finite number of predefined strings.

Error Codes

The unit responds to all commands with either:

ok<cr><lf> or ?<n><cr><lf>

<cr> = carriage return, <lf> = line feed


Where "n" is one of the following error codes:

1

Incorrect prefix, i.e. no colon or * to start command.

2

Missing command keyword.

3

Invalid command keyword.

4

Missing parameter.

5

Invalid parameter.

6

Query only, command needs a question mark.

7

Invalid query, command does not have a query form.

8

Command unavailable in current system state.

Programming Examples

Example 1:

20 ms pulsewidth, 2.3 ms delay, internal trigger, single shot operation.

:PULSE0:MODE SING<cr><lf> sets system mode to single shot
:PULSE0:TRIG:MODE DIS<cr><lf> disables the external trigger
:PULSE1:WIDT 0.020<cr><lf> sets pulsewidth to 20 ms
:PULSE1:DELAY 0.0023<cr><lf> sets delay to 2.3 ms
:PULSE1:STATE ON<cr><lf> enables channel A

To start the pulses use either of the following commands:

:PULSE0:STATE ON<cr><lf> starts the pulses
:INST:STATE ON<cr><lf> alternate form to start pulses.

Advertising