Skip to content

Commit

Permalink
Update connection code
Browse files Browse the repository at this point in the history
Resolves: PSDK-808, PSDK-849 & PSDK-804
  • Loading branch information
hsmistry committed Nov 9, 2018
1 parent ee1c27d commit a657deb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions picotech_ps5000a_generic.mdd
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
obj.DriverData.resolution = 8;

% Open the unit
[connectStatus.openUnit, obj.DriverData.unitHandle, obj.UserData.unitSerial] = ...
[connectStatus.openUnit, obj.DriverData.unitHandle, ~] = ...
calllib('ps5000a', 'ps5000aOpenUnit', unitHandle, unitSerial, resolution8bit);

% Confirm handle is valid
Expand Down Expand Up @@ -714,7 +714,7 @@

else

if (isfield(obj.UserData, 'unitSerial'))
if (isfield(obj.DriverData, 'unitSerial'))

error('Disconnect:ConnectionNotClosed',['Connection to PicoScope %s with serial number %s ' ...
'not closed. Status code %d\n'], ...
Expand Down Expand Up @@ -2502,7 +2502,7 @@ For further information on the ps5000aSetDataBuffers function please refer to th
% Set the min. ADC value
minValPtr = libpointer('int16Ptr', 0);

[minValueStatus, ~] = calllib('ps5000a', 'ps5000aMinimumValue', unitHandle, minValPtr);
[minValueStatus, ~] = calllib('ps5000a', 'ps5000aMinimumValue', obj.DriverData.unitHandle, minValPtr);

obj.DriverData.minADCValue = minValPtr.Value;

Expand Down Expand Up @@ -2617,7 +2617,7 @@ status - status code returned by the driver.</Description>
% base device functions, OBJ is the device object.

% Reset Channels
[chA, chB, chC, chD, d0, d1] = invoke(obj, 'setChannelDefaults');
[chA, chB, chC, chD] = invoke(obj, 'setChannelDefaults');

% Digital ports

Expand Down Expand Up @@ -2670,7 +2670,6 @@ status - status code returned by the driver.</Description>

% Timebase
obj.DriverData.timebase = 65;
obj.UserData.timebase = obj.DriverData.timebase;
timeIntervalNs = 0;
segmentIndex = 0;

Expand Down

0 comments on commit a657deb

Please sign in to comment.