-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpicotech_ps4000_generic.mdd
4636 lines (3388 loc) · 177 KB
/
picotech_ps4000_generic.mdd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<MATLABInstrumentDriver>
<FileVersion>2.42</FileVersion>
<DriverName>picotech_ps4000_generic.mdd</DriverName>
<DriverType>MATLAB generic</DriverType>
<InstrumentType>Oscilloscope</InstrumentType>
<InstrumentManufacturer>Pico Technology Ltd.</InstrumentManufacturer>
<InstrumentModel>PicoScope 4000 Series</InstrumentModel>
<InstrumentVersion>1.1.12</InstrumentVersion>
<Identify/>
<Reset/>
<Selftest/>
<Error/>
<CreateInitCode>
<Code>function init(obj)
% This function is called after the object is created.
% OBJ is the device object.
% End of function definition - DO NOT EDIT
% Copyright © 2014-2017 Pico Technology Ltd. All rights reserved.
% You may copy and distribute this file as long as it remains unmodified.
% SB
fprintf('\nCopyright © 2014-2017 Pico Technology Ltd. All rights reserved.\n');
fprintf('\n');
fprintf('PicoScope 4000 Series MATLAB Instrument Driver\n');
fprintf('\n');
% Load libraries
% ==============
% Indentify architecture and obtain function handle for the correct
% prototype file.
archStr = computer('arch');
ps4000MFile = str2func(strcat('ps4000MFile_', archStr));
ps4000WrapMFile = str2func(strcat('ps4000WrapMFile_', archStr));
% Only load library once
if (libisloaded('ps4000'))
% Do nothing
else
if (ismac())
[ps4000NotFound, ps4000Warnings] = loadlibrary('libps4000.dylib', ps4000MFile, 'alias', 'ps4000');
elseif (isunix())
[ps4000NotFound, ps4000Warnings] = loadlibrary('libps4000.so', ps4000MFile, 'alias', 'ps4000');
elseif (ispc())
[ps4000NotFound, ps4000Warnings] = loadlibrary('ps4000.dll', ps4000MFile);
else
% Do nothing
end
end
% Only load library once
if (libisloaded('ps4000Wrap'))
% Do nothing
else
if (ismac())
[ps4000NotFound, ps4000Warnings] = loadlibrary('libps4000Wrap.dylib', ps4000WrapMFile, 'alias', 'ps4000Wrap');
elseif (isunix())
[ps4000NotFound, ps4000Warnings] = loadlibrary('libps4000Wrap.so', ps4000WrapMFile, 'alias', 'ps4000Wrap');
elseif (ispc())
[ps4000NotFound, ps4000Warnings] = loadlibrary('ps4000Wrap.dll', ps4000WrapMFile);
else
% Do nothing
end
end
% Load in enumeration and structure information
% =============================================
[~, obj.DriverData.structs, obj.DriverData.enums, ~] = ps4000MFile();
[~, ~, obj.DriverData.wrapEnums, ~] = ps4000WrapMFile();
% Maximum number of devices using this driver
% -------------------------------------------
obj.DriverData.constants.PS4000_MAX_UNITS = 64;
% Define constant values used by this Instrument Driver
% =====================================================
% Constants from ps4000Api.h header file
% ---------------------------------------
% ETS Mode properties
obj.DriverData.constants.PS4000_MAX_ETS_CYCLES = 400;
obj.DriverData.constants.PS4000_MAX_ETS_INTERLEAVE = 80;
obj.DriverData.constants.PS4262_MAX_VALUE = 32767;
obj.DriverData.constants.PS4262_MIN_VALUE = -32767;
obj.DriverData.constants.PS4000_MAX_VALUE = 32764;
obj.DriverData.constants.PS4000_MIN_VALUE = -32764;
% External Trigger Input ADC Count
obj.DriverData.constants.PS4000_EXT_MAX_VALUE = 32767;
obj.DriverData.constants.PS4000_EXT_MIN_VALUE = -32767;
obj.DriverData.constants.MAX_PULSE_WIDTH_QUALIFIER_COUNT = 16777215;
obj.DriverData.constants.MAX_DELAY_COUNT = 8388607;
% Function/Arbitrary Waveform Parameters
obj.DriverData.constants.MIN_SIG_GEN_FREQ = 0.0;
obj.DriverData.constants.MAX_SIG_GEN_FREQ = 100000.0;
obj.DriverData.constants.MAX_SIG_GEN_FREQ_4262 = 20000.0;
obj.DriverData.constants.MIN_SIG_GEN_BUFFER_SIZE = 1;
obj.DriverData.constants.MAX_SIG_GEN_BUFFER_SIZE = PicoConstants.AWG_BUFFER_8KS;
obj.DriverData.constants.MIN_DWELL_COUNT = 10;
obj.DriverData.constants.PS4262_SIGGEN_MAXPKTOPK = 2000000;
obj.DriverData.constants.PS4000_SIGGEN_MAXPKTOPK = 4000000;
obj.DriverData.constants.PS4262_MAX_WAVEFORM_BUFFER_SIZE = 4096;
obj.DriverData.constants.PS4262_MIN_DWELL_COUNT = 3;
obj.DriverData.constants.MAX_SWEEPS_SHOTS = pow2(30) - 1;
% Frequencies
obj.DriverData.constants.PS4000_SINE_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_SQUARE_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_TRIANGLE_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_SINC_MAX_FREQUENCY = 20000000
obj.DriverData.constants.PS4000_RAMP_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_HALF_SINE_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_GAUSSIAN_MAX_FREQUENCY = 20000000;
obj.DriverData.constants.PS4000_PRBS_MAX_FREQUENCY = 1000000;
obj.DriverData.constants.PS4000_PRBS_MIN_FREQUENCY = 0.03;
obj.DriverData.constants.PS4000_MIN_FREQUENCY = 0.03;
% Confirm data files have been loaded
if (exist('PicoConstants.m', 'file') == 0)
error('File PicoConstants.m not found - please ensure that the location of this file is added to the MATLAB Path.')
end
if (exist('PS4000Constants.m', 'file') == 0)
error('File PS4000Constants.m not found - please ensure that the location of this file is added to the MATLAB Path.')
end
% Obtain flag to indicate if functions should output text to Command
% Window
% -------------------------------
obj.DriverData.displayOutput = obj.displayOutput;
% Default external trigger range for the PicoScope 4262
obj.DriverData.extTriggerRange = obj.DriverData.enums.enPS4000Range.PS4000_5V;
% Enumerate units
% ---------------
% Only displayed if driver is being used via command line
count = int16(0);
serials = blanks(100);
serialLth = length(serials);
[status, count, serials, serialLth] = calllib('ps4000', ...
'ps4000EnumerateUnits', count, serials, serialLth);
if (status == PicoStatus.PICO_OK)
fprintf('Number of units found: %d\n\nSerial number(s): %s\n', count, serials);
elseif (status == PicoStatus.PICO_NOT_FOUND)
error('Create:NoUnitsFound', 'No units found.');
else
error('Create:StatusNotOK', 'Status code: %d\n', status);
end
</Code>
</CreateInitCode>
<ConnectInitCode>
<Type>MCode</Type>
<Code>function init(obj)
% This function is called after the object is connected.
% OBJ is the device object.
% End of function definition - DO NOT EDIT
% Copyright (C) 2014 - 2015 Pico Technology Ltd. All rights reserved.
% You may copy and distribute this file as long as it remains unmodified.
disp('Opening PicoScope 4000 Series device...');
% Structure to hold status values while connecting to the device.
% Only output when the driver is called using command line or script.
connectStatus = [];
% Temporary variable to store handle value
unitHandle = 0;
% PICO_OK status value (0)
picoOK = PicoStatus.PICO_OK;
% Obtain the serial input
serialNum = get(obj, 'RsrcName');
% Determine if serial number is specified or null
if ~isempty(serialNum)
unitSerial = serialNum;
else
unitSerial = [];
end
% Open the unit
[connectStatus.openUnit, unitHandle, obj.UserData.unitSerial] = ...
calllib('ps4000', 'ps4000OpenUnitEx', unitHandle, unitSerial);
obj.DriverData.unitHandle = unitHandle;
% Initial channel settings to assist with change in power source
% Setup initial channel settings (4 x 4)
% 4 channels consisting of enabled, coupling, range, analogue offset
% Default will be set later via resetDevice
obj.DriverData.channelSettings = zeros(PicoConstants.QUAD_SCOPE, 4);
% Set handle and serial
% Unit connected if 0 or power supply not connected
if(connectStatus.openUnit == picoOK)
% Display object information
obj
unitHandle = obj.DriverData.unitHandle;
infoLine = blanks(15);
reqSize = 15;
[connectStatus.unit_serial, unitSerial, reqSize] = calllib('ps4000', ...
'ps4000GetUnitInfo', unitHandle, infoLine, ...
length(infoLine), reqSize, PicoStatus.PICO_BATCH_AND_SERIAL);
obj.DriverData.unitSerial = unitSerial;
% Set variant and channel count information
%disp('Setting variant and channel count...')
infoLineV = blanks(15);
reqSizeV = 15;
[connectStatus.unit_variant, variant, reqSizeV] = calllib('ps4000', ...
'ps4000GetUnitInfo', unitHandle, infoLineV, ...
length(infoLineV), reqSizeV, PicoStatus.PICO_VARIANT_INFO);
set(obj, 'InstrumentModel', variant);
% Set device parameters
invoke(obj, 'resetDevice');
% Display unit information to user if not using TMTool
fprintf('\n');
fprintf('Connected to PicoScope 4000 Series device:-\n\n');
fprintf(' Instrument Model: %s\n', get(obj, 'InstrumentModel'));
fprintf(' Batch/Serial Number: %s\n', unitSerial);
fprintf(' Analogue Channels: %d\n', get(obj, 'channelCount'));
% Bandwidth information
bandwidthHz = get(obj, 'bandwidth');
if(bandwidthHz > 0 && bandwidthHz < 1e9)
fprintf(' Bandwidth: %d MHz\n', (bandwidthHz/1e6));
elseif(bandwith_hz >= 1e9)
fprintf(' Bandwidth: %d GHz\n', (bandwidthHz/1e9));
else
% Do nothing
end
fprintf(' Buffer memory: %d MS\n', get(obj, 'bufferMemory')/pow2(20));
% Sampling rate information
maxSamplingRate = get(obj, 'maxSamplingRate');
if(maxSamplingRate > 0 && maxSamplingRate < 1e9)
fprintf(' Maximum sampling rate: %d MS/s\n', maxSamplingRate/1e6);
elseif(maxSamplingRate >= 1e9)
fprintf(' Maximum sampling rate: %d GS/s\n', maxSamplingRate/1e9);
else
% Do nothing
end
clear bandwidthHZ;
clear maxSamplingRate;
% Output the signal generator type
sigGenType = 'None';
switch (obj.DriverData.sigGenType)
case PicoConstants.SIG_GEN_FUNCT_GEN
sigGenType = 'Function Generator';
case PicoConstants.SIG_GEN_AWG
sigGenType = 'Arbitrary Waveform Generator';
otherwise
% Already set to none
end
fprintf(' Signal Generator Type: %s\n', sigGenType);
fprintf('\n');
elseif(connectStatus.openUnit == PicoStatus.PICO_NOT_FOUND)
error('No unit found, please check connections.');
else
error('Status code: %d\n', connectStatus.openUnit);
end</Code>
</ConnectInitCode>
<CleanupCode>
<Type>MCode</Type>
<Code>function cleanup(obj)
% This function is called before the object is disconnected.
% OBJ is the device object.
% End of function definition - DO NOT EDIT
if (isfield(obj.DriverData, 'unitHandle'))
unitHandle = obj.DriverData.unitHandle;
if (isempty(unitHandle))
% If no unitHandle, return without doing anything
return;
end
if (~libisloaded('ps4000') && ~libisloaded('ps4000Wrap'))
% If the drivers are no longer loaded, return without doing
% anything
return;
end
% Disconnect Code:
disconnectStatus = calllib('ps4000', 'ps4000CloseUnit', obj.DriverData.unitHandle);
if (disconnectStatus == PicoStatus.PICO_OK)
fprintf(['Connection to PicoScope %s with serial number %s ' ...
'closed successfully.\n'], obj.InstrumentModel, obj.DriverData.unitSerial);
elseif (disconnectStatus == PicoStatus.PICO_INVALID_HANDLE)
% No device with the handle, so should be disconnected.
return;
else
if (isfield(obj.DriverData, 'unitSerial'))
error('Disconnect:ConnectionNotClosed',['Connection to PicoScope %s with serial number %s ' ...
'not closed. Status code %d\n'], ...
obj.InstrumentModel, obj.DriverData.unitSerial, disconnectStatus);
end
end
% Only unload libraries if there are no more connected
% oscilloscopes
% Find the first handle number for the platform
firstHandle = 0;
if (ispc())
firstHandle = 16384; % Windows PC
else
firstHandle = 1; % Mac OS X and Linux
end
% Test the connection to a range of handle values up to a maximum
lastHandle = firstHandle + obj.DriverData.constants.PS4000_MAX_UNITS - 1;
% Create an array to store status values for ping tests.
% On Windows PCs, the first handle is 16384 so this will need to be
% accounted for.
if (ispc())
pingStatus = zeros(lastHandle, 1);
else
pingStatus = zeros(obj.DriverData.constants.PS4000_MAX_UNITS, 1);
end
% Test the handle value ranges
for h = firstHandle:lastHandle
pingStatus(h, 1) = calllib('ps4000', 'ps4000PingUnit', h);
end
if (ispc())
% Need to resize arrray as first handle is not 0
pingStatus(1:firstHandle - 1) = [];
end
if (any(pingStatus == PicoStatus.PICO_OK))
% Device still connected
disp('Other PicoScope 4000 Series devices are still connected - libraries will not be unloaded.');
else
unloadlibrary('ps4000Wrap');
unloadlibrary('ps4000');
if (~libisloaded('ps4000') && ~libisloaded('ps4000Wrap'))
disp('Libraries unloaded successfully.');
else
error('Libraries not unloaded.');
end
end
else
warning('Disconnect:NoDevicesFound', 'Disconnect: No devices found.');
end</Code>
</CleanupCode>
<GroupInfo>
<Group>
<Name>parent</Name>
<Description/>
<Command/>
<Size>1</Size>
<Mappings>
<ChannelMap Command="parent1" Index="1"/>
</Mappings>
<PropertyInfo>
<Property>
<Name>bandwidth</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If bandwidth doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'bandwidth') )
obj.DriverData.bandwidth = 0;
end
propertyValue = obj.DriverData.bandwidth;
</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>0</DefaultValue>
<ReadOnly>never</ReadOnly>
<Description/>
</Property>
<Property>
<Name>bufferMemory</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If bufferMemory doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'bufferMemory') )
obj.DriverData.bufferMemory = 0;
else
propertyValue = obj.DriverData.bufferMemory;
end</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>268435456</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>Defines the size of the memory buffer on the device (in samples).</Description>
</Property>
<Property>
<Name>channelCount</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If channelCount doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'channelCount') )
obj.DriverData.channelCount = [ ];
end
propertyValue = obj.DriverData.channelCount;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>8</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>The number of analogue input channels on the device.</Description>
</Property>
<Property>
<Name>channelSettings</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If channelSettings doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'channelSettings') )
obj.UserData.channelSettings = [ ];
end
propertyValue = obj.DriverData.channelSettings;
</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Object</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue/>
<ReadOnly>always</ReadOnly>
<Description>A matrix containing the channel settings for analogue channels.
This will consist of a 8 x 4 matrix.
The row number will correspond to the channel:
1 - Channel A
2 - Channel B
3 - Channel C
4 - Channel D
5 - Channel A
6 - Channel B
7 - Channel C
8 - Channel D
Each row will contain the following elements corresponding to:
enabled - set to 0 (off) or 1 (on).
dc - set DC/AC coupling.
range - an enumeration representing the voltage range.
analogueOffset - the offset on the channel.
</Description>
</Property>
<Property>
<Name>displayOutput</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
propertyValue = obj.DriverData.displayOutput;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
obj.DriverData.displayOutput = propertyValue;</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>enum</Constraint>
<ConstraintValue>
<Value>0.0</Value>
<Value>1.0</Value>
</ConstraintValue>
</PermissibleType>
<DefaultValue>1</DefaultValue>
<ReadOnly>never</ReadOnly>
<Description>Enumeration value to select whether to display output from function calls in the MATLAB Command Window.
Set to 1 to display output, 0 to hide output.
Note: Output will still be sent to the Command Window when calling the icdevice, connect and disconnect functions. Warning and error messages will still continue to be displayed from function calls.</Description>
</Property>
<Property>
<Name>firstRange</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If firstRange doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'firstRange') )
obj.DriverData.firstRange = [ ];
else
propertyValue = obj.DriverData.firstRange;
end</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>enum</Constraint>
<ConstraintValue>
<Value>0.0</Value>
<Value>1.0</Value>
<Value>2.0</Value>
<Value>3.0</Value>
<Value>4.0</Value>
<Value>5.0</Value>
<Value>6.0</Value>
<Value>7.0</Value>
<Value>8.0</Value>
<Value>9.0</Value>
<Value>10.0</Value>
<Value>11.0</Value>
</ConstraintValue>
</PermissibleType>
<DefaultValue>2</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>Enumeration corresponding to the lowest voltage range supported by the device.</Description>
</Property>
<Property>
<Name>hasHardwareEts</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If hasHardwareEts doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'hasHardwareEts') )
obj.DriverData.hasHardwareEts = [ ];
end
propertyValue = obj.DriverData.hasHardwareEts;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>enum</Constraint>
<ConstraintValue>
<Value>0.0</Value>
<Value>1.0</Value>
</ConstraintValue>
</PermissibleType>
<DefaultValue>0.0</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>Indicates if the device has hardware-based Equivalent Time Sampling.</Description>
</Property>
<Property>
<Name>lastRange</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If lastRange doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'lastRange') )
obj.DriverData.lastRange = [ ];
end
propertyValue = obj.DriverData.lastRange;
</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>enum</Constraint>
<ConstraintValue>
<Value>0.0</Value>
<Value>1.0</Value>
<Value>2.0</Value>
<Value>3.0</Value>
<Value>4.0</Value>
<Value>5.0</Value>
<Value>6.0</Value>
<Value>7.0</Value>
<Value>8.0</Value>
<Value>9.0</Value>
<Value>10.0</Value>
<Value>11.0</Value>
</ConstraintValue>
</PermissibleType>
<DefaultValue>10</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>Enumeration corresponding to highest voltage range supported by device.</Description>
</Property>
<Property>
<Name>maxADCValue</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If maxADCValue doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'maxADCValue') )
obj.DriverData.maxADCValue = 0;
end
propertyValue = obj.DriverData.maxADCValue;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>32767</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>The maximum ADC count value for the device.</Description>
</Property>
<Property>
<Name>maxSamplingRate</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If maxSamplingRate doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'maxSamplingRate') )
obj.DriverData.maxSamplingRate = [ ];
end
propertyValue = obj.DriverData.maxSamplingRate;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>0</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>The maximum single shot sampling rate for the device (samples per second).</Description>
</Property>
<Property>
<Name>minADCValue</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If minADCValue doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'minADCValue') )
obj.DriverData.minADCValue = 0;
end
propertyValue = obj.DriverData.minADCValue;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>-32767</DefaultValue>
<ReadOnly>always</ReadOnly>
<Description>The minimum ADC count value for the device.</Description>
</Property>
<Property>
<Name>numPostTriggerSamples</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If numPostTriggerSamples doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'numPostTriggerSamples') )
obj.DriverData.numPostTriggerSamples = [ ];
end
propertyValue = obj.DriverData.numPostTriggerSamples;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
obj.DriverData.numPostTriggerSamples = propertyValue;</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>0</DefaultValue>
<ReadOnly>never</ReadOnly>
<Description>The number of samples to be taken after a trigger event.
If no trigger event has been set then this specifies the maximum number of samples to be taken. If a trigger
condition has been set, this specifies the number of samples to be taken after a trigger has fired, and the number of samples to be
collected is then: -
noOfPreTriggerSamples + noOfPostTriggerSamples
When used in Streaming mode, this is the maximum number of raw samples after a trigger event for each enabled channel.</Description>
</Property>
<Property>
<Name>numPreTriggerSamples</Name>
<Location>parent</Location>
<CapabilityGroup>Base</CapabilityGroup>
<Type>MCode</Type>
<Code>
<GetMCode>function propertyValue = getProperty(obj, propertyName)
% Return a property value.
% This function is called to return the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
% If numPreTriggerSamples doesn't exist, create it.
if ( ~isfield(obj.DriverData, 'numPreTriggerSamples') )
obj.DriverData.numPreTriggerSamples = [ ];
end
propertyValue = obj.DriverData.numPreTriggerSamples;</GetMCode>
<SetMCode>function set(obj, propertyName, propertyValue)
% Set a property value.
% This function is called to set the device or group object property
% value. If the property is a group property, OBJ is the group object. If
% the property is a base device property, OBJ is the device object.
obj.DriverData.numPreTriggerSamples = propertyValue;</SetMCode>
</Code>
<PermissibleType>
<Type>Double</Type>
<Constraint>none</Constraint>
</PermissibleType>
<DefaultValue>0</DefaultValue>
<ReadOnly>never</ReadOnly>
<Description>The number of samples to return before the trigger event.
If no trigger has been set then this argument is ignored and noOfPostTriggerSamples specifies the maximum number of samples to collect.
When used in Streaming mode, this is the maximum number of raw samples before the trigger event for each enabled channel.
</Description>
</Property>
<Property>