NI_PCIe_6361 device class and BLACS device tab issue

34 views
Skip to first unread message

Alex M.

unread,
Dec 6, 2025, 5:03:32 PM12/6/25
to the labscript suite
Hello,

Our lab uses an NI_PCIe_6361 multifunction DAQ. However, in the labscript_devices repo, there is no device class for the NI_PCIe_6361 device, only for the NI_PXIe_6361. I cloned the repo and in the device class contained in NI_PXIe_6361.py I changed the name to NI_PCIe_6361, added static_DO = False as a class attribute, and saved it in labscript_devices/NI_DAQmx/models. Then, I changed the name again to NI_PCIe_6361 in the capabilities.json file and tried to compile a connection table using BLACS, with the new NI_PCIe_6361 device defined. 

The compilation was successful, and when I closed BLACS and reopened it, the device tabs for the other two devices (NI_PCIe_6738 and PrawnBlaster) were created successfully, but it failed to create a device tab for the NI_PCIe_6361, and I don't understand why. Could it be that simply changing the class from NI_PXIe_6361 to NI_PCIe_6361 is not sufficient? If not, what is the best option to create a class for NI_PCIe_6361?

I have attached the updated NI_PCIe_6361.py, register_classes.py, capabilities.json file, and the __init__.py file from models for reference if needed.

Thank you!

Alexander
NI_PCIe_6361.py
capabilities.json
register_classes.py
__init__.py

dihm....@gmail.com

unread,
Dec 7, 2025, 9:11:44 AM12/7/25
to the labscript suite
Alexander,

It is likely you have missed a rename somewhere, but honestly I think you'd be better served by resetting and following the documentation for how to add a new NI DAQ instead of replacing the existing one.

Let us know if you have any troubles following that, as that would be a big.

-David

Alex M.

unread,
Dec 9, 2025, 12:58:46 PM12/9/25
to the labscript suite
Hello David,

I simulated a PCIe_6361 in NI MAX and followed the procedure outlined on how to add a device for NI DAQs. The creation of the class was successful (I can see the NI_PCIe_6361.py file in models), and my connection table containing this device compiles successfully, but the BLACS tab for this device is still not being created. To test if this was problem with this device in particular, I re-created the same procedure using an NI_USB_6251, for which I got a successful connection table compilation but the BLACS tab was again not created.

I assume the problem has to do with the BLACS_tab file, since the error I am getting is an ImportError: No BLACS_tab registered for a device named NI_PCIe_6361; however, this seems strange to me since the device class itself seemed to be successfully imported when the connection table was compiled.

Furthermore, since the register_classes.py file registers all the auto-generated subclasses in models, it seems that the new device class should automatically be registered.

Are there any additional steps I can try that address the problem of BLACS tab creation specifically?

Thank you,

Alexander

dihm....@gmail.com

unread,
Dec 10, 2025, 5:09:20 PM12/10/25
to the labscript suite
Alexander,

Ah, that is frustrating. There are many steps to try, but it is hard to list them out since this feels like a local path/environment issue. For example, I recently had a nearly identical problem because I had a copy of the device repository in a parent folder that was older than my development repository. When importing, the device_registry machinery would find the wrong repo (with the same name) and complain about missing registrations.

Best I can do without knowing a lot more about your setup is to point you to the device registry machinery in labscript-utils. You can put some print statements in there to ensure paths are being found correctly and what devices are getting registered. That will likely give you a toe hold to fully debug the issue.

-David

Alex M.

unread,
Dec 25, 2025, 6:36:55 PM12/25/25
to labscri...@googlegroups.com
Hello David,

Yes, indeed it was a directory issue. Apologies for the late reply. Thank you for this advice!

I do have another question related to the sample rate of the NI_PCIe 6738. In the capabilities.json file and device class, it has the sample rate listed as 1.0e6 S/s, as advertised by NI. However, when I tried to run a test script with BLACS (using a pico2 as a prawnblaster, two analog out channels on the 6738, and no physical NI cards), I got the following error

PyDAQmx.DAQmxFunctions.SampRateTooHighError: Specified sample rate is higher than the fastest rate supported by the device.

Property: DAQmx_SampClk_Rate
Corresponding Value:  1.0e6
Maximum Sample Rate:  400.0e3
Number of Channels: 2


However, when I change the maximum sample rate in the 6738 in the device class to anything below 4e5 (which is the maximum sample rate according to the error) the error vanishes and BLACS works. I am wondering whether the fact that two channels are defined lowers this maximum sample rate, and if this is the case, if there is a way to know by how much the sample rate decreases with each channel?


Thank you,


Alexander


--
You received this message because you are subscribed to the Google Groups "the labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/labscriptsuite/07d6989b-1378-4902-bac9-d6c2ec5bfcb8n%40googlegroups.com.

David Meyer

unread,
Dec 25, 2025, 9:07:42 PM12/25/25
to labscri...@googlegroups.com
Alexander,

Glad you got the path stuff sorted. From experience, I know how annoying that can be.

As for the sample rates, I ran into this problem a while back. I posted an issue to github describing it in some detail. Basically, the 6738 doesn't respect the typical sampling rate logic of most NI-DAQs. It's an annoying issue that would be hard to program around, so I've kept it to documenting the behavior for now. Feel free to chime in on the github issue!

-David


You received this message because you are subscribed to a topic in the Google Groups "the labscript suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/labscriptsuite/Vh0QmZV-SQ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to labscriptsuit...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/labscriptsuite/CABg%3DbWWnAUYi2xHMGWb%3DxavYMwvv8vM%3DuKod_o60%3DTtMQn27%2Bg%40mail.gmail.com.

Alex M.

unread,
Dec 27, 2025, 11:58:57 AM12/27/25
to labscri...@googlegroups.com
OK sounds good. Thanks for all the help!

best,

Alex

Reply all
Reply to author
Forward
0 new messages