Specifications
546 Chapter 18
COM Interface Reference
How to read array data
Specifying option parameters
When the Enter method is executed while specifying option parameters, it becomes
possible to read the data divided with commas (,) in the required form.
Aim: Reading the “n”th data
• When the data type is numeric:
Example 18-23 Specifying option parameters “*” and “#”
Assume there are returned values ("1,2,3,4") of "SCPI.Output "DATA:RAW?" kept in
the queue. The method to read the 3rd data item and empty the queue is as follows.
Dim Val as Double
SCPI.Output "DATA:RAW?"
SCPI.Enter Val, "#"
SCPI.Enter Val, "*,#"
SCPI.Enter Val
When "SCPI.Enter Val "#" is executed, the first data item only is read and substituted
into Val (Val = 1). At this point, the 2nd data onward (2, 3, 4) still remain in the queue.
When "SCPI.Enter Val. "*, #" is executed after that, the first data item in the queue is
not read but skipped due to the specification of option parameter "*". Therefore, Val =
1 still remains at this point. Also, the 3rd data onward (3, 4) still remain in the queue.
When "SCPI.Enter Val" is executed for the final time, the first data item in the queue is
read and substituted into Val (Val = 3). The queue becomes empty because no option
parameter "#" is specified at this point.