Keithley 2182 User Manual page 166

Nanovoltmeter
Hide thumbs Also See for 2182:
Table of Contents

Advertisement

9-18
Stepping and Scanning
AsciiRdgsBuf$ = SPACE$(18 * NumRdgs)
DIM Readings!(1 TO NumRdgs) 'array of the 48 individual readings in
CALL send(Addr, "TRACE:DATA?", status%)
CALL enter(AsciiRdgsBuf$, length%, Addr, status%)
' Start Parsing the data readings...
ParseLength = 1
CurrentPosition% = 1
OneReading$ = ""
ReadingOn% = 1
DO
OneCharacter$ = MID$(AsciiRdgsBuf$, CurrentPosition%, ParseLength)
IF (OneCharacter$ = ",") THEN
ELSE
END IF
CurrentPosition% = CurrentPosition% + 1
LOOP UNTIL (CurrentPosition% > length%)
Readings!(ReadingOn%) = VAL(OneReading$)
'Calculate DataIC and DataV values
'where Chan2! is the CH2 numerical representation for string CH2 data
' and Chan1! is the CH1 numerical representation for string CH1 data
' CH1pos! is the positive portion for channel 1
' CH1neg! is the negative portion for channel 1
k% = 1
Readings!(ReadingOn%) = VAL(OneReading$)
OneReading$ = ""
ReadingOn% = ReadingOn% + 1
OneReading$ = OneReading$ + OneCharacter$
'represents the string of buffer response
'numerical representation form - converted from
'ASCII
'ask 2182 for the buffer response
'read in buffer response
'represents how many characters to extract from
'response string
'represents which character on in response
'string
'clear out string contents
'represents the individual reading on
'above line reads in the next character for the
'buffer response
'found an individual reading so store it as such
'clear out so able to read next individual
'reading
'increment counter for next individual reading
'still building an individual reading so add on
'the next character
'increment character on in the buffer response
'loop until pass the number of characters read
'in with the buffer response
'store last individual reading since it will not
'be separated by a comma
'represents the reading in Reading! to use in
'calculation

Advertisement

Table of Contents
loading

This manual is also suitable for:

2182a

Table of Contents