-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathapi.txt
More file actions
467 lines (311 loc) · 9.65 KB
/
Copy pathapi.txt
File metadata and controls
467 lines (311 loc) · 9.65 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
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
API-calls:
API version 1 (release 0.1.0)
2018/02/17
*** creating the object:
from jds6800 import jds6600
myjds6600 = jds6600("/dev/ttyUSB3")
*** API information functions:
getAPIinfo_version()
return verion of the API (currently 1)
getAPIinfo_release()
return release of the API (currently "0.1.0 2018-02-17")
*** Device information functions:
getinfo_devicetype()
return the devicetype (MHz) of the device
getinfo_serialnumber()
return the serial number of the device
getinfo_waveformlist()
return list of all available waveforms on the device
getinfo_modelist()
return list of all available modes on the device
*** Waveform and Channel Status:
getchannelenable()
return the configured channel-enable information of both channels
getwaveform(channel)
return the configured waveform of a channel
range: 1-2
getfrequency(channel)
return the configured frequency of a channel (nomalised)
range: 1-2
getfrequency_m(channel)
return the configured frequency and multiplier of a channel (not normalised)
range: 1-2
getamplitude(channel)
return the configured amplitude of a channel
range: 1-2
getoffset(channel)
return the configured offset of a channel
range: 1-2
getdutycycle(channel)
return the configured dutycycle of a channel
range: 1-2
getphase()
return the configured phase-setting of channel 2
*** writing device and channel information
setchannelenable(channel1,channel2)
sets channel-enable of both channels.
format: (bool,bool)
setwaveform(channel,waveform-id)
setwaveform(channel,waveform-name)
sets waveform for a channel, using either waveform-id (numeric) or
waveform-name (text)
numeric range 0-16, 101-160
setfrequency(channel,frequency,multiplier = 0)
sets the frequency and frequenct-multiplier of a channel
Maximum Frequency:
60 Mhz for multiplier-setting 0, 1 and 2
80 Khz for multiplier-setting 3
80 Hz for multiplier-setting 4
resolution:
0.01 Hz for multiplier-setting 0, 1 and 2
0.00001 Hz for multiplier-setting 3
0.00000001 Hz for multiplier-setting 4
setamplitude(channel,amplitude)
set the amplitude of a channel
range: 0 - 10
setoffset(channel,offset)
set the offset of a channel
range: -10 - 10
setduttycycle(channel,dutycycle)
set the dutycycle of a channel
range: 0 - 100
setphase(phase)
set the phase of channel 2 vs. channel 1
range: 0 - 360
*** reading and changing mode
getmode()
return current mode
setmode(mode-id)
setmode(mode-name)
set mode of the device, either using modeid (numeric) or mode-name
numeric range: 0 - 9
stopallactions()
stops any action of the device
*** measure mode
measure_getcoupling()
return measure coupling (AC or DC)
numeric range: 0 - 1
measure_getgate()
return measure gate time
measure_getmode()
return measure mode (Frequency or Period)
measure_setcoupling(coupling-id)
measure_setcoupling(coupling-name)
set measure coupling, based on coupling-id (numeric) or coupling-name
Note:
"AC" is "AC(EXT.IN)"
"DC" is "DC(EXT.IN)"
measure_setgate(gatetime)
set measure gate time
range: 0 - 10
measure_setmode(mode-id)
measure_setmode(mode-name)
set measure mode, based on mode-id (numeric) or mode-name
numeric range: 0 - 1
Note:
"FREQ" is "M.FREQ"
"PERIOD" is "M.PERIOD"
measure_getfreq_f()
return measured frequency in frequency mode (low resolution)
measure_getfreq_p()
return measured frequency in periode mode (high resolution)
measure_getpw1()
return pulse width of the signal in "1" state
measure_getpw0()
return pulse width of the signal in "0" state
measure_getperiod()
return total period of the signal
measure_getdutycycle()
return dutycycle of the signal
measure_getall()
return all usefull data (freq_f, freq_p, pw1, pw0, periode, dutycycle) in one query
measure_getu1()
return unknown value 1 (related to frequency, inverse-related to gatetime)
measure_getu2()
return unknown value 2 (inverse-related to frequency)
measure_getu3()
return unknown value 3 (inverse-related to frequency)
*** counter mode
counter_getcoupling()
return counter coupling (AC or DC)
counter_setcoupling(coupling-id)
counter_setcoupling(coupling-name)
set counter coupling, based on coupling-id (numeric) or coupling-name
Note:
"AC" is "AC(EXT.IN)"
"DC" is "DC(EXT.IN)"
counter_reset()
reset counter
counter_start()
start counting
counter_stop()
stop counting
*** sweep mode
sweep_getstartfreq()
return configured sweep start frequency
sweep_getendfreq()
return configured sweep end frequency
sweep_gettime()
return configured sweep time
sweep_getdirection()
return configured sweep direction (rise, fall or rize&fall)
sweep_getmode()
return configured sweep_mode (Linear or Logarithm)
sweep_setstartfreq(frequency)
set sweep start frequency
range: 0 - 60 Mhz
sweep_setendfreq(frequency)
set sweep end frequency
range: 0 - 60 Mhz
sweep_settime(time)
set sweep time
range: 0.1 - 999.9
sweep_setdirection(direction-id)
sweep_setdirection(direction-name)
set sweep direction, either numeric or text
numeric range: 0 - 2
note:
"BOTH" = "RISE&FALL"
"RISEFALL" = "RISE&FALL"
sweep_setmode(mode-id)
sweep_setmode(mode-name)
set sweep mode, either numeric or text
numeric range: 0 - 1
note:
"LIN" = "LINEAR"
"LOG" = "LOGARITHM"
sweep_getchannel()
return sweep channel
sweep_setchannel(channel)
set sweep channel
range: 0 - 1
note:
changing channel using "sweep_setchannel" while running does NOT stop the sweep
changing channel using "setmode" chile running WILL stop the sweep
sweep_start()
start frequency sweep
sweep_stop()
stop frequency sweep
*** pulse mode
pulse_getpulsewidth()
return configured pulsewidth, normalised to second
pulse_getpulsewidth_m()
return configured pulsewidth + multiplier, non-normalised
unit = 1 ns for multiplier = 0
unit = 1 µs for multiplier = 1
pulse_getperiod()
return configured period, normalised to second
pulse_getperiod_m()
return configured period, not-normalised
unit = 1 ns for multiplier = 0
unit = 1 µs for multiplier = 1
pulse_getoffset()
return configured offset
pulse_getamplitude()
return configured amplitude
pulse_setpulsewidth(pw,multiplier=0)
set pulsewidth, normalised to second
range: 30e-9 to 4 for multiplier = 0
range: 1e-6 to 4000 for multiplier = 1
pulse_setpulsewidth_m(pw,multiplier)
set pulsewidth, not normalised
unit = 1 ns for multiplier = 0, range 30 - 4e9
unit = 1 µs fir multiplier = 1, range 1 - 4e9
pulse_setperiod(period,multiplier=0)
set period, normalised to second
accepted range: 30e-9 to 4 for multiplier = 0
accepted range: 1e-6 to 4000 for multiplier = 1
pulse_setperiod(period,multiplier)
set period, not normalised
unit = 1 ns for multiplier = 0, range 30 - 4e9
unit = 1 µs fir multiplier = 1, range 1 - 4e9
pulse_setoffset(offset)
set pulse offset
range: 0 - 120 %
pulse_setamplitude(amplitude)
set pulse amplitude
range: 0 - 10 volt
pulse_start()
start pulse action
pulse_stop()
stop pulse action
*** burst mode
burst_getnumberofbursts()
return the configured number-of-bursts for a burst-event
burst_getmode()
return the configured burst-mode (manual, ch2, ext.trig(AC) or "ext.trig(DC)"
burst_setnumberofbursts(burst)
sets the number-of-bursts for a burst-event
range: 1 - 1048575
burst_setmode(mode-id)
burst_setmode(mode-txt)
set burst-mode via mode-id (numeric) or burst-text
note:
"MANUAL" is "MANUAL TRIG."
"CH2" i "CH2 TRIG."
"EXT.AC" is "EXT.TRIG(AC)"
"EXT.DC" is "EXT.TRIG(DC)"
burst_start()
start burst action
burst_stop()
stop burst action
burst_resetcounter()
reset burst-counter
*** system mode
system_getsound(bugfix=True) (*)
return configured sound parameter
system_getbrightness(bugfix=True) (*)
return configured brightness parameter
system_getlanguage(bugfix=True) (*)
return configured language parameter
system_getsync(bugfix=True) (*)
return configured "syncrone" parameter
note: returns a 5-element list: (frequency, wave, amplitude, dutycycle, offset)
system_getarbmaxnum(bugfix=True) (*)
return maximum-number-of-arbitrary-waveform parameter
(*) There seams to be a bug in certain versions of the jds6600 firmware where the register-port used to read a
system parameter is one highter then the register used to write(set) that parameter
Setting the "bigfix" parameter in the "system_set*" to True (default setting) will fix this issue
system_setsound(sound)
set sound parameter
range: False,True
system setbrightness(brightness)
set brightness parameter
range: 1 - 12
system_setlanguage(language-id)
system_setlanguage(language-txt)
set language, using either language-id (numeric) or language-txt
note:
"EN" is "ENGLISH"
"CH" is "CHINESE"
system_setsync(freq,wave,ampl,duty,offs)
set syncronised parameter
system_setarbmaxnum(arbmaxnum)
set maximum number of arbitrary waveforms parameter
range: 1 - 60
*** profile operations
system_saveprofile(profile)
write the current configuration of the device to the specified profile in memory (*)
range: 0 - 99
system_loadprofile(profile)
load the specified pprofile from memory into the current configuration of the device (*)
range: 0 - 99
system_clearprofile(profile)
remove the specified profile from memory (*)
(*) Note:
The configuration of profile 0 is loaded from memory at boottime
*** arbitrary waveform operations
arb_getwave(waveid)
returns the specified arbitrary waveform from memory
range: 1 - 60
arb_setwave(waveid,wave)
programs the wave into the arbitrary waveform memory
range: 1 - 60
The arbitrary waveform must be formated as a 2048 element list or Tuple, containing integer values (range 0 - 4095)
*** DEBUG
DEBUG_readregister(register,count)
read register
DEBUG_writeregister(register,value)
write register
ENJOY!!!
Kristoff Bonne (ON1ARF)