Keithley 2182 User Manual page 165

Nanovoltmeter
Hide thumbs Also See for 2182:
Table of Contents

Advertisement

A loop program can be written to extract the data as follows:
' This is for Channel 2 Data'
Let NumRdgsPerStep = 4
Let CalcRdgs = 6
Let k = 1
For j =1 to CalcRdgs
CH2 Rdg#( j ) = Buffer Rdg#( k )- Buffer Rdg#( k + NumRdgsPerStep )
CH2 Rdg#( j ) = CH2 Rdg#( k ) / 2
k = k + ( NumRdgsPerStep * 2 )
Next j
' This for For Channel 1 Data'
Let NumRdgsPerStep = 4
Let CalcRdgs = 6
Let k = 1
For j = 1 to CalcRdgs
Let CH1 Rdg#_pos = 0
Let CH1 Rdg#_neg = 0
For m =1 to NumRdgsPerStep - 1
CH1 Rdg#_pos = CH1 Rdg#_pos + Buffer Rdg#( k +m )
CH1 Rdg#_neg = CH1 Rdg#_neg + Buffer Rdg#( k +m + NumRdgsPerStep )
Next m
CH1 Rdg#( j ) = ( CH1 Rdg#_pos - CH1 Rdg#_neg ) /
( (NumRdgsPerStep - 1) * 2)
Next j
An example program using "QBASIC " was written that sets up an Array for all the data out
of the 2182 buffer, parses the comma separated data into the array, and calculates the DC current
reversal data for both Channel 1 and Channel 2.
CONST Addr = 7
CONST NumRdgsPerStep = 4
CONST CalcReadings = 6
CONST NumRdgs = (NumRdgsPerStep * 2 * CalcReadings)
DIM DataCH2$(CalcReadings)
DIM DataCH1$(CalcReadings)
FOR i = 1 TO (CalcReadings) 'allocates space for each channel reading
NEXT i
'CODE for Parsing single string of buffer response into 48 individual
OneReading$ = SPACE$(20)
OneCharacter$ = SPACE$(2)
Stepping and Scanning
; 1 Ch2 and 3 Ch1 readings stored in the buffer
/ 2400 current level.
; Total number of positive or negative current
levels out of the 2400.
'Represents the address of the 2182
'Represents the total number of CH1 & CH2
'readings at each positive or negative current
'step
'Represents number of paired positive & negative
'steps in 2400
'NumRdgs represents the number of readings to
'store in 2182's buffer
'The 2 accounts for positive and negative steps
'array represents total number of channel 2
'readings
'array represents total number of channel 1
'readings
'DataCH2$(i) = SPACE$(18)
'DataCH1$(i) = SPACE$(18)
readings
'represents 1 reading from buffer string
'response
'represents 1 character from buffer string
'response
9-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

2182a

Table of Contents