Example 7: querying the status register, Example 7: querying the status register -14 – RIGOL DM3058 User Manual

Page 187

Advertising
background image

RIGOL

Programming Guide for DM3058/DM3058E

6-14

Example 7: Querying the Status Register


The status register provided enables user to diagnose the current error operation on
the basis of its query function, searching the error reason. For the detailed commands,
refer to Chapter 2. The commands system of status register is in common use in all
RIGOL, Fluke and Agilent, take RIGOL commands for example.

The programming implementations
——RIGOL Commands:
0 *RST

/* Reset the instrument */

1 cmdset rigol

/* Select RIGOL commands */

2 *cls

/* Clear the instrument state */

3 status:questionable:enable 24375 /* Set the enable register of the questionable
status register */
4 status:operation:enable 1841 /* Set the enable register of the operation
status register */
5 *ESE 189

/* Set the enable register of the event status register */

6 *SRE 188

/* Set the enable register of the status byte register */

7 :status:questionable:enable? /* Query the enable register of the
questionable status register */
8 Return 24375
9 :status:operation:enable?

/* Query the enable register of the operation

status register */
10 Return 1841
11 *ESE?

/* Query the enable register of the event

status register */
12 Return 189
13 *SRE?

/* Query the enable register of the status

byte register */
14 Return 188
15 :function:voltage:AC

/* Enable the AC voltage measurement */

16 *STB?

/* Query the condition register of the status

byte register */
17 Return 192
18 :status:questionable:condition?

/* Query the condiction register of the

questionable status register */
19 Return 0
20 :status:operation:condition?

/* Query the condiction register of the

Advertising
This manual is related to the following products: