Closed matth2peters closed 3 years ago
@matth2peters
I'm glad you found the thing I was going to point you to anyway. These types of problems are a rather subtle consequence of the way pulseblasters have to be programmed. Another more recent option that avoids this is to use a pseudoclocking device with independent clocklines (like the Prawnblaster).
Also, this is a perfectly good place for these kinds of questions, especially when you have provided such a thorough explanation and example code. It really is appreciated! My apologies for not getting an answer to you before you found it yourself (though I am glad there is enough out there you could actually find it).
Hi,
I'll start by introducing a simplified version of the problem I'm having:
I have a connection table + simple sequence below (you'll have to change the location of the connection table in the sequence file), which I am unable to run. When trying to compile the sequence file in runmanager, I get the error
The crux of the problem seems to be that in labscript.py line 841, the error checking only looks to see if the timing between pulseblaster commands is less than the minimum clockline recovery time (in this case 1e-6 seconds) without seeing if the clockline output itself is actually changed. I'm expecting that even if the pulseblaster updates faster than the clockline can, it won't affect any of the devices clocked by the pulseblaster so long as the corresponding flag doesn't change its value.
My question is whether I am correctly understanding the problem, and whether altering/removing the conditions for this exception will have unforeseen consequences
Update: After looking more closely at the hdf sequence file, it looks like the clockline that triggers my NI card is programmed such that the trigger is high for half of the time before the next PB update. So if I have a trigger on a different flag some time t after setting my analog card to a new value, the clockline trigger width sent to the analog card will be t/2. I had initially assumed the flag corresponding to the clockline would stay high until just before the next trigger occurs.
For my particular NI card 6733, this isn't an issue (the trigger width only needs to be >=10 ns), and if I comment out the exception thrown on line 841, my sequences still work as expected. I'm also prevented from an error being caused by setting t to be too small since my pulseblaster can only be triggered once every 120 ns anyway. I can imagine something going wrong in general if this exception was removed, but to me it seems like a robust solution for my devices is to comment out this exception unless there's something I'm missing
More Updates: It looks like this is a similar issue to https://github.com/labscript-suite/labscript/issues/51, so I'll close it I see that adding a pseudoclock buffer between the NI cards and my pulseblaster could also address this issue
(Also, apologies if this was the wrong place to post this)
Connection table:
Sequence File: