Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

problems reading buffered data from 6485

2502, 6485, 6487 - Support
Post Reply
Gal Shkolnik
Posts: 1
Joined: June 19th, 2019, 5:26 am
Country: Israel

problems reading buffered data from 6485

Post by Gal Shkolnik » June 19th, 2019, 5:44 am

I'm trying to measure current at rate of 50 measurements per sec for 10 secs.
I basically copied the the example program from appendix E in the manual with slight changes, but all I get is a single value (the value displayed at the moment the program ended).
I can't get to the buffered data, also tried ABORT command after INIT, and READ? after the TRAC:DATA?'. Nothing worked so far.
What am I missing?

This is my code (in matlab R2015a):

% Find a VISA-GPIB object.
obj2 = instrfind('Type', 'visa-gpib', 'RsrcName', 'GPIB0::11::INSTR', 'Tag', '');

% Create the VISA-GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(obj2)
obj2 = visa('AGILENT', 'GPIB0::11::INSTR');
obj2 = obj2(1)

% Connect to instrument object, obj1.

% Communicating with instrument object, obj2.
fprintf(obj2, '*RST');
fprintf(obj2, 'TRIG:DEL 0');
fprintf(obj2, 'TRIG:COUN 500');
fprintf(obj2, 'SENS:CURR:RANG:AUTO OFF');
fprintf(obj2, 'SENS:CURR:NPLC .02');
fprintf(obj2, 'SENS:CURR:RANG 2E-6');
fprintf(obj2, 'SYST:ZCH OFF');
fprintf(obj2, 'SYST:AZER:STAT OFF');
fprintf(obj2, 'DISP:ENAB OFF');
fprintf(obj2, '*CLS');
fprintf(obj2, 'TRAC:CLE');
fprintf(obj2, 'TRAC:POIN 500');
fprintf(obj2, 'TRAC:FEED SENS');
fprintf(obj2, 'TRAC:FEED:CONT NEXT');
fprintf(obj2, 'STAT:MEAS:ENAB 512');
fprintf(obj2, '*SRE 1');
fprintf(obj2, '*OPC?');
fprintf(obj2, 'INIT');
fprintf(obj2, 'DISP:ENAB ON');
fprintf(obj2, 'TRAC:DATA?')
% Disconnect from instrument object, obj2.

% Clean up all objects.

Post Reply

Return to “PicoAmmeters”

Who is online

Users browsing this forum: No registered users and 3 guests