Skip to content

Commit ddd19f1

Browse files
author
neil.hamilton
committed
Add new functions to picotech_ps6000a_generic.mdd
1 parent f5080a3 commit ddd19f1

File tree

1 file changed

+216
-2
lines changed

1 file changed

+216
-2
lines changed

picotech_ps6000a_generic.mdd

Lines changed: 216 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
% Open with 8 bit resolution
100100
resolution8bit = obj.DriverData.enums.enPicoDeviceResolution.PICO_DR_8BIT;
101-
obj.DriverData.resolution = 8;
101+
obj.DriverData.resolution = resolution8bit;
102102

103103
[connectStatus.openUnit, obj.DriverData.unitHandle, ~] = ...
104104
calllib('ps6000a','ps6000aOpenUnit',unitHandle, unitSerial,resolution8bit);
@@ -325,7 +325,221 @@
325325
<Description/>
326326
</Property>
327327
</PropertyInfo>
328-
<MethodInfo/>
328+
<MethodInfo>
329+
<Method>
330+
<Name>ps6000aGetMinimumTimebaseStateless</Name>
331+
<Location>parent</Location>
332+
<CapabilityGroup>Base</CapabilityGroup>
333+
<Type>MCode</Type>
334+
<Code>
335+
<MCode>function status = ps6000aGetMinimumTimebaseStateless(obj, enabledChannelFlags, timebase, timeInterval, resolution)
336+
% For group functions, OBJ is the group object. For
337+
% base device functions, OBJ is the device object.
338+
339+
status = calllib('ps6000a','ps6000aGetMinimumTimebaseStateless', obj.DriverData.unitHandle, enabledChannelFlags,...
340+
timebase, timeInterval, resolution);
341+
342+
if (status == PicoStatus.PICO_OK)
343+
344+
else
345+
346+
error('ps6000aGetMinimumTimebaseStateless: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
347+
348+
end</MCode>
349+
</Code>
350+
<Description/>
351+
</Method>
352+
<Method>
353+
<Name>ps6000aGetValues</Name>
354+
<Location>parent</Location>
355+
<CapabilityGroup>Base</CapabilityGroup>
356+
<Type>MCode</Type>
357+
<Code>
358+
<MCode>function status = ps6000aGetValues(obj, startIndex, noOfSamples, downSampleRatio, downSampleRatioMode, segmentIndex, overflow)
359+
% For group functions, OBJ is the group object. For
360+
% base device functions, OBJ is the device object.
361+
362+
status = calllib('ps6000a','ps6000aGetValues',obj.DriverData.unitHandle,...
363+
startIndex, noOfSamples, downSampleRatio, downSampleRatioMode, segmentIndex, overflow)
364+
365+
if (status == PicoStatus.PICO_OK)
366+
367+
else
368+
369+
error('ps6000aGetMinimumTimebaseStateless: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
370+
371+
end</MCode>
372+
</Code>
373+
<Description/>
374+
</Method>
375+
<Method>
376+
<Name>ps6000aIsReady</Name>
377+
<Location>parent</Location>
378+
<CapabilityGroup>Base</CapabilityGroup>
379+
<Type>MCode</Type>
380+
<Code>
381+
<MCode>function status = ps6000aIsReady(obj, ready)
382+
% For group functions, OBJ is the group object. For
383+
% base device functions, OBJ is the device object.
384+
385+
status = calllib('ps6000a','ps6000aIsReady',obj.DriverData.unitHandle,ready);
386+
387+
if (status == PicoStatus.PICO_OK)
388+
389+
else
390+
391+
error('ps6000aGetMinimumTimebaseStateless: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
392+
393+
end</MCode>
394+
</Code>
395+
<Description/>
396+
</Method>
397+
<Method>
398+
<Name>ps6000aRunBlock</Name>
399+
<Location>parent</Location>
400+
<CapabilityGroup>Base</CapabilityGroup>
401+
<Type>MCode</Type>
402+
<Code>
403+
<MCode>function status = ps6000aRunBlock(obj, noOfPreTriggerSamples, noOfPostTriggerSamples, timebase,timeIndisposedMs, segmentIndex)
404+
% For group functions, OBJ is the group object. For
405+
% base device functions, OBJ is the device object.
406+
407+
% no inputs for lpReady or pParameter as these are for callbacks that aren't
408+
% used
409+
410+
lpReady = [];
411+
pParameter = [];
412+
413+
status = calllib('ps6000a','ps6000aRunBlock',obj.DriverData.unitHandle, noOfPreTriggerSamples,...
414+
noOfPostTriggerSamples, timebase, timeIndisposedMs, segmentIndex, lpReady, pParameter);
415+
416+
if (status == PicoStatus.PICO_OK)
417+
418+
else
419+
420+
error('ps6000aRunBlock: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
421+
422+
end</MCode>
423+
</Code>
424+
<Description/>
425+
</Method>
426+
<Method>
427+
<Name>ps6000aSetChannelOff</Name>
428+
<Location>parent</Location>
429+
<CapabilityGroup>Base</CapabilityGroup>
430+
<Type>MCode</Type>
431+
<Code>
432+
<MCode>function status = ps6000aSetChannelOff(obj, channel)
433+
% For group functions, OBJ is the group object. For
434+
% base device functions, OBJ is the device object.
435+
436+
status = calllib('ps6000a','ps6000aSetChannelOff', obj.DriverData.unitHandle, channel);
437+
438+
if (status == PicoStatus.PICO_OK)
439+
440+
else
441+
442+
error('ps6000aSetChannelOff: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
443+
444+
end</MCode>
445+
</Code>
446+
<Description/>
447+
</Method>
448+
<Method>
449+
<Name>ps6000aSetChannelOn</Name>
450+
<Location>parent</Location>
451+
<CapabilityGroup>Base</CapabilityGroup>
452+
<Type>MCode</Type>
453+
<Code>
454+
<MCode>function status = ps6000aSetChannelOn(obj, channel, coupling, range, analogueOffset, bandwidth)
455+
% For group functions, OBJ is the group object. For
456+
% base device functions, OBJ is the device object.
457+
458+
status = calllib('ps6000a', 'ps6000aSetChannelOn', obj.DriverData.unitHandle,...
459+
channel, coupling, range, analogueOffset, bandwidth);
460+
461+
if (status == PicoStatus.PICO_OK)
462+
463+
else
464+
465+
error('ps6000aSetChannelOn: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
466+
467+
end</MCode>
468+
</Code>
469+
<Description/>
470+
</Method>
471+
<Method>
472+
<Name>ps6000aSetDataBuffer</Name>
473+
<Location>parent</Location>
474+
<CapabilityGroup>Base</CapabilityGroup>
475+
<Type>MCode</Type>
476+
<Code>
477+
<MCode>function status = ps6000aSetDataBuffer(obj, channel, buffer, nSamples, dataType, waveform, downSampleRatioMode, action)
478+
% For group functions, OBJ is the group object. For
479+
% base device functions, OBJ is the device object.
480+
481+
482+
status = calllib('ps6000a','ps6000aSetDataBuffer', obj.DriverData.unitHandle,channel, buffer, nSamples,...
483+
dataType, waveform, downSampleRatioMode, action);
484+
485+
if (status == PicoStatus.PICO_OK)
486+
487+
else
488+
489+
error('ps6000aSetDataBuffer: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
490+
491+
end</MCode>
492+
</Code>
493+
<Description/>
494+
</Method>
495+
<Method>
496+
<Name>ps6000aSetDeviceResolution</Name>
497+
<Location>parent</Location>
498+
<CapabilityGroup>Base</CapabilityGroup>
499+
<Type>MCode</Type>
500+
<Code>
501+
<MCode>function status = ps6000aSetDeviceResolution(obj, resolution)
502+
% For group functions, OBJ is the group object. For
503+
% base device functions, OBJ is the device object.
504+
505+
status = calllib('ps6000a','ps6000aSetDeviceResolution',obj.DriverData.unitHandle, resolution);
506+
507+
if (status == PicoStatus.PICO_OK)
508+
509+
else
510+
511+
error('ps6000aSetDeviceResolution: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
512+
513+
end
514+
515+
obj.DriverData.resolution = resolution;</MCode>
516+
</Code>
517+
<Description/>
518+
</Method>
519+
<Method>
520+
<Name>ps6000aSetSimpleTrigger</Name>
521+
<Location>parent</Location>
522+
<CapabilityGroup>Base</CapabilityGroup>
523+
<Type>MCode</Type>
524+
<Code>
525+
<MCode>function status = ps6000aSetSimpleTrigger(obj, enable, source, threshold, direction, delay, autoTriggerMicroSeconds)
526+
% For group functions, OBJ is the group object. For
527+
% base device functions, OBJ is the device object.
528+
529+
status = calllib('ps6000a','ps6000aSetSimpleTrigger', obj.DriverData.unitHandle, enable, source,...
530+
threshold, direction, delay, autoTriggerMicroSeconds);
531+
532+
if (status == PicoStatus.PICO_OK)
533+
534+
else
535+
536+
error('ps6000aSetSimpleTrigger: status code %d, please refer to the PicoStatus.m file.', dec2hex(status));
537+
538+
end</MCode>
539+
</Code>
540+
<Description/>
541+
</Method>
542+
</MethodInfo>
329543
</Group>
330544
</GroupInfo>
331545
</MATLABInstrumentDriver>

0 commit comments

Comments
 (0)