labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 60 forks source link

Pulseblaster Board DDS Problem #8

Open philipstarkey opened 9 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Jesse Evans (Bitbucket: jcevans).


I've recently installed the pulseblaster into our setup, and I'm running into an error when I open blacs. "DDS Shape capabilities not supported on this board".

philipstarkey commented 9 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


What model of PulseBlaster is it?

philipstarkey commented 9 years ago

Original comment by Jesse Evans (Bitbucket: jcevans).


SP17

philipstarkey commented 9 years ago

Original comment by Jesse Evans (Bitbucket: jcevans).


Or at least that's the pin layout according to the manual

philipstarkey commented 9 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Ah, so this line of PulseBlasters have no DDS outputs, if I understand correctly. So you're getting this error because the PulseBlaster labscript device assumes a model with DDS outputs.

There are multiple models of PulseBlaster supported, and the "PulseBlaster" device is for the PulseBlaster DDS II, for historical reasons (it was the only one we had at the time).

If your model of PulseBlaster is not one of the ones in labscript_devices (I don't think it is), you can pretty easily implement support for it.

If you want to do this, you should have a look at PulseBlasterESRPro500.py, and see how it subclasses PulseBlaster_No_DDS and related classes. If you copy this file, rename things, and set the following class attributes:

description: a string description of the device
clock_limit: the maximum rate, in Hz the device can output two instructions in a loop, so 2/(min instuction length in seconds)
clock_resolution = similarly, 2/(resolution of instruction length, in seconds)
n_flags: number of digital flags the PulseBlaster has

num_DO: same as n_flags

core_clock_freq: the argument to be passed to the spincore API function pb_core_clock when initializing communication with the PulseBlaster

Then that should suffice, and you can put this device in your connection table and BLACS should be able to use it. Note that the filename must match the name of the class decorated with @labscript_device, the names of the other classes can be arbitrary so long as they are decorated correctly.

philipstarkey commented 9 years ago

Original comment by Jesse Evans (Bitbucket: jcevans).


So the SP2 model is implemented in labscript_devices, and I think the SP2 and SP17 devices are identical except for some of the pins that I'm not using. Do you think it'd be ok to use the SP2 device as a substitute?

philipstarkey commented 9 years ago

Original comment by Jesse Evans (Bitbucket: jcevans).


SP2 device class*

philipstarkey commented 9 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Yes, I think so. I believe the spincore API simply ignores higher numbered flags if the device doesn't support them. You'll just have the wrong number of buttons in BLACS.

philipstarkey commented 9 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Chris: Did you mean to say look at the PulseBlaster_SP2_24_100_32k.py file?

This would seem to be the logical file to copy, rename and edit the parameters appropriately.

philipstarkey commented 9 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Ah, yes. Didn't see that one, it's a better example but they're very similar in any case.