Skip to content
Open
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a658582
Initial draft of DDS sweeper
carterturn Mar 31, 2025
9e946f7
updating worker functions to match current firmware
Json-To-String Apr 15, 2025
1a42e34
Merge branch 'labscript-suite:master' into carterturn-dds-sweeper
carterturn Apr 17, 2025
2ffb2ba
added logic for max instructions per channel, getting pico board, and…
Json-To-String Apr 18, 2025
24e00ae
change assert_OK() calls in __init__ to match current firmware
Json-To-String Apr 21, 2025
4048745
Some initial docs additions
Json-To-String Apr 23, 2025
b02ec9b
Indenting python block properly
Json-To-String Apr 23, 2025
71e107b
fix uf2 link rendering and renamed runviewer parser to plural
Json-To-String Apr 23, 2025
03352fd
adding support for simultaneous dynamic and static instructions
Json-To-String Apr 24, 2025
5630a47
Add check that device is ready for the number of bytes we will send i…
carterturn Apr 27, 2025
4387a42
Add overview and specifications for docs.
carterturn Apr 27, 2025
0595dd4
Add option for external reference clock
carterturn Apr 27, 2025
68c25c5
Expand docstring for labscript device
carterturn Apr 27, 2025
9469d0b
removing internal timing, added a parentheses to table size check
Json-To-String Apr 28, 2025
7b20811
pluralism
Json-To-String Apr 28, 2025
1f6bc6b
Some documentation and docstring updates
carterturn Apr 29, 2025
fb5acda
min version and status map update
Json-To-String Apr 29, 2025
a8adf76
no s in readline
Json-To-String Apr 29, 2025
43b4821
Add Pico2 instruction counts to docs.
carterturn Apr 29, 2025
aed9873
saving progress, all static ins works, final value update works, stil…
Json-To-String Apr 29, 2025
eebf6f6
Graceful aborts and docstring updates
Json-To-String Apr 30, 2025
995a0f4
status string format specifier fix
Json-To-String Apr 30, 2025
b821fea
transition_to_buffered supports smart cache, borrowing logic from Pra…
Json-To-String May 1, 2025
0c02e78
adding clock_limit class attribute
Json-To-String May 2, 2025
c2ec2b9
limit calculation uses dynamic channels, not all, and ref clk freq be…
Json-To-String May 2, 2025
146157a
removed unnecessary if statement checks for both dyn and stat DDSs
Json-To-String May 6, 2025
d3671af
More docstrings
carterturn May 6, 2025
46bcc9f
Default connection table example
Json-To-String May 8, 2025
4580b06
Cleaned up extra imports in the examples
Json-To-String May 8, 2025
f1985c5
smart cache logic cleanup, removed inaccurate debug msg, moved explic…
Json-To-String May 8, 2025
d7b0dfc
Conversion to DDS units is done on Pi Pico for set_output.
carterturn May 14, 2025
5377b59
Placeholder values for scale factor when only static channels are used.
carterturn May 14, 2025
b0797fe
Don't need to do unit conversions for set output
carterturn May 14, 2025
adfa697
Remove stray? factor of 10 from tuning_words_to_SI dictionary.
carterturn May 14, 2025
3f55bde
removing explicit break, is the same as returning self.final_values
Json-To-String May 19, 2025
fe811ef
program manual will invalidate static cache
Json-To-String May 19, 2025
e0fe6ee
Add dynamic channels to constructor, and add checks in add_device to …
carterturn May 20, 2025
273c42d
calculate max freq
Json-To-String May 20, 2025
10911d6
program manual should only invalidate static cache
Json-To-String May 22, 2025
0fe0504
update examples with dynamic_channels parameter
Json-To-String May 22, 2025
9f37751
Compute scale factors separately from quantising data.
carterturn May 23, 2025
9854b3c
Cache scale factor calculations and fully separate for quantization f…
dihm May 29, 2025
34436d5
Move `generate_code` break if no channels are connected earlier in th…
dihm May 29, 2025
b3aee0a
Tidy up some lints
dihm May 29, 2025
4527466
program_manual should not erase dds_data from smart cache.
carterturn Jun 10, 2025
33e1b61
Ensure data table is constructed in correct order.
carterturn Jun 24, 2025
2c0e678
Compare original cache length to DDS data length.
carterturn Sep 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add check that device is ready for the number of bytes we will send i…
…n binary mode.

At the moment, if it fails it will simply send all zeros and throw an error.
I think this is the best option, as it prevents the device from getting locked up waiting for bytes (if we restart the blacs tab).
  • Loading branch information
carterturn committed Apr 27, 2025
commit 5630a476c176d619e1acbbbb7149f42770b1fede
5 changes: 5 additions & 0 deletions labscript_devices/AD9959DDSSweeper/blacs_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ def set_batch(self, table):
if not resp.startswith('ready'):
resp += ''.join([r.decode() for r in self.conn.readlines()])
raise LabscriptError(f'setb command failed, got response {repr(resp)}')
ready_for_bytes = int(resp[len('ready for '):-len(' bytes\n')])
if ready_for_bytes != len(table.tobytes()):
self.conn.write(b'\0'*ready_for_bytes)
self.assert_OK()
raise LabscriptError(f'Device expected {ready_for_bytes}, but we only had {len(table.tobytes())}. Device mode likely incorrect.'
self.conn.write(table.tobytes())
self.assert_OK()

Expand Down