12-44
Return to
2600S-901-01 Rev. C / January 2008
Section 12: Instrument Control Library
Series 2600 System SourceMeter® Instruments Reference Manual
Usage
There are multiple ways to use this function, the use depends on the number of tables
or reading buffer subtables that are specified:
printbuffer(start_index, end_index, st_1)
printbuffer(start_index, end_index, st_1, st_2)
printbuffer(start_index, end_index, st_1, st_2, ..., st_n)
start_index
Starting index of values to print.
end_index
Ending index of values to print.
st_1, st_2, … st_n
Tables or reading buffer subtables from which
to print values.
Remarks
• Correct usage when there are no outstanding overlapped commands to acquire data:
•
1 <= start_index <= end_index <= n
•
Where
n
refers to the index of the last entry in the tables to be printed.
•
If
end_index < start_index
or
n < start_index
, no data will be printed. If
start_index < 1,
1 will be used as the first index. If
n < end_index
,
n
will be used
as the last index.
• When any of the given reading buffers are being used in overlapped commands that
have not yet completed at least to the desired index, this function will return data as it
becomes available.
• When there are outstanding overlapped commands to acquire data,
n
refers to the index
that the last entry in the table will have after all the measurements have completed.
• If you do not specify a specific subtable in a reading buffer, then the default subtable
named readings is automatically used.
• At least one table or subtable must be specified.
• This command generates a single response message that contains all data. The
response message is stored in the output queue.
• The
format.data attribute
controls the format of the response message.
Also see
,
Example
This example prints
all time stamps and readings in one buffer and all readings from
another buffer
, where n is 4:
format.data = format.ASCII
printbuffer(1, rb1.n, rb1.timestamps, rb1, rb2)
Example of returned data (timestamps, rb1.readings, rb2.readings):
1.02345E-04, 8.76542E-04, 5.29372E-01, 1.02445E-04, 8.66543E-04,
5.24242E-01, 1.02545E-04, 8.56547E-04, 5.19756E-01, 1.02645E-04,
8.44546E-04, 5.14346E-01
printnumber
Function
Prints numbers using the format selected for printing reading buffers.
Usage
There are multiple ways to use this function, depending on how many numbers are to
be printed:
printnumber(v1)
printnumber(v1 ,v2)
printnumber(v1 ,v2, ..., vn)
v1, v2, ..., vn
Numbers to print.
Remarks
• This function will print the given numbers using the data format specified by
format.data
and other associated attributes.
• At least one number must be given. There is an upper limit that is dictated by the output
format and the maximum output message length. All values will be written in a single
message. Care must be taken not to exceed the maximum output message length.
Also see
Example
Prints three measurements that were previously performed:
format.data = format.ASCII
printnumber(i, v, t)
Example of returned data (i, v, t):
1.02345E-04, 8.76542E-02, 5.29372E-01