function [data] = supercond2(init)
%Modification of supercond
%   Detailed explanation goes here
%create and open instrument objects, and echo their names
lakeshore = visa('ni','gpib0::12::INSTR');
fopen(lakeshore);
fprintf(lakeshore,'*IDN?');
lakeshoreName = fscanf(lakeshore);

keithley = visa('ni','gpib0::13::INSTR');
fopen(keithley);
fprintf(keithley,'*IDN?');
keithleyName = fscanf(keithley);

disp('Successfully connected to:')
disp(lakeshoreName(1:end-2)) %eliminates trailing whitespace
disp(keithleyName(1:end-2))  %eliminates trailing whitespace
%check keithley internal setup
fprintf(keithley,'SOUR:DELT:NVPR?');
is2182aConnected = fscanf(keithley);
if is2182aConnected ==1,
    disp('WARNING: Voltmeter is not connected.')
end
%initialize keithley delta parameters
fprintf(keithley,'*RST')
fprintf(keithley,'SOUR:DELT:HIGH 1e-3')
fprintf(keithley,'SOUR:DELT:LOW -1e-3')
fprintf(keithley,'SOUR:DELT:COUNT 10')
fprintf(keithley,'SOUR:DELT:DEL .1')
%now to initialize the buffer
fprintf(keithley,'TRAC:CLE')
fprintf(keithley,'TRAC:FEED:SENS1')
fprintf(keithley,'TRAC:FEED:CONT NEXT')
fprintf(keithley,'TRAC:POIN 10')
%confirm the buffer memory
fprintf(keithley,'TRAC:FREE?')
fscanf(keithley)
%arm and confirm
display('press any key to arm keithley')
pause
fprintf(keithley,'SOUR:DELT ARM')
%fprintf(keithley,'SOUR:DELT ARM?')
%armConf = fscanf(keithley)
%if (armConf == 1)
    display('Keithley delta mode is armed!')
%end
display('press any key to start a delta measurement')
pause
fprintf(keithley,'INIT:IMM')
%read out buffer
fprintf(keithley,'TRAC:DATA?')
fscanf(keithley)
end

