Newbie problem - desktop shortcuts not working + NI card being unstable

Skip to first unread message

Tomáš Lamich

Mar 29, 2022, 10:13:58 AMMar 29
to the labscript suite
Hi everyone,

After updating the labscript utils (and other standard packages) through conda, I am no longer able to run any the labscript components using the desktop shortcuts. I can't really provide more information, because I don't get any error message. When I check the windows task manager, I can't see the shortcut starting any new process. When I run any of the components using conda command line, they run without any errors.
Another issue which arose after the update is my NI_PCI_DIO_32HS card no longer being stable. When I run the blacs, it initializes the card ok, but I can't control it. Meaning when I change the state of any of the outputs I get no outgoing signal from it. When I checked with NI max I see that starting blacs makes the card fail the self-test. I need to reinitialise the card at least once, before blacs starts to communicate with the card.
If I try to run an experimental script without restarting the card, I get this error: PyDAQmx.DAQmxFunctions.NoDMAChansAvailableError: No DMA channels or USB Bulk Endpoints are available.
Either shut down other tasks that might be using these resources or consider changing your data transfer mechanism to Interrupts if supported.
Device:  Dev2

Task Name: _unnamedTask<1>

Status Code: -200251
 in function DAQmxWriteDigitalU32

I'd be very grateful for any help with these problems.

Have a nice day everybody.
Tomas Lamich

Mar 29, 2022, 5:33:53 PMMar 29
to the labscript suite

I actually have a development installation that has the same problem with the shortcuts (on Windows, I assume you are the same). I'm not entirely sure what is happening, as you have noted, there really isn't all that much to go on, so I moved on. On the bright side, it's much easier to track down the issue if I can replicate it so hopefully I can figure it out sometime this week. In the meantime, you can try to recreate the shortcuts by  re-running the desktop-app command from the installation instructions. It didn't work for my, but you may have better luck.

As for the DAQ, that is pretty concerning. Do you happen to know what your previous versions of labscript-devices, blacs, and labscript-utils were before the upgrade? And to be clear, you are on the current latest via the conda repo? I will say that opening NI-MAX with BLACS open will always cause problems since accessing an NI DAQ via either program blocks it from being accessed by the other. This is by design. 
Obviously, not actually getting changes on the outputs is a bit more strange. Just to confirm the steps you are following, you start BLACS (NI-MAX is closed), it claims good connection, but outputs don't update under manual control. You reload the tab, which gives manual control, but then you try to run a shot and you get the comms error. Given the error, it appears multiple tasks are being assigned to the same outputs, which really shouldn't be possible under normal BLACS operation. Is NI-MAX still open in the background? Assuming that isn't the case, there haven't been too many changes to the NI-DAQmx code recently (depending on how big of a jump in versions you did), particularly with regard to the DIO stuff. Still, stuff happens and it's hard to test every single DAQ card these days. I'll poke around the recent changes and see if anything jumps out at me while I await your response.


Tomáš Lamich

Mar 30, 2022, 11:35:35 AMMar 30
to the labscript suite
Hi David,

It seems the issue with the shortcuts is the same. I tried re-running the command, but it had no effect.

Just to clarify the action timeline: I turn on the PC and I start the blacs (I don't start the NI MAX) the NI DAQ is seemingly running ok, but it doesn't communicate, so I don't see the outputs changing state. If I run any script at this point, I get the error I sent in the previous email. However, if I restart the device manually I can control it both manually and from scripts using runmanager. This happens regardless if the NI MAX is running or not. Also the issue happens with every restart of Blacs (again independent of NI MAX status).
I was running the latest version before the last update, which was the update to labscript-utils 3.2.1. So the version jump should not be huge. There was a downtime with the system, because I was waiting for a breakout box, and there also was a windows update in the meantime.
There is also a possibility of the card being slightly malfunctioning, since it was in the lab unused for a long time (we are not planning on using it as our main control card). My aim is to make sure everything is running fine, before we migrate our experimental control to a new PC. I will try to use different NI card and I will let you know if the problem persists.


Tomáš Lamich

Mar 31, 2022, 5:59:47 AMMar 31
to the labscript suite
Hi David,

Quick update, I tried to plug in the NI_PCI_6713 card and it works as it used to. (No restarts needed, as soon as I start Blacs I can control it manually and through Runmanager.)
My conclusion is the problem must be either  NI_PCI_DIO_32HS specific or even just specific to the unit I have at my disposal.
Thank you very much, for your help.


Reply all
Reply to author
0 new messages