forked from colinoflynn/pico-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpicoscope.ps2000a.html
More file actions
436 lines (358 loc) · 33.6 KB
/
Copy pathpicoscope.ps2000a.html
File metadata and controls
436 lines (358 loc) · 33.6 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module picoscope.ps2000a</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="picoscope.html"><font color="#ffffff">picoscope</font></a>.ps2000a</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/guest/software/pico-python/picoscope/ps2000a.py">/home/guest/software/pico-python/picoscope/ps2000a.py</a></font></td></tr></table>
<p><tt>This is the low level driver file for a specific Picoscope.<br>
<br>
By this, I mean if parameters want to get passed as strings, they should be<br>
handled by PSBase<br>
All functions here should take things as close to integers as possible, the<br>
only exception here is for array parameters. Array parameters should be passed<br>
in a pythonic way through numpy since the PSBase class should not be aware of<br>
the specifics behind how the clib is called.<br>
<br>
The functions should not have any default values as these should be handled<br>
by PSBase.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
</td><td width="25%" valign=top><a href="platform.html">platform</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a>(<a href="builtins.html#object">builtins.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="picoscope.ps2000a.html#PS2000a">PS2000a</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="PS2000a">class <strong>PS2000a</strong></a>(<a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#PS2000a">PS2000a</a>(serialNumber=None, connect=True)<br>
<br>
The following are low-level functions for the <a href="#PS2000a">PS2000a</a>.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="picoscope.ps2000a.html#PS2000a">PS2000a</a></dd>
<dd><a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="PS2000a-__init__"><strong>__init__</strong></a>(self, serialNumber=None, connect=True)</dt><dd><tt>Load DLL etc.</tt></dd></dl>
<dl><dt><a name="PS2000a-getTimeBaseNum"><strong>getTimeBaseNum</strong></a>(self, sampleTimeS)</dt><dd><tt>Convert sample time in S to something to pass to API Call.</tt></dd></dl>
<dl><dt><a name="PS2000a-getTimestepFromTimebase"><strong>getTimestepFromTimebase</strong></a>(self, timebase)</dt><dd><tt>Convvert API timestep code to sampling interval.<br>
<br>
API timestep as an integer from 0-32,<br>
sampling interval in seconds.</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>ADC_RESOLUTIONS</strong> = {'12': 1, '14': 2, '15': 3, '16': 4, '8': 0}</dl>
<dl><dt><strong>AWGMaxVal</strong> = 32767</dl>
<dl><dt><strong>AWGMinVal</strong> = -32767</dl>
<dl><dt><strong>AWGPhaseAccumulatorSize</strong> = 32</dl>
<dl><dt><strong>AWG_INDEX_MODES</strong> = {'Dual': 1, 'Quad': 2, 'Single': 0}</dl>
<dl><dt><strong>CHANNELS</strong> = {'A': 0, 'B': 1, 'C': 2, 'D': 3, 'External': 4, 'MaxChannels': 4, 'TriggerAux': 5}</dl>
<dl><dt><strong>CHANNEL_COUPLINGS</strong> = {'AC': 0, 'DC': 1}</dl>
<dl><dt><strong>CHANNEL_RANGE</strong> = [{'apivalue': 0, 'rangeStr': '10 mV', 'rangeV': 0.01}, {'apivalue': 1, 'rangeStr': '20 mV', 'rangeV': 0.02}, {'apivalue': 2, 'rangeStr': '50 mV', 'rangeV': 0.05}, {'apivalue': 3, 'rangeStr': '100 mV', 'rangeV': 0.1}, {'apivalue': 4, 'rangeStr': '200 mV', 'rangeV': 0.2}, {'apivalue': 5, 'rangeStr': '500 mV', 'rangeV': 0.5}, {'apivalue': 6, 'rangeStr': '1 V', 'rangeV': 1.0}, {'apivalue': 7, 'rangeStr': '2 V', 'rangeV': 2.0}, {'apivalue': 8, 'rangeStr': '5 V', 'rangeV': 5.0}, {'apivalue': 9, 'rangeStr': '10 V', 'rangeV': 10.0}, {'apivalue': 10, 'rangeStr': '20 V', 'rangeV': 20.0}, {'apivalue': 11, 'rangeStr': '50 V', 'rangeV': 50.0}]</dl>
<dl><dt><strong>EXT_RANGE_VOLTS</strong> = 5</dl>
<dl><dt><strong>LIBNAME</strong> = 'ps2000a'</dl>
<dl><dt><strong>MAX_VALUE_8BIT</strong> = 32512</dl>
<dl><dt><strong>MAX_VALUE_OTHER</strong> = 32767</dl>
<dl><dt><strong>MIN_VALUE_8BIT</strong> = -32512</dl>
<dl><dt><strong>MIN_VALUE_OTHER</strong> = -32767</dl>
<dl><dt><strong>NUM_CHANNELS</strong> = 4</dl>
<dl><dt><strong>SIGGEN_TRIGGER_SOURCES</strong> = {'AuxIn': 2, 'ExtIn': 3, 'None': 0, 'ScopeTrig': 1, 'SoftTrig': 4, 'TriggerRaw': 5}</dl>
<dl><dt><strong>SIGGEN_TRIGGER_TYPES</strong> = {'Falling': 1, 'GateHigh': 2, 'GateLow': 3, 'Rising': 0}</dl>
<dl><dt><strong>SWEEP_TYPES</strong> = {'Down': 1, 'DownUp': 3, 'Up': 0, 'UpDown': 2}</dl>
<dl><dt><strong>TIME_UNITS</strong> = {0: 1e-15, 1: 1e-12, 2: 1e-09, 3: 1e-06, 4: 0.001, 5: 1.0}</dl>
<dl><dt><strong>WAVE_TYPES</strong> = {'DCVoltage': 8, 'Gaussian': 6, 'HalfSine': 7, 'RampDown': 4, 'RampUp': 3, 'Sinc': 5, 'Sine': 0, 'Square': 1, 'Triangle': 2, 'WhiteNoise': 9}</dl>
<hr>
Methods inherited from <a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a>:<br>
<dl><dt><a name="PS2000a-__del__"><strong>__del__</strong></a>(self)</dt></dl>
<dl><dt><a name="PS2000a-changePowerSource"><strong>changePowerSource</strong></a>(self, powerstate)</dt><dd><tt>Change the powerstate of the scope.<br>
<br>
Valid only for PS54XXA/B?</tt></dd></dl>
<dl><dt><a name="PS2000a-checkResult"><strong>checkResult</strong></a>(self, ec)</dt><dd><tt>Check result of function calls, raise exception if not 0.</tt></dd></dl>
<dl><dt><a name="PS2000a-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the scope.<br>
<br>
You should call this yourself because the Python garbage collector<br>
might take some time.</tt></dd></dl>
<dl><dt><a name="PS2000a-enumerateUnits"><strong>enumerateUnits</strong></a>(self)</dt><dd><tt>Enumerate connceted units.<br>
<br>
Return serial numbers as list of strings.</tt></dd></dl>
<dl><dt><a name="PS2000a-errorNumToDesc"><strong>errorNumToDesc</strong></a>(self, num)</dt><dd><tt>Return the description of the error as a string.</tt></dd></dl>
<dl><dt><a name="PS2000a-errorNumToName"><strong>errorNumToName</strong></a>(self, num)</dt><dd><tt>Return the name of the error as a string.</tt></dd></dl>
<dl><dt><a name="PS2000a-flashLed"><strong>flashLed</strong></a>(self, times=5, start=False, stop=False)</dt><dd><tt>Flash the front panel LEDs.<br>
<br>
Use one of input arguments to specify how the Picoscope will flash the<br>
LED<br>
<br>
times = The number of times the picoscope will flash the LED<br>
start = If true, will flash the LED indefinitely<br>
stop = If true, will stop any flashing.<br>
<br>
Note that calls to the RunStreaming or RunBlock will stop any flashing.</tt></dd></dl>
<dl><dt><a name="PS2000a-getAWGDeltaPhase"><strong>getAWGDeltaPhase</strong></a>(self, timeIncrement)</dt><dd><tt>Return the deltaPhase integer used by the AWG.<br>
<br>
This is useful when you are trying to generate very fast waveforms when<br>
you are getting close to the limits of your waveform generator.<br>
<br>
For example, the PS6000's DDS phase accumulator increments by<br>
deltaPhase every AWGDACInterval.<br>
The top 2**self.<strong>AWGBufferAddressWidth</strong> bits indicate which sample is<br>
being output by the DDS.</tt></dd></dl>
<dl><dt><a name="PS2000a-getAWGTimeIncrement"><strong>getAWGTimeIncrement</strong></a>(self, deltaPhase)</dt><dd><tt>Return the time between AWG samples given a certain deltaPhase.<br>
<br>
You should use this function in conjunction with<br>
getAWGDeltaPhase to obtain the actual timestep of AWG.</tt></dd></dl>
<dl><dt><a name="PS2000a-getAllUnitInfo"><strong>getAllUnitInfo</strong></a>(self)</dt><dd><tt>Return: human readible unit information as a string.</tt></dd></dl>
<dl><dt><a name="PS2000a-getDataRaw"><strong>getDataRaw</strong></a>(self, channel='A', numSamples=0, startIndex=0, downSampleRatio=1, downSampleMode=0, segmentIndex=0, data=None)</dt><dd><tt>Return the data in the purest form.<br>
<br>
It returns a tuple containing:<br>
(data, numSamplesReturned, overflow)<br>
data is an array of size numSamples<br>
numSamplesReturned is the number of samples returned by the Picoscope<br>
(I don't know when this would not be equal to numSamples)<br>
overflow is a flag that is true when the signal was either too large<br>
or too small to be properly digitized</tt></dd></dl>
<dl><dt><a name="PS2000a-getDataRawBulk"><strong>getDataRawBulk</strong></a>(self, channel='A', numSamples=0, fromSegment=0, toSegment=None, downSampleRatio=1, downSampleMode=0, data=None)</dt><dd><tt>Get data recorded in block mode.</tt></dd></dl>
<dl><dt><a name="PS2000a-getDataV"><strong>getDataV</strong></a>(self, channel, numSamples=0, startIndex=0, downSampleRatio=1, downSampleMode=0, segmentIndex=0, returnOverflow=False, exceptOverflow=False, dataV=None, dataRaw=None, dtype=<class 'numpy.float64'>)</dt><dd><tt>Return the data as an array of voltage values.<br>
<br>
it returns (dataV, overflow) if returnOverflow = True<br>
else, it returns returns dataV<br>
dataV is an array with size numSamplesReturned<br>
overflow is a flag that is true when the signal was either too large<br>
or too small to be properly digitized<br>
<br>
if exceptOverflow is true, an IOError exception is raised on overflow<br>
if returnOverflow is False. This allows you to detect overflows at<br>
higher layers w/o complicated return trees. You cannot however read the<br>
'good' data, you only get the exception information then.</tt></dd></dl>
<dl><dt><a name="PS2000a-getMaxMemorySegments"><strong>getMaxMemorySegments</strong></a>(self)</dt></dl>
<dl><dt><a name="PS2000a-getMaxValue"><strong>getMaxValue</strong></a>(self)</dt><dd><tt>Return the maximum ADC value, used for scaling.</tt></dd></dl>
<dl><dt><a name="PS2000a-getMinValue"><strong>getMinValue</strong></a>(self)</dt><dd><tt>Return the minimum ADC value, used for scaling.</tt></dd></dl>
<dl><dt><a name="PS2000a-getScaleAndOffset"><strong>getScaleAndOffset</strong></a>(self, channel)</dt><dd><tt>Return the scale and offset used to convert the raw waveform.<br>
<br>
To use: first multiply by the scale, then subtract the offset<br>
<br>
Returns a dictionary with keys scale and offset</tt></dd></dl>
<dl><dt><a name="PS2000a-getTriggerTimeOffset"><strong>getTriggerTimeOffset</strong></a>(self, segmentIndex=0)</dt></dl>
<dl><dt><a name="PS2000a-getUnitInfo"><strong>getUnitInfo</strong></a>(self, info)</dt><dd><tt>Return: A string containing the requested information.</tt></dd></dl>
<dl><dt><a name="PS2000a-isReady"><strong>isReady</strong></a>(self)</dt><dd><tt>Check if scope done.<br>
<br>
Returns: bool.</tt></dd></dl>
<dl><dt><a name="PS2000a-memorySegments"><strong>memorySegments</strong></a>(self, noSegments)</dt></dl>
<dl><dt><a name="PS2000a-open"><strong>open</strong></a>(self, serialNumber=None)</dt><dd><tt>Open the scope, using a serialNumber if given.</tt></dd></dl>
<dl><dt><a name="PS2000a-openUnitAsync"><strong>openUnitAsync</strong></a>(self, serialNumber=None)</dt><dd><tt>Open the scope asynchronously.</tt></dd></dl>
<dl><dt><a name="PS2000a-openUnitProgress"><strong>openUnitProgress</strong></a>(self)</dt><dd><tt>Return a tuple (progress, completed).</tt></dd></dl>
<dl><dt><a name="PS2000a-ping"><strong>ping</strong></a>(self)</dt><dd><tt>Ping unit to check that the already opened device is connected.</tt></dd></dl>
<dl><dt><a name="PS2000a-rawToV"><strong>rawToV</strong></a>(self, channel, dataRaw, dataV=None, dtype=<class 'numpy.float64'>)</dt><dd><tt>Convert the raw data to voltage units. Return as numpy array.</tt></dd></dl>
<dl><dt><a name="PS2000a-runBlock"><strong>runBlock</strong></a>(self, pretrig=0.0, segmentIndex=0)</dt><dd><tt>Run a single block.<br>
<br>
Must have already called setSampling for proper setup.</tt></dd></dl>
<dl><dt><a name="PS2000a-setAWGSimple"><strong>setAWGSimple</strong></a>(self, waveform, duration, offsetVoltage=None, pkToPk=None, indexMode='Single', shots=1, triggerType='Rising', triggerSource='ScopeTrig')</dt><dd><tt>Set the AWG to output your desired wavefrom.<br>
<br>
If you require precise control of the timestep increment, you should<br>
use setSigGenAritrarySimpleDelaPhase instead<br>
<br>
Check setSigGenAritrarySimpleDelaPhase for parameter explanation<br>
<br>
Returns:<br>
The actual duration of the waveform</tt></dd></dl>
<dl><dt><a name="PS2000a-setAWGSimpleDeltaPhase"><strong>setAWGSimpleDeltaPhase</strong></a>(self, waveform, deltaPhase, offsetVoltage=None, pkToPk=None, indexMode='Single', shots=1, triggerType='Rising', triggerSource='ScopeTrig')</dt><dd><tt>Specify deltaPhase between each sample and not the total waveform<br>
duration.<br>
<br>
Returns the actual time duration of the waveform<br>
<br>
If pkToPk and offset Voltage are both set to None, then their values<br>
are computed as<br>
<br>
pkToPk = np.max(waveform) - np.min(waveform)<br>
offset = (np.max(waveform) + np.min(waveform)) / 2<br>
<br>
This should in theory minimize the quantization error in the ADC.<br>
<br>
else, the waveform shoudl be a numpy int16 type array with the<br>
containing waveform<br>
<br>
For the Quad mode, if offset voltage is not provided, then waveform[0]<br>
is assumed to be the offset. In quad mode, the offset voltage is the<br>
point of symmetry<br>
<br>
This is function provides a little more control than<br>
setAWGSimple in the sense that you are able to specify deltaPhase<br>
directly. It should only be used when deltaPhase becomes very large.<br>
<br>
Warning. Ideally, you would want this to be a power of 2 that way each<br>
sample is given out at exactly the same difference in time otherwise,<br>
if you give it something closer to .75 you would obtain<br>
<br>
T | phase accumulator value | sample<br>
0 | 0 | 0<br>
5 | 0.75 | 0<br>
10 | 1.50 | 1<br>
15 | 2.25 | 2<br>
20 | 3.00 | 3<br>
25 | 3.75 | 3<br>
<br>
notice how sample 0 and 3 were played twice while others were only<br>
played once.<br>
This is why this low level function is exposed to the user so that he<br>
can control these edge cases<br>
<br>
I would suggest using something like this: if you care about obtaining<br>
evenly spaced samples at the expense of the precise duration of the<br>
your waveform<br>
To find the next highest power of 2<br>
always a smaller sampling interval than the one you asked for<br>
math.pow(2, math.ceil(math.log(deltaPhase, 2)))<br>
<br>
To find the next smaller power of 2<br>
always a larger sampling interval than the one you asked for<br>
math.pow(2, math.floor(math.log(deltaPhase, 2)))<br>
<br>
To find the nearest power of 2<br>
math.pow(2, int(math.log(deltaPhase, 2), + 0.5))</tt></dd></dl>
<dl><dt><a name="PS2000a-setChannel"><strong>setChannel</strong></a>(self, channel='A', coupling='AC', VRange=2.0, VOffset=0.0, enabled=True, BWLimited=0, probeAttenuation=1.0)</dt><dd><tt>Set up a specific chthe scopeannel.<br>
<br>
It finds the smallest range that is capable of accepting your signal.<br>
Return actual range of the scope as double.<br>
<br>
The VOffset, is an offset that the scope will ADD to your signal.<br>
<br>
If using a probe (or a sense resitor), the probeAttenuation value is<br>
used to find the approriate channel range on the scope to use.<br>
<br>
e.g. to use a 10x attenuation probe, you must supply the following<br>
parameters ps.<a href="#PS2000a-setChannel">setChannel</a>('A', "DC", 20.0, 5.0, True, False, 10.0)<br>
<br>
The scope will then be set to use the +- 2V mode at the scope allowing<br>
you to measure your signal from -25V to +15V.<br>
After this point, you can set everything in terms of units as seen at<br>
the tip of the probe. For example, you can set a trigger of 15V and it<br>
will trigger at the correct value.<br>
<br>
When using a sense resistor, lets say R = 1.3 ohm, you obtain the<br>
relation:<br>
V = IR, meaning that your probe as an attenuation of R compared to the<br>
current you are trying to measure.<br>
<br>
You should supply probeAttenuation = 1.3<br>
The rest of your units should be specified in amps.<br>
<br>
Unfortunately, you still have to supply a VRange that is very close to<br>
the allowed values. This will change in furture version where we will<br>
find the next largest range to accomodate the desired range.<br>
<br>
Note that if you set a channel to use AC coupling, you may need<br>
to make a "dummy call" to runBlock, or the first batch of data<br>
returned via getData* may be inaccurate.<br>
See https://www.picotech.com/support/topic35401.html for more details.<br>
<br>
If you want to use units of mA, supply a probe attenuation of 1.3E3.<br>
Note, the authors recommend sticking to SI units because it makes it<br>
easier to guess what units each parameter is in.</tt></dd></dl>
<dl><dt><a name="PS2000a-setExtTriggerRange"><strong>setExtTriggerRange</strong></a>(self, VRange=0.5)</dt><dd><tt>This function sets the range for the EXT trigger channel<br>
<br>
This is only implemented for PS4000 series devices where<br>
the only acceptable values for VRange are 0.5 or 5.0</tt></dd></dl>
<dl><dt><a name="PS2000a-setNoOfCaptures"><strong>setNoOfCaptures</strong></a>(self, noCaptures)</dt></dl>
<dl><dt><a name="PS2000a-setResolution"><strong>setResolution</strong></a>(self, resolution)</dt><dd><tt>For 5000-series or certain 4000-series scopes ONLY,<br>
sets the resolution.</tt></dd></dl>
<dl><dt><a name="PS2000a-setSamplingFrequency"><strong>setSamplingFrequency</strong></a>(self, sampleFreq, noSamples, oversample=0, segmentIndex=0)</dt><dd><tt>Return (actualSampleFreq, maxSamples).</tt></dd></dl>
<dl><dt><a name="PS2000a-setSamplingInterval"><strong>setSamplingInterval</strong></a>(self, sampleInterval, duration, oversample=0, segmentIndex=0)</dt><dd><tt>Return (actualSampleInterval, noSamples, maxSamples).</tt></dd></dl>
<dl><dt><a name="PS2000a-setSigGenBuiltInSimple"><strong>setSigGenBuiltInSimple</strong></a>(self, offsetVoltage=0, pkToPk=2, waveType='Sine', frequency=1000000.0, shots=1, triggerType='Rising', triggerSource='None', stopFreq=None, increment=10.0, dwellTime=0.001, sweepType='Up', numSweeps=0)</dt><dd><tt>Generate simple signals using the built-in waveforms.<br>
<br>
Supported waveforms include:<br>
Sine, Square, Triangle, RampUp, RampDown, and DCVoltage<br>
<br>
Some hardware also supports these additional waveforms:<br>
Sinc, Gaussian, HalfSine, and WhiteNoise<br>
<br>
To sweep the waveform, set the stopFrequency and optionally the<br>
increment, dwellTime, sweepType and numSweeps.<br>
<br>
Supported sweep types: Up, Down, UpDown, DownUp</tt></dd></dl>
<dl><dt><a name="PS2000a-setSimpleTrigger"><strong>setSimpleTrigger</strong></a>(self, trigSrc, threshold_V=0, direction='Rising', delay=0, timeout_ms=100, enabled=True)</dt><dd><tt>Set up a simple trigger.<br>
<br>
trigSrc can be either a number corresponding to the low level<br>
specifications of the scope or a string such as 'A' or 'AUX'<br>
<br>
direction can be a text string such as "Rising" or "Falling",<br>
or the value of the dict from self.<strong>THRESHOLD_TYPE</strong>[] corresponding<br>
to your trigger type.<br>
<br>
delay is number of clock cycles to wait from trigger conditions met<br>
until we actually trigger capture.<br>
<br>
timeout_ms is time to wait in mS from calling <a href="#PS2000a-runBlock">runBlock</a>() or similar<br>
(e.g. when trigger arms) for the trigger to occur. If no trigger<br>
occurs it gives up & auto-triggers.<br>
<br>
Support for offset is currently untested<br>
<br>
Note, the AUX port (or EXT) only has a range of +- 1V<br>
(at least in PS6000)</tt></dd></dl>
<dl><dt><a name="PS2000a-sigGenSoftwareControl"><strong>sigGenSoftwareControl</strong></a>(self, state=True)</dt><dd><tt>Trigger the AWG when configured with software triggering.</tt></dd></dl>
<dl><dt><a name="PS2000a-stop"><strong>stop</strong></a>(self)</dt><dd><tt>Stop scope acquisition.</tt></dd></dl>
<dl><dt><a name="PS2000a-waitReady"><strong>waitReady</strong></a>(self, spin_delay=0.01)</dt><dd><tt>Block until the scope is ready.</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="picoscope.picobase.html#_PicoscopeBase">picoscope.picobase._PicoscopeBase</a>:<br>
<dl><dt><strong>BW_LIMITS</strong> = {'20MHZ': 1, 'Full': 0}</dl>
<dl><dt><strong>ERROR_CODES</strong> = [[0, 'PICO_OK', 'The PicoScope XXXX is functioning correctly.'], [1, 'PICO_MAX_UNITS_OPENED', 'An attempt has been made to open more than PSXXXX_MAX_UNITS.'], [2, 'PICO_MEMORY_FAIL', 'Not enough memory could be allocated on the host machine.'], [3, 'PICO_NOT_FOUND', 'No PicoScope XXXX could be found.'], [4, 'PICO_FW_FAIL', 'Unable to download firmware.'], [5, 'PICO_OPEN_OPERATION_IN_PROGRESS'], [6, 'PICO_OPERATION_FAILED'], [7, 'PICO_NOT_RESPONDING', 'The PicoScope XXXX is not responding to commands from the PC.'], [8, 'PICO_CONFIG_FAIL', 'The configuration information in the PicoScope XXXX has become corrupt or is missing.'], [9, 'PICO_KERNEL_DRIVER_TOO_OLD', 'The picopp.sys file is too old to be used with the device driver.'], [10, 'PICO_EEPROM_CORRUPT', 'The EEPROM has become corrupt, so the device will use a default setting.'], [11, 'PICO_OS_NOT_SUPPORTED', 'The operating system on the PC is not supported by this driver.'], [12, 'PICO_INVALID_HANDLE', 'There is no device with the handle value passed.'], [13, 'PICO_INVALID_PARAMETER', 'A parameter value is not valid.'], [14, 'PICO_INVALID_TIMEBASE', 'The timebase is not supported or is invalid.'], [15, 'PICO_INVALID_VOLTAGE_RANGE', 'The voltage range is not supported or is invalid.'], [16, 'PICO_INVALID_CHANNEL', 'The channel number is not valid on this device or no channels have been set.'], [17, 'PICO_INVALID_TRIGGER_CHANNEL', 'The channel set for a trigger is not available on this device.'], [18, 'PICO_INVALID_CONDITION_CHANNEL', 'The channel set for a condition is not available on this device.'], [19, 'PICO_NO_SIGNAL_GENERATOR', 'The device does not have a signal generator.'], ...]</dl>
<dl><dt><strong>EXT_MAX_VALUE</strong> = 32767</dl>
<dl><dt><strong>EXT_MIN_VALUE</strong> = -32767</dl>
<dl><dt><strong>MAX_VALUE</strong> = 32764</dl>
<dl><dt><strong>MIN_VALUE</strong> = -32764</dl>
<dl><dt><strong>THRESHOLD_TYPE</strong> = {'Above': 0, 'Below': 1, 'Falling': 3, 'RiseOrFall': 4, 'Rising': 2}</dl>
<dl><dt><strong>UNIT_INFO_TYPES</strong> = {'AnalogueHardwareVersion': 8, 'BatchAndSerial': 4, 'CalDate': 5, 'DigitalHardwareVersion': 7, 'DriverVersion': 0, 'HardwareVersion': 2, 'KernelVersion': 6, 'PicoFirmwareVersion1': 9, 'PicoFirmwareVersion2': 10, 'USBVersion': 1, ...}</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-POINTER"><strong>POINTER</strong></a>(...)</dt></dl>
<dl><dt><a name="-byref"><strong>byref</strong></a>(...)</dt><dd><tt><a href="#-byref">byref</a>(C instance[, offset=0]) -> byref-object<br>
Return a pointer lookalike to a C instance, only usable<br>
as function argument</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>print_function</strong> = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)<br>
<strong>unicode_literals</strong> = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 131072)</td></tr></table>
</body></html>