Commit Graph

228 Commits

Author SHA1 Message Date
Yann Sionneau
63d4907c65 pxi6733: replace print by logger.debug 2015-09-05 01:22:57 +02:00
Yann Sionneau
7dfd11e2f0 pxi6733: try to fix ping method 2015-09-05 00:07:58 +02:00
Joe Britton
b790fb093d add ping() to novatech driver 2015-08-26 12:05:10 +08:00
Yann Sionneau
da1398b183 pxi6733: fix crash when samples are all the same
When samples are all the same, min = max, which PyDAQmx does not like.
This avoids the following crash reported by Kathie:

C:\Users\rabi\artiq\artiq\frontend [master]> python .\artiq_rpctool.py ::1 3256
call load_sample_values 100000 'np.array([0.0,0.0],dtype=float)'
Traceback (most recent call last):
  File ".\artiq_rpctool.py", line 112, in <module>
    main()
  File ".\artiq_rpctool.py", line 107, in main
    call_method(remote, args.method, args.args)
  File ".\artiq_rpctool.py", line 79, in call_method
    ret = method(*[eval(arg) for arg in args])
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\artiq-
0.0+dev-py3.4.egg\artiq\protocols\pc_rpc.py", line 142, in proxy
    return self.__do_rpc(name, args, kwargs)
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\artiq-
0.0+dev-py3.4.egg\artiq\protocols\pc_rpc.py", line 134, in __do_rpc
    return self.__do_action(obj)
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\artiq-
0.0+dev-py3.4.egg\artiq\protocols\pc_rpc.py", line 128, in __do_action
    raise RemoteError(obj["message"])
artiq.protocols.pc_rpc.RemoteError: Traceback (most recent call last):
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\artiq-
0.0+dev-py3.4.egg\artiq\protocols\pc_rpc.py", line 476, in _handle_connection_cr

    ret = method(*obj["args"], **obj["kwargs"])
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\artiq-
0.0+dev-py3.4.egg\artiq\devices\pxi6733\driver.py", line 117, in load_sample_val
ues
    byref(num_samps_written), None)
  File "<string>", line 3, in WriteAnalogF64
  File "<string>", line 2, in function
  File "C:\Users\rabi\AppData\Local\Continuum\Anaconda3\lib\site-packages\pydaqm
x-1.3.1-py3.4.egg\PyDAQmx\DAQmxFunctions.py", line 28, in mafunction
    raise DAQError(error,errBuff.value.decode("utf-8"), f.__name__)
PyDAQmx.DAQmxFunctions.DAQError: Minimum is greater than or equal to the maximum
. Ensure the maximum value is greater than the minimum value. If using a custom
scale, ensure that the scaled maximum is greater than the scaled minimum.
Property: DAQmx_AO_Min
Corresponding Value:  0.0

Property: DAQmx_AO_Max
Corresponding Value:  0.0

Channel Name: Dev1/ao1

Task Name: _unnamedTask<4>

Status Code: -200082
 in function DAQmxWriteAnalogF64
2015-08-19 12:49:33 +02:00
Yann Sionneau
966d0ee3f2 pxi6733: fix verification of the number of buffered sample values 2015-08-14 10:36:03 +02:00
479175870f pdq2/driver: implement ping 2015-08-09 17:30:01 +08:00
32d141f5ac refactor ddb/pdb/rdb 2015-07-13 22:21:32 +02:00
Yann Sionneau
706bf2b4b4 pxi6733: allow usage of 2-dimensional arrays. close #66 2015-07-07 15:42:08 +02:00
Yann Sionneau
df232f5405 lda driver: add error message when no device found 2015-07-07 15:18:28 +02:00
f9d878119a pxi6733: add mediator 2015-07-05 19:07:57 +02:00
2bc8286f3f pdq2/mediator: fix arm 2015-07-05 19:07:31 +02:00
2eeaa3b9be pxi6733: clean up docstring 2015-07-05 18:50:16 +02:00
abd58667b9 pxi6733: small cleanup 2015-07-04 18:49:09 +02:00
504576de58 remove unneeded import 2015-07-04 18:43:07 +02:00
9d6287a6a3 expose machine units to user 2015-07-01 22:22:53 +02:00
c71fe29792 simplify unit system and use floats by default 2015-06-26 16:34:37 +02:00
Joe Britton
f850336537 novatech409b: cleanup 2015-06-19 15:58:25 -06:00
Yann Sionneau
988ec5c7e2 tdc/tpz driver: fix missing close method in simulated device 2015-06-19 10:40:49 +02:00
Yann Sionneau
4d077f50c6 thorlabs tdc driver: all moves are now blocking and wait for move to end or be stopped 2015-06-19 01:02:12 +02:00
Yann Sionneau
6c094b500d pxi6733: fix type issue 2015-06-08 17:56:44 +02:00
Yann Sionneau
d66117ed99 pxi6733: cleanup 2015-06-08 11:54:39 +02:00
Yann Sionneau
c251601204 pxi6733: refactor, allow multiple channels in one task, cancel any previous task 2015-06-05 20:12:46 +02:00
Yann Sionneau
140239fee4 pxi6733: allow to set the sampling frequency 2015-06-03 00:34:11 +02:00
Yann Sionneau
36cda96df0 pxi6733: add ping method to the driver 2015-05-25 22:16:31 +02:00
Yann Sionneau
d78a275655 pxi6733: use a method as DoneEvent callback 2015-05-22 16:08:07 +02:00
Yann Sionneau
c91cd0ab38 pxi6733: use a writeable and c_contiguous numpy ndarray 2015-05-21 18:05:32 +02:00
65b4b7bb12 coredevice: rename rtio to ttl, integrated in+out driver, loopback on the same pin in tests 2015-05-02 10:35:21 +08:00
17f61b8e29 pxi6733: minor fixes 2015-04-21 16:23:09 +08:00
Yann Sionneau
69388ccc1a pxi6733: add driver and controller 2015-04-21 16:09:55 +08:00
6a0e97f161 pdq2: refactor program_frame(), cleanup test, stall correctly
Once the Sequencer ack's a line, the Parser starts preparing the
next one. This includes jumping through the frame table if necessary.
To stall the Parser while the Sequencer executes the last line of a
frame and to ensure that the frame select lines can be set up and their
sampling is synchronized to a trigger, we add a triggered stall line
at the end of the frame.

When that line is triggered the Parser jumps through the table and starts
parsing the first line of the next frame. We let the duration of this
last stall line be 10 cycles (200ns@50MHz) to be able to distinguish this
sampling of the frame select lines from the triggering of the first line
in the next frame.

frame           f
parser     n     f 0
stb        __---________---___
trigger    ___----_______----_
ack        ____-__________-___
sequencer  n-1 n          0
2015-04-14 18:18:16 -06:00
7ea9250b31 wavesynth: interpolate->coefficients 2015-04-05 04:43:27 -06:00
9fd4594c53 interpolate: refactor discrete_compensate 2015-04-05 04:32:23 -06:00
1d5f467da7 pdq2: implement changes in trigger/jump semantics, add unittest
The unittests now runs the compute_samples.Synthesizer against the actual
gateware and verifies similarity (up to integer rounding errors).
2015-04-05 03:55:54 -06:00
e870b27830 wavesynth: new semantics, fix compensation
* "trigger" now means that the corresponding line will only start
  once the trigger line is high.
* "jump" is implicit as the last line in a frame must jump back.
* spline coefficients are now compensated for finite time step size
2015-04-05 03:55:54 -06:00
Yann Sionneau
5ca5a3602e novatech409b: cleanup 2015-03-25 16:11:11 +01:00
6a0bc19279 pdq2/driver: document a few units 2015-03-23 20:31:37 -06:00
b597483913 thorlabs_tcube: spelling, fix ping 2015-03-23 17:24:12 +01:00
Yann Sionneau
2651050c83 Controller cleanups 2015-03-23 17:02:39 +01:00
0b174085c8 pdq2/mediator: rewrite, adapt to new PDQ RPC format, support anonymous segments, support uploading to controllers 2015-03-22 22:30:59 +01:00
1b7f71bda9 controllers: consistent device/simulation specification 2015-03-22 00:48:15 +01:00
7e61f66493 pdq2/mediator: get pdq devices from pdb 2015-03-22 00:24:42 +01:00
05781699b8 pdq2: driver and unittest
* parses wavesynth style programs
* verified with cosimulated gateware
2015-03-21 00:29:00 -06:00
fae7246f30 pdq2: merge from main pdq2 repo 2015-03-19 14:34:37 -06:00
0f007cb1a7 language/db: remove implicit_core 2015-03-08 11:37:53 +01:00
Yann Sionneau
c2831db253 thorlabs_tcube: add realistic values for status bits and dc status in driver sim 2015-03-04 23:45:22 +00:00
Yann Sionneau
5091098eb0 thorlabs_tcube: driver PEP8 fix 2015-03-04 23:45:21 +00:00
Yann Sionneau
5b8691f7f5 thorlabs_tcube: fix driver spelling issues 2015-03-04 23:45:21 +00:00
Yann Sionneau
14c759ff89 add Thorlabs T-Cube NDSP 2015-03-04 14:30:49 +00:00
3e46a36a4d lda: do not print attenuation value in simulation 2015-02-27 00:16:56 -07:00
Yann Sionneau
b672a99174 lda: add support for ping 2015-02-26 09:30:30 -07:00
Yann Sionneau
5cfdac9c7c Lda: replace assert with direct exception raising 2015-02-20 10:21:15 -07:00
05824fd3be lda: style 2015-02-18 11:31:44 -07:00
Yann Sionneau
dc132bd248 lda: fixes 2015-02-18 11:23:24 -07:00
4558fb3e33 clarify controller terminology 2015-02-16 08:57:15 -07:00
021d0d312e novatech409b: do not specify type info in docstrings 2015-02-16 04:43:30 -07:00
Joe Britton
a3494c57cc add Novatech 409B controller 2015-02-15 17:31:37 -07:00
891c0d12f2 refactor device/parameter management, immediate parameter updates, start introducing results 2015-01-12 18:51:23 +08:00
Yann Sionneau
2ad063c377 Lda: sanity checks on attenuation value
- Plus use of dB unit
2015-01-10 00:27:21 +08:00
Yann Sionneau
d21211a473 lda: docstring style 2015-01-10 00:27:15 +08:00
dhslichter
ff37cdc26c Update driver.py 2015-01-05 17:40:37 -07:00
dhslichter
c971a6f1c6 Update driver.py
Fix 32dB limit bug
2015-01-05 15:52:47 -07:00
d315268ddb move controllers/clients to frontend 2014-12-11 14:10:15 +08:00
87fdad97ca devices/lda: break off main function 2014-12-10 12:01:31 +08:00
2a843ea436 language: replace AutoContext 'parameter' string with abstract attributes
This allows specifying default values for parameters, and other data.
2014-12-02 17:19:05 +08:00
Yann Sionneau
0c20445413 lda: allow to simulate without needing hidapi
This also fixes some old style string formating
2014-12-01 19:39:13 +08:00
9c41f98d70 lda_controller: fix memory leak 2014-11-29 11:19:03 +08:00
8f18d8d492 devices: use underscore in filenames to permit import 2014-11-29 11:03:52 +08:00
Yann Sionneau
81ab801fe4 lda: filter reports when waiting for command response 2014-11-29 10:50:41 +08:00
Yann Sionneau
075e540032 lda: separate simulation class 2014-11-29 10:50:12 +08:00
Yann Sionneau
b9e7fdb80e lda: add docstring 2014-11-29 10:49:43 +08:00
dc27c2e3ad lda: remove excessive verbosity 2014-11-25 19:59:53 +08:00
57e25c7af1 lda: minor fixes and refactoring 2014-11-25 19:56:28 +08:00
Yann Sionneau
744e7841c6 devices: initial LDA controller 2014-11-25 19:51:28 +08:00
9098d10766 use .py extension on all Python files 2014-11-18 13:50:47 -08:00
f54a2f93d2 remove kernel_attr (inline transform is now smart enough to autodetect) 2014-11-03 14:38:04 +08:00
4cae5531ec pc_rpc: server identification support 2014-10-28 15:45:56 +08:00
2946fa58b8 pc_rpc: factor out asyncio server code 2014-10-27 20:37:37 +08:00
1e5b05d4ec pdq2: fix commandline arguments 2014-10-27 20:34:33 +08:00
171ed70f2a pc_rpc: remove WaitQuit (use e.g. Ctrl-C on the controller side instead) 2014-10-27 14:33:45 +08:00
3f1391f7f2 devices: basic pdq2 controller/client 2014-10-25 11:38:42 +08:00
85b6a7ca24 pdq2: small improvements based on ML feedback 2014-10-22 17:31:33 +08:00
61a50ee53c reorganize for devices/controllers 2014-10-19 23:51:49 +08:00
caab81974a devices: add pdq2 (incomplete) 2014-10-17 00:13:09 +08:00
111bd3092c devices/rtio_core: add LLRTIOOut 2014-10-17 00:12:53 +08:00
27d1a5ffb9 devices/dds_core: rename rtio_channel to rtio_switch 2014-10-16 23:36:28 +08:00
cbf915c2cc devices/runtime: pretty-print 2014-10-14 19:49:39 +08:00
88ad4fbf23 pdq2: pep8 2014-10-14 17:02:25 +08:00
ea0773ccb5 pdq2: split CLI 2014-10-14 16:38:02 +08:00
de158e0aeb artiq/devices: add pdq2.py 2014-10-14 16:00:52 +08:00
d22c30650d rtio: add timestamp function 2014-10-14 15:54:10 +08:00
2449348f31 devices/runtime: allow 1ms for all initial DDS programming 2014-10-14 12:47:24 +08:00
a303293e8f devices/dds_core: fix merging of back-to-back pulses of different frequencies 2014-10-13 23:58:32 +08:00
0158de5ac9 devices/corecom_dummy: fix ref_period 2014-10-13 17:20:12 +08:00
74adb39157 devices/dds_core: add frequency_to_ftw and ftw_to_frequency 2014-10-13 17:05:35 +08:00
9925568473 devices/runtime: add returns_twice attribute on __eh_setjmp (fixes exception crashes) 2014-10-11 12:59:39 +08:00
Yann Sionneau
e3ef077cb2 Fix module installation
Allow to use setup.py for ARTIQ instead of PYTHONPATH.
Without this, the installation is incomplete.
2014-10-11 00:42:26 +08:00
e22301ea05 transforms: track units, now() returns seconds, implement time_to_cycles and cycles_to_time 2014-10-06 23:28:56 +08:00
8612a8a9ca devices/dds_core: remove stale kernel_attr 2014-10-06 17:23:00 +08:00
76fed11d59 rtio: raise RTIOSequenceError exceptions when events are not submitted in-order 2014-09-30 19:32:11 +08:00
73d0a84b44 doc: various cleanups 2014-09-30 18:10:40 +08:00